Request for Guidance on Passing Values Between Process and Set Transaction Status States in REFramework

I am currently working on a project using the UiPath REFramework, and I have encountered a requirement where I need to pass a value from the Process state to the Set Transaction Status state

@T_Y_Raju,

If you don’t want to make many changes by passing this value through arguments, you can declare a global variable. Just declare a global variable, assign it a value in Process.xaml and directly use this variable in Set transaction status.

Here is the scenario:

  • In the Process state, I am closing an application, and if an exception occurs, I am retrying the transaction twice as per the framework design.
  • If the transaction ultimately fails after retries, I need to pass an ID Number (retrieved during the Process state) to the Set Transaction Status XAML.

Implementation Details:

  1. I created an argument out_DOSID in the Process state to capture the ID value and passed it to the Main workflow.
  2. In the Main, I created another argument, also named out_DOSID, with In/Out direction, to ensure the value flows to the Set Transaction Status state.
  3. Finally, I passed the out_DOSID (with In direction) to the Set Transaction Status XAML.

Problem:

  • While I can see the out_DOSID value correctly populated in the Process state, it is showing as null when accessed in the Main workflow, and subsequently, in the Set Transaction Status XAML.

@T_Y_Raju

When there is an exception values are not passed out of xaml in invoke workflow…they become null

Three ways

  1. Create an list type variable and pass it as in/out to process xaml…and initiate it in main and add values in process…these values would be passed
  2. Create a global variable and assign value to it as scope it global it can be accessed any where in any xaml
  3. Use assets and set the value to asset in process xaml and read the asset in set transaction

Cheers