What happens if there is system or business exception in set transaction state

Hello,

Can anyone tell me what happens to a transaction if there is system exception or business exception in Set Transaction state? Will it Mark as system exception and retry or what it will be logged as?

Hey,
if you set transaction as ‘application exception’ or ‘bussiness exception’ you will find it in the queue with status failed and with kind of exception.
Additionally for ‘business exception’ if you have set ‘retry’ option in the queue then this transaction will be repeat.
Everything is visible in queue.

1 Like

here you can read more details:

1 Like

If any kind of system exception is encountered then the exception will be logged as the complete workflow is surrounded by try catch.

There are no business exceptions thrown by default in set transaction status . But if you wish to throw any custom business exception in Set Transaction status , make sure the same is caught and logged in outer try catch block.

1 Like

Ok got it. But my point is in reframework in set transaction xaml inside it, in success flow once queue has been updated as success at the bottom i am adding some email activity and it throws system exception. Now my question is already the queue status has been set to success but below that next activity throws error what happens to that transaction? Will it retry?

Hi @monish06,

The ideal place to have your success logic is in Process.xaml. As the last action of the process.

Why?

  1. This way if you have a business exception or system exception it will automatically be handled by the Process Transaction State ( catches AE and BE from Process.xaml). But when the entire Process.xaml flow has been completed then you know that your process was successful so you can place the logic you want under the success branch (this is something you have to design in Process.xaml). Your success branch in Process.xaml will then do the logic you asked.

  2. You do not have to edit anything in the RE-Framework and all the retry logic will remain as is.

  3. This way if your Success logic fails, (for example, could not send email success email) then this exception also can be automatically handled by the Process Transaction State (since exception bubbles upward)

In short, do not edit the logic after a transaction state has been updated, set your logic in Process.xaml.

1 Like

My 2 cents on this:-

The idea of sending email in set Transaction status itself is incorrect.The functinality of set transaction status is not meant for such activities. Sending email should either be part of process.xaml or end process based on your requirement.

Even if a system exception is thrown from set transaction status, exception will be logged and that transaction will not be retried.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.