cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot Figure out how to share Data between Workflows

I feel like this should not be that hard. I just want to have a Parent Workflow Kick off a Child workflow, while sending some simple data back and forth. I assumed i would be using the Store and Retrieve Data Actions.

My steps are

  1. Store Data: Approver Name
  2. Start Child WF
  3. Retrieve Data from Parent: Approver name
  4. Run Approval Process
  5. Store Outcome
  6. End Child Workflow
  7. Continue with Parent Workflow
  8. Retrieve Data from Child Workflow: Outcome
  9. Proceed

  • Where in my child workflow do i find the variables i stored in the parent workflow?

I have read the post by Emily Billing and Vadim Tabakman 's blog but it has not clicked. Can someone attempt to dumb it down for me?

Thanks

Matt

Labels: (1)
0 Kudos
Reply
6 Replies
Workflow Hero

Re: Cannot Figure out how to share Data between Workflows

Hi Matt,

Within the child workflow create the variables you require and ensure that the 'Show on Start Form' option is ticked:

Within the parent workflow the 'Start Workflow' action will have 'Start data' fields which require data:

Does this help?

Barry.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Cannot Figure out how to share Data between Workflows

YES, Barry, that definitely helps me get further toward a solution.

I did not know about that! Why was this information so hard to find? grrrrr

So now i can pass an varApproverName to the child approval workflow (which can be reused). I will also send the parent workflow instance ID to the child workflow.

Now the only thing left to figure out will be how to pass what the approval outcome from the child wf back to the parent to continue processing the rest of the parent.

Accept as Solution Reply
Workflow Hero

Re: Cannot Figure out how to share Data between Workflows

Hi Matt,

You can use the Store Data action to store the outcome in your original parent workflow. As you have passed this workflow ID into the child you would define the Store Data action with that ID in the "Workflow instance to store to" then just define the "store as" (this will be whatever name you want - doesnt need to be defined as a variable) and the outcome variable as the "variable to store".

Then on the Parent, use the Retrieve Data action to run on the "Current Workflow", retrieving the defined Stored data (the same name as the child stored data item) and put it into your desired workflow variable.

Cheers,

Mark

0 Kudos
Accept as Solution Reply
Not applicable

Re: Cannot Figure out how to share Data between Workflows

It took a long time to understand that you could just give the "Store As" field any piece of text, and then as long as you use that same piece of text in the Restore Data - "Store as" field, both workflows can use it. I find the documentation lacking on this. You can not see this mysterious variable anywhere. This method does not seem to be fully baked into the product, as i would expect there to be a tab next to the options of (Item Proerties, Variables, Parameters, Functions)

Eitherway, I understand and get how it works now. Thanks for taking the time Mark, and Barry.

matt

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Cannot Figure out how to share Data between Workflows

Hi Matt,

Glad to help. I usually prefix my stored data "variables" with a "SD" to distinguish them as being Store Data items. Perhaps the long term plan is to roll these into the same definitions as the other properties, variables etc.

Cheers,

Mark

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Cannot Figure out how to share Data between Workflows

Hi Barry,

I think I am missing something.  In your previous post, you suggest to create a variable on the child workflow and ensure 'Show on Start Form' option is ticked. Then the parent workflow 'Start Workflow' action will have 'Start data' fields.  I added a variable with 'Show on Start Form' ticked in my child workflow, but I do not see a 'Start data' section in the 'Start Workflow' action of my parent workflow.   Any ideas why Start data may not show?  I also don't understand how one workflow would know about variables in another workflow.  

0 Kudos
Accept as Solution Reply