Hello,
I want to pass a value from a parent workflow to a child workflow. In the parent workflow, I have created a single value. That value will be passed to the child workflow, to create a report with the selected results.
Thanks,
John Wong
I have attached 2 sample workflows: parent workflow and child workflow. In the parent workflow, the value "IT" is selected. I want that value to pass to the child workflow, so that the list of values from the childworkflow table is displayed
Hi @lbjohn ,
You can possibly do this using the concept of Chained Apps.
Please find attached a sample workflow to showcase that. The parent workflow runs the child workflow on success and also passes the filter value using a temp file.
Hope this helps.
Best,
Jagdeesh
Hi @lbjohn
If you want to only send values you can do something like this.
Parent Workflow: write output to a file
Child workflow: read the file and do an inner join this way only the value outputted from a parent will be selected in inner join.
If this is not what you are expecting please provide us more info.
Hope this helps : )
Thanks, However, the use of an interim file will not work. As I will have multiple users using the parent workflow at the same time.
To think out loud, is there a way to run a workflow with a pass through parameter, that works for multiple users using the workflow at the same time? I know I can run a workflow as an app, with human input values. The question here is how to do it without a human input.
Here I have updated the Parent workflow and make it an app. User would select a department from Parent, I want that value to pass to Child, and create the report at the end based on the pass through value
Hi @lbjohn ,
I am assuming that all the users would be using this on the Server/Gallery?
If that is true, then the solution in my earlier post should work. I say that because a different working directory is created for each run. This in-turn creates a different temp file for each run. This is made possible by having the temp file as part of the same directory structure as the workflow.
The folder structure would look like this:-
The inputs.outputs folder contains the temp output file:-
The workflows folder contains the apps:-
Hope this helps.
Best,
Jagdeesh
Thanks. How do you set the name and path for the input temp file in the Child Workflow, so it knows which temp directory and which file to pick?
Hi @lbjohn ,
You can using the concept of relative paths to achieve this. In the sample i have attached, it is setup that way.
Please find below the screenshots on how to do it.
Parent Workflow settings:-
Child Workflow
Hope this helps.
Best,
Jagdeesh