Today I come confused but actually also enthusiastic because I think I came up with something that I didn´t really knew about and which I found tricky.
Let me get you into context. I´m working on a automation based on the ReFramework. And as every automation, there is custom ways apart from the default mechanism to handle exceptions.
Inside of my “Process workflow” I have of course the workflow which essentially gets the main job done. And if a business exception occurs in that workflow (Extracción Datos Publicación)
then those errors are catch and a little sequence runs which goal is to assign some specific values to some out arguments which are used to save the info and be able to send emails based on the errors with the information saved in the arguments.
the thing here is that all these is happening inside of the “process workflow” of course… and the email is not send till the “set transaction status workflow” runs. So when I debug the workflow and the execution reaches the “Set Transaction Status Workflow” I see that the values I thought I saved in the second image are not passed out of the “process workflow” as you can see in this image.
Yes thats true…arguments are not passed when there is an error…
Two ways
If on windows compatibility then create a global variable and assign values to them instead
You have an option to add the data to different items in exception variable as well…there is an option to add dictionary of items to your exception variable…and then rethrow it
Instead of using string and basic types use array or datatable and initialize it outside the process only and use them as in/out argument and that should work check below for clear explanation
Yet still I figure out that for my case I could instead of putting the try catch inside of the process workflow I could instead use the same try catch but for the whole process workflow. In that way value will be store so it can be passed to the set transaction Status.