Using Throw activity breaks out argument functions


So i’ve got a process workflow where a string argument is written. Then in some cases i use the Throw activity with a businessruleexception, to exit the process workflow and try the next transaction in the queue.
But before this i add a data table row with the string argument that comes out from the process.

However, if i use the Throw activity, the out argument string does not work, the value is empty when exiting into Main.

If i instead of Throw assign a variable with a businesserror and use a flow decision to check for the error and if True exit the process workflow, it works.

It seems like using Throw exits the workflow without bringing the arguments with it out.

Any thoughts on this? I like using Throw instead of having to check for businesserrors using a flow decision, but need the arguments to exit properly.

Let me know if i need to explain more or show example.

Hi @thomasb82,
You can try adding the data table row argument value just before throwing the BRE, so that before throwing exception there’s value in the argument.

Let me know if this helps.

Hey, yeah im doing that with the string argument, but when error is thrown using Throw it seems that the string is deleted/not trasferring out of the process.

Hi @thomasb82

Yes when the child workflow exit with an exception then the out argument would not passed from the child to parent workflow,so what I was doing in my projects are I use try catch inside the child workflow or write the value in any external sources (like write the value in a text file or excel) and read it again when we want…


It does not work for serialized variables like strings, integer etc.

But it WORKS for non-serialized variables like datatables, QueueItem etc.

The best solution I have found for this kind of scenarios is to always use io_TransactionItem to save my process variables.

ah great thanks for that!

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