How to pass a variable from a workflow to another in a state machine

Hello, i need to know how to pass a variable from a workflow to another in a state machine. I have a local variable inside a workflow 1 then i want to retrieve this variable as an argument in the invoke workflow to the state 1 of the state machine and last put that variable into another invoke workflow in a state 2 of the state machine.
If someone can help me with a screenshot or a step-by-step, because the way that i’m doing it its not working.
Thanks in advance

@bruno.silveira

Welcome to our uipath community.

Are you using REFramework ?

If yes then create one global variable in Main.xaml file. And assign that value to Argument and provide direction as Out to pass outside the workflow. And then assign it to this global variable. Now you can access this variable from any state.

No im not, im using a simple state machine and already did that, but the global variable is empty! i can only see the variable from the inside of the workflow 1 but not from the state machine

@bruno.silveira

If you pass value to other workflow then you need to create Argument but not Variable.

Arguments - will use to communicate between two different Workflows.

Variable - will use to communicate within the workflow.

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