Thanks for sharing Cassy Freeman!
I posted a new User Voice idea to combine the Store Data functionality with the Start Workflow action: Combine Store Data action with Start Workflow action – Customer Feedback for Nintex
Vote it up if you want to see it implemented.
Hi Cassy,
Thanks for this. If you are doing the retrieve on the parent workflow, don't you need to wait or pause before you retrieve to ensure the child workflow completed and actually stored the data?
Can you use the store/retrieve the other day, to pass information from the parent to the child? Or is there a better way? I have seen people build an association data string and then pass that to the child workflow (not using Start Workflow action but the Web Service action and configuring it to execute another workflow with the association data).
Also, am I missing something or would you need to do a store/retrieve for every single variable you want to pass?
In the start workflow option you have the option to wait for the workflow to complete before moving on in the workflow so a pause is not necessary.
i will check tomorrow but I am sure you can pass multiple values in the store and pull multiple values in the retrieve but I will check tomorrow.
Again - You can pass it either way (parent to child or child to parent) - again will double check that tomorrow.
Thanks
OK so here is the setting I was telling you about in "Start workflow" action that will ensure you do not need a pause - will wait for the child workflow to complete before moving on in the parent workflow:
To clarify the other question - NO cannot use store and retrieve the other way around as there is no way the child workflow will know the "workflow instance ID" of the parent that is required in the "Retrieve data" action.
In the above screenshot the workflow I chose to start does have a variable that is on the start form and is required. This is one way of being able to pass a value from parent to child. Set up your child with a variable that is shown on the start form and then when you use the "Start workflow" action in your parent workflow, add your parent workflow variable data as the start data for the child workflow.
Apologies - when I was thinking about it in my head it seemed like it should have been possible the other way round but alas no.
Also - multiple values - looks like can only store one per "Store data" action, so you would need to use multiple "Store data" actions to store multiple values. This seems like an oversight to me to be honest, so I have looked on uservoice and suggest voting up the feature request here:
https://nintex.uservoice.com/forums/229405-1-nintex-workflow-for-sharepoint/suggestions/18622303-allow-multiple-values-in-store-data-action
and similar idea you might like to vote up here:
https://nintex.uservoice.com/forums/229405-1-nintex-workflow-for-sharepoint/suggestions/17891656-combine-store-data-action-with-start-workflow-acti
to handover multiple variables between/among workflows one can build a single XML message that holds all the variables to pass through.
then within workflows simple Query/Update XML can read and or change values of these variables.
great shout as always, !
Thanks Cassy,
Your willingness to come back later and write with such detail is very appreciated!
Thanks for clarifying that the Store/Retrieve is only applicable one way.
That's what I thought I was seeing with the Store action as well, and I agree that is quite limiting especially in a complex workflow.
I will upvote those ideas as well.
i agree that the child cant detect which workflow instance ID to retrieve data from parent. but beside store and retrieve data, is there any other possible way to pass value from parent WF to child WF? as my WF is really big so it is better to break it down to several smaller WF, easier to handle and maintain as well.
i saw somewhere they use 'start data' in Start Action field but i dun find any 'Start data' field in my Start Action WF.
Hope to hear from you soon! Thank you!
Hi Jen
I think the start data is when your child workflow requires variables on start - does that make sense?
Hi Cassy,
is there any possible way to pass variable from parent to child WF?
Thank you!
Yes it is possible - are you able to post your specific requirements as a new question in and I (or someone else) will come back to you with some screenshots of how you may approach your problem.
Hi Cassy,
I need small Clarification. Her eyou are trying to get the data from child (workflow which you started from main wf) to main (workflow from where u called child) right?
And Retrieve will be in Child workflow and Store / Start Workflows will be in Main workflow?? Am I correct. please correct me if I'm wrong! I'm not clear, It is so confusing for me. Please help. I need these actions in my workflow.
Thanks
Divya
the main workflow starts the child workflow.
the child workflow stores the data
the main workflow retrieves the data from the child workflow
Very useful post, thank you!
It's been a while, now ... do we have any way to pass information from parent to child?
yep - if you have "starting variables" in child you can add them in your start workflow action.
Thank you for your helpful article; I"m trying to adjust your idea with my workflow:
In my state: i need to send data from the main, workflow to the children.
the start workflow action is on the main workflow and not in the child WF.
if I flow your process: I need to store data, the main WF; add the action start WF with the instance ID of Main WF.
when I go the child WF, I need to retrieve the data that I stored in the main. So here I'm facing a problem with the retrieve Data, i can't find the variable if instance ID in the child WF.
Any idea How can I proceed /
Thank you .
can you ^please give more information about the" build a single XML message" and how can we used in the childWorkFlow.
just build up your own XML message that you will handover among workflows. the structure is fully up to you.
it may eg look like
<?xml version="1.0" encoding="utf-8"?>
<Variables>
<Title>this is title</Title>
<Name>this is name</Name>
<Department>this is department</Department>
</Variables>
Hello Cassy,
I appreciate your dedication and support as a followup to very uselful article. I am calling a child workflow and trying to pass three parameters from the parent (Person, 4 strings) but the child wf log shows them empty therefore the Task assignment fails. Any idea/tip what am I missing here. Cassy Freeman
Looks fine to me. are you sure those have values in them? (Form No, Approver3, Approver3ID, Approver3Name)?
Can you log to history just before your start workflow action to check?
Yes they do have values and I spitted them on both sides and parent was logging but not the child. So, I decided to create a miniature version of it teeny tiny form by passing in different data types and it was working. Reverted back to the project deleted the start workflow component and reconfigured and published and its working now.
Thanks,
I thought it had resolved but some approval lines still had the issue and after comparison I found that the Task Name which I was building with static and dynamic text was causing issues and once changed to static text the issue resolved for good.