cancel
Showing results for 
Search instead for 
Did you mean: 

How to replicate the logic equivalent to while loop in Snaplogic pipelines

MuraliNagula
New Contributor

There is a child pipeline which returns values like completed, in queue, processing etc. The requirement is that parent pipeline to run this child pipeline till it returns Completed, of-course after certain wait time. Its like while loop, run the child pipeline, till the expression is true. How do accomplish this in snaplogic ?

Appreciate any pointers…

14 REPLIES 14

christwr
Contributor III

I’ve seen people suggest creating a Triggered Task for the child pipeline, and then have the parent pipeline call the child pipeline via REST GET snap and use the REST GET snap’s “Has Next” and “Next URL” capabilities (typically for paging) to do a while loop. The child pipeline has to return something that the parent “Has Next” can evaluate.

How and where do set these “Has Next” and “Next URL” in the triggered task ?

tstack
Former Employee

Can you explain what processing you’re doing? Maybe focus less on the mechanics so that we can understand the use case.

The parent pipeline queues up a bulk job to export records. The child pipeline keeps getting the status of the job every 60 seconds to get the status till it reaches its end state. I have tried to put everything in the parent pipeline but looks like child pipeline is the best way to go.