Out arguments not carrying value upon exception

Hi,

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.

Appreciate any solution for this issue.

Regards,
Harshil

@harshilmehta

If you are using RE-Framework, once the exception is triggered then it will directly go to transaction status

So out arguments will not get any value, If you want then you can give a message in exception message as below

new businessRuleException(“Message”)

Now in Transaction Status, you can access as

in_BusinessRuleException.Message to call the message and you can define your logic

Hope this helps you

Thanks

Thank you for your prompt response.

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.

Regards,
Harshil

2 Likes