cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger REST Get when status is completed

deeps
New Contributor III

I’m working on a task that involves calling a REST GET request to check the status of a process. Once the status is marked as ‘completed’, I’ll need to trigger another REST GET request to proceed with the next step.Could you point  on the best way to implement this?
Attaching below pipeline, highlighted section I am repeating the steps to make sure status changes to Complete before I trigger Zip File Read. 
Tried has_next property like status!=‘completed’ and provide the next URL, but didn't work.

deeps_0-1722540725423.png

 

Your assistance would be greatly appreciated.Thank you!

1 ACCEPTED SOLUTION

deeps
New Contributor III

@koryknick  Using http client snap solved the issue 

View solution in original post

6 REPLIES 6

koryknick
Employee
Employee

@deeps - you might want to check the return from that first REST Get - my guess is that you are still getting the document of the "non-completed" status check.  So you will probably just need a Filter snap to discard the documents until the "Completed" status is returned.

Hope this helps!

deeps
New Contributor III

@koryknick I tried filter snap and in RestGet added condition in Has Next section $entity.status!='completed', but for some reason it's not looping until condition is met, always status is in progress. 
Note - When run in Postman status changes to complete within 30 seconds. 

deeps_0-1722702461915.png

 

koryknick
Employee
Employee

@deeps - please provide the output from your first REST Get- it is best if you can export it as JSON and attach the file to this post.  

deeps
New Contributor III

@koryknick I am attaching REST Get and Mapper output. Thank you