I have tried this in latest version of UiPath as well as older version 2020.4, but it seems the bug still persists. When there is exception in child workflow, the out arguments (that are already populated previously in child workflow) gets erased when it exits and reaches parent activity. In other word, upon exception the out arguments don’t pass along. Why would the arguments erase that are already populated before exception?
The solution for this issue is time consuming, where we need to pass the arguments again with Throw activity. Sadly there is no global variable facility within UiPath (one reason I don’t like UiPath… so much unnecessary rework passing all the variables every time between workflows), other than using Assets. It’s hard to design reusable components.
Yes, I am using REF. As per the requirement, upon Business or system exception in Process.xaml I need to send out email notification and in this email notification I need certain variables from Process.xaml to pass along. Since the out arguments are lost due to exception, I am left with blank required values.
I feel this is a bug in UiPath which they need to rectify. Why would only int, string, bool and few other types of argument get lost. Out arguments with DataTable, Dictionary, List, etc. type preserves the value. Why would certain type of argument preserve and other basic ones lose the value?
My current work around is to use new temp Dictionary that I pass along as In/Out argument. I maintain all my out argument variables in this temp dictionary. Regardless of exception, values are preserved now and I use it in other activity in Main.xaml.
I hope this help someone until UiPath decides to fix it.
Maciej, Why is this still not addressed over a year later?
I have specific actions that must take place at end process if there is a system exception. The simplest thing to do is to pass a few arguments from Process (including a Boolean) to SetTransactionSatus to trigger those actions in End Process.
With this being an issue, I am not having to perform code gymnastics to write to a .csv file the values I want passed if an exception does not carry my arguments through.
How long until we see a fix?
Due to my need for an immediate solution, I did the following:
1- In Init > If first run, read local configuration file > Invoke InitAllSettings workflow, I have the automation create an Excel file for arguments to save. These values are the base values for arguments that reset where a system exception would clear them. I have this file name and location set as an asset in Orchestrator.
2- In Process Transaction, I copy that file in as a data table. Where I have designated a system exception to occur, I change the value of the “argument” I need to save. For me, I am using a boolean that will be needed in end process. Then I use Throw.
From this, where ever I need to take an action based on an argument that would normally clear, I have a file to read with the values that should have, but did not pass out.
Yes UiPath i not developer friendly compared to Blue Prism for the very reason that you have mentioned below.
Sadly there is no global variable facility within UiPath (one reason I don’t like UiPath… so much unnecessary rework passing all the variables every time between workflows), other than using Assets. It’s hard to design reusable components.
Also hard disagree. Global variables are an awful way to solve re-usability, especially in OOP. Its super easy to create re-usable activities in UiPath, especially with libraries, you just need to be smart about it.
The datatypes datatable, list and array variables can pass values outside the flow even if an exception occurs, Can try these possible variable datatypes