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

All these are REST API Get/POST jobs

What do you mean by โ€œqueue upโ€ here? Is the queue in an external service and the children are pulling from there? Maybe Iโ€™m misunderstanding.

I guess I would expect the parent pipeline to pull from the queue and let the PipelineExecute snap distribute documents to child executions.

Sorry, Iโ€™m having trouble visualizing the parent and child pipelines here. Would you be able to attach a screenshot of them or an SLP export?

Yes. Its external (Marketo) service.Parent submits a bulk job and in the response object we get a exportID. We have to keep checking the status (REST Get Call to Marketo) of this export job thru another Marketo endpoint which happens in a child pipeline. This child pipeline should be running in while loop kind of thing till we get a success/failure response. Picture of child pipeline attached.

49%20PM

psadasivam
New Contributor III

@MuraliNagula - This can be achieved using "Has next "and โ€œNext URLโ€ properties. Below rest snap invokes Next URL based on Has next flag. You can refer Snap documentation for more info.

image

I just wanted to add on that you should set the โ€˜Pagination intervalโ€™ as well so that the requests arenโ€™t made too quickly.