Ensure serial child pipeline execution

On the Pipeline Execute snap, if I have the Reuse checkbox unchecked and the pool size =1, does that ensure the executions of the child pipelines are serial and not parallel? I want to ensure only one instance of the child pipeline is running at any time and that one execution completes before another begins.

Yes, a pool size of 1 means that only one child will be executed at a time and the Pipeline Execute snap will wait for the current child execution to finish before starting the next one.

2 Likes

But the drawback is you can’t leverage the parameters dynamically in this particular scenario.

Can you elaborate? The OP mentioned that reuse was off, so the parameters passed to the child pipeline can change for each execution.

2 Likes

Actually we’ve developed a reusable component - service to reprocess failed transaction and then individual interface pipelines. In case of failures with interface pipelines, we will use the re-processing service to resend the failed transactions. By using pipeline execute in the reprocess service we want to achieve parallel execution on different failed pipelines with each failed transaction calling individual interface pipeline sequentially.

We get parallel execution of each pipeline and sequential processing of documents in the order of input (with reuse option set to 1), but this does not support change in pipeline parameter values. Hence we will have to send the payload, runid and parameters as input documents instead of pipeline parameters.

We’ve raised a ticket 20085 for this issue. If you’ve a solution for our situation please share will be really helpful.

The documentation is clear in this aspect. If it is not, please mention what to improve upon.

If Reuse is enabled, pipeline parameter values cannot change between execution instances.
If Reuse is disabled, you can pass different parameter values.

If you want the parameters to be changed with reuse checked, then that is something an enhancement which may not be possible just by the design of this; which Product Management can elaborate.

Hope that makes sense.

That’s precisely our requirement is, just a minor follow up question - can for each snap help us here .

OK, so does tstack’s first comment still hold true and parameters can be used to change the input to the children since the Reuse is not checked?

Yes, a pool size of 1 means that only one child will be executed at a time and the Pipeline Execute snap will wait for the current child execution to finish before starting the next one.

That’s correct. Sorry for hijacking the thread with my problem statement :frowning:

No worries. Thanks for all the help everyone.

What is the best way to ensure order of processing, e.g. pipeline a always starts and ends before pipeline b starts?

Place them in pipeline executes one after the other.