how do i pass workflow scratchpad variables from the parent workflow to the child parallel flow?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2020 10:12 AM
how do I pass workflow scratchpad variables from the parent workflow to the child parallel flow?
these data are dynamic based on different interactions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2020 10:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2020 10:24 AM
If you want to pass any values to sub flow by using the Edit Inputs then you need to change the value of glide.workflow.enable_input_variable property to true.
Then using scratch pad you can pass the values to created inputs.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2020 12:25 PM
Hi,
Suppose you have one variable in parent workflow
workflow.scratchpad.var = 10;
And you want to pass this variable to child workflow.
Then for that you need to create input variable in child workflow from context menu. Select edit input in Child workflow context menu, and create input variable let say you create string type of variable i.e. child_val.
And Now from parent workflow click on child workflow you will see the input variable is created. And here you pass the parent variable like this $(workflow.scratchpad.var)
In child workflow you can access it in script like gs.addInfoMessage(workflow.scratchpad.var);
Follow the below step:
1)Parent Workflow
(i)
(ii)Parent Workflow Run script hold (workflow.variables.var) value
2) Child Workflow and in context menu select edit input and create one variable
(i)
(ii)Create variable by selecting edit input in child workflow
(iii)
After creating variable in Child workflow select child workflow from parent workflow and pass the value of parent to the input variable of child variable in created input variable
(iv)
And In Child workflow run script activity will print your parent variable value
And Publish both the workflow and triggered it.
You will get your value from parent to child.
Please Mark Correct/Helpful answer if it help you in any way.
Thanks and Regards,
Kunal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2020 12:45 PM
This works but to access the value in the subflow you have to use either workflow.variables.u_child_val or workflow.inputs.u_child_val. The workflow.scratchpad values are not accessible - i.e. workflow.scratchpad.var.