cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline Execute - child pipeline return values to caller pipeline

deepak_shaw
Contributor

Hi,
How a child pipeline returns values to caller pipeline (in Pipeline Execute snap)
Thanks,
DK

6 REPLIES 6

Ganesh
New Contributor II

Hi,
Pipeline Execute snap’s output will be based on the input and output configuration of the child pipeline as follows,

  1. In case of open input and open output it will get the previous snap’s output document as input and execute the child flow once and return the open end snap’s output to the parent flow.
  2. In case of closed input and open output it will call the child pipeline for n number of times where n is the number of output documents from its previous snap and return the open end output snap’s value to the parent flow.
  3. In case of closed input and closed output it behaves similar to the previous case instead of passing the output it will give the ruuid and status as output to the parent flow.
    In all the above cases we could get the previous snaps output also as output under original field.
    Thanks,
    Ganesh. D

deepak_shaw
Contributor

Thanks Ganesh, for reply. Can you please share a sample?

tlikarish
Employee
Employee

Here’s a project that you can import to see how to call a child pipeline and get data out in a couple different scenarios.

Sometimes there is no output that a child will return. In that case, make sure the child pipeline has no open output view and the Pipeline Execute snap returns the status of the child pipeline execution. In this project, the pipeline called do-calculations calls two child pipelines that demonstrates this. After calling them, it checks the status and will fail on any pipeline failures.

Other times, a parent pipeline may need to get data back from the child. There are two “parent” pipelines temp-max and temp-avg that will call the pipeline get-temp to get some temperature data. The child executes and then returns documents that the parent pipelines use to calculate the max and average.

Let me know if these are helpful or if you have any questions about the project.

projects_check-weather.zip (9.2 KB)

Excellent example, thanks.