For both actions, the Store Data and Retrieve Data, you need to tell them which workflow instance to use. Every time a workflow runs, it is given an instance ID. If you were to run a workflow, navigate to the workflow history and then look in the address bar in Internet Explorer. The number at the end is the WorkflowInstanceID.
You can store data in the current workflow instance, or you can specify a workflow instance ID using a variable. Then you give it a key and a variable which contains the data.
Think of it as a dictionary to which you are providing definitions.
“Key1” = “My data”
"Key2” = “Their data”
To get the information you need, you use a RetrieveData action, and if you need the value of Key2, that’s what you ask for and you will get “Their data”.
A good example is your scheduled workflow.
The workflow would run, and then you use a Store Data action, which is configured to store data in the current workflow instance. It would store the result in a key called “MyResult”.
This action works almost identically as the Store Data, but in reverse.
Here you specify the current workflow instance, or an instance ID; the key for the data you want to get back, and the variable you want to store it in.
In the above example using a scheduled workflow, rather than the current workflow instance, you’ll need to find the actual workflow instance ID of that scheduled instance run.
For the item the scheduled workflow is configured for, add a hidden field and store the Workflow Instance ID in your Scheduled Workflow. Then in your List workflow, you can use a Query List action, get that workflow instance ID and use that in the Retrieve Data action.
So the hardest part, is making sure you have the ability to get at the Workflow Instance ID for the workflow instance that has stored the data.
would you be so kind and provide a hint/example how to handover workflow instance ID between parent and child workflow in case of site workflows when there is no list item that could be used as a data bearer?
I was looking for a way how to identify parent workflow instance ID from child one but unfortunatelly haven't find any.
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.