I have an REFramework workflow. In the End Process workflow, it will send an email that contains the transactions that were performed. In testing I noticed that if the application that is used in the overall workflow does not come up for any reason, a system exception is thrown, as expected. I would like to get some suggestions on not sending the email in the End Process workflow, is there a way to check if there was a system exception in that flow?
REFramework uses SystemError variable.
If transition directs to end process state with conditon like SystemError isNot Nothing then you can use it in end state for sending email. Just drag if activity, paste condition:
SystemError is Nothing
and then in true place your sending email code.
You can also use try catch for that invoke workflow with this application. In catch place Assign with boolean bool_ErrorThrown= True.
After that, under this assign (still in catch area) just place Rethrow activity
In Init state you need to create default value for that boolean (with value False).
In that scenario your workflow can act the same, as usual, but you will have another variable which tell you if that exception had placed.
Funny, I found in the initialize that there is a variable already created called SystemException. So I used it as you mentioned in an if activity as shown below.
SystemException Is Nothing
Thank you Yameso!