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.