Unable to pass value from process state to end state

Hi All,

I am trying to pass a value from process state to end state using str_Sku_Id

In the main I created a variable out_SkuId= str_SKu_Id

Then in the End process I tried creating an in argument str_in_sku_id and mapped to the Main variable str_SKu_Id . But when I am running str_in_sku_id is giving me null values .

any help on how to get the value from process state to end process state

To get any values from Process State, you will have to make it global but still you will get the last value from the Transaction. as it goes to end state only if all the transactions are Processed. Better I will suggest to create a list and then add that variable to list one by one in the End of process State and you can use it later in end state.

@dutta.marina

If you are using windows compatibility project then I would advise to use Global variable for this.

With this you won’t have to worry about passing it from one workflow to another as global variable will be available everywhere in your project.

Hey @dutta.marina,

Use global in/out argument then in the process use the same variable as well as in the End processes let me know if you want a demo.

@Mir.Jasimuddin

Yes could you please provide screenshots. how to implement

1 Like

@dutta.marina,

Step 1: Create the argument in Main with direction in/out for Ex: “Your_Argument”

Step 2: Go to the Process You will find the “Your_Argument” and you can assign any value of same type.

Step 3: Go to End Process again you will find the “Your_Argument”

@dutta.marina

As per screenshots provided looks like the value is passed out of process.xaml to main.xaml and is stored in str_Sku_Id

if so the variables is already in main.xaml and end process is already in same xaml..so no need to create an argument in main.xaml as there is nothing that is calling it

you need to check the scope of str_sku_id and change it to main so it is accessible in end process state and process state as well…also check if there are multiple variables created with same name with different scopes

now coming to value being present if the process comes directly to end state from init due to exception or no data being present then the variable would be empty do consider that as well

Hope this is clear

cheers