Import Arguments when the proccess ends

Hi Guys,

I have a process that I need to import the arguments when this proccess finds an exception or it ends.

Attached 2 files, when the first process (named: starts) it invokes the second process (named: Main).

The process Main record the variable [original text] and finishes. I need to figure out how is the last value recorded before the process Main ends.

I believe I need to force this “import” before the process ends because when it hapens all variables and arguments return to default values (empty).

start.xaml (7.3 KB)
Main.xaml (7.4 KB)

When you use the Terminate Workflow activity, you’re forcing the end of the workflow execution at that particular point, so anything after the Terminate Workflow will not be executed, including the return to the workflow that invoked it in the first place (in your case, start.xaml). A similar behavior happens in the case of exceptions.

I’m not sure what you’re trying to do, but if you just want to finish the execution of Main.xaml and get the return values, you don’t need to include a Terminate Workflow.
If you’re expecting an exception inside Main.xaml, but you still want to return something, you can use a Try Catch inside Main.xaml to catch the exception and prevent the workflow to stop at that point. Inside the Catch part you can also set a default return value if you want to use it in the calling workflow (i.e., start.xaml):
Main.xaml (9.1 KB)
start.xaml (7.0 KB)