I need to use terminate workflow in reframework if any system exception happen in my workflow i need to terminate flow and i need to write excel log file that this is error occurred send mail to report team how could i capture system exception what is different between throw and terminate workflow how can i catch exception
If you use REF please stay to the logic. Use “Throw” activity for new BusinessRuleException. Open SetTransactionStatus in Framework and add there what you want to do in this case. Thats the clean way, everything else is a quick and dirty hack.
Surround your activities that can throw the error with try-catch, add “Exception” in the catches block as one exception case,
and inside there you can use the Exception variable to extract some info about what exception happened,
stuff like Exception.Message, Exception.Source (check out .Net exception for more) that you can use in your excel log to your file.
your activities that you think will throw the error sometimes
log your to excel Exception.Message, Exception.Source, date, process name, whatever you want (append range or whatever way you prefer)
Terminate Workflow with parameter “Exception” so Orchestrator also logs it
something like that
You can get your system exception message by using the below variable
So in SET TRANSACTION STATUS you will get the variable, use it as per your requirement
Surround your activity using try catch and handle a system exception in the catch block give a terminate workflow activity.