08-02-2018 01:50 PM
I have a pattern where I run a REST POST api call and then need to run a REST GET to see if the request has completed. I need to somehow loop back to run the REST GET again if it isn’t done.
Recommendations on how to handle this pattern?
Solved! Go to Solution.
08-10-2018 05:22 AM
Incredible. It was right in front of me all along. 😎
So here are the pictures.
This is the API response. (in this case I need status = success. It tells me I can go get the data)
This is how I set up the Rest GET Snap. I have Has next set to try again if status <> success.
Hopefully this won’t be as painful for you as it was for me!!
08-07-2018 08:11 PM
You are welcome…
08-09-2018 10:54 AM
ok this is weird. When I put it in my pipeline I am getting this error message.
Pipeline failed to prepare
Reason: java.lang.StackOverflowError
Resolution: Please address the reported error
The snap it is failing on is not in the loop section at all. It is the directory browser.
Has anyone seen this and what is the fix. Also if I break the router and union connection. It works.
08-09-2018 01:26 PM
I had that error too…
I was intrigued by the looping logic mentioned in the thread above because I had never seen or thought about doing something like that. But when I put together a simple pipeline to try and test it out (see below) I get the same StackOverflowError when trying to run or validate the pipeline.
As far as the snap it is failing on, I think it just mentions the first snap, but really failed trying to prepare the pipeline, not necessarily with the first snap…
08-09-2018 03:35 PM
The way to address this one is to use the REST GET Snap, and use the HAS NEXT functionality. You can make it iterate until the correct response is received.
(You may not have a loop in a pipeline)
08-10-2018 05:22 AM
Incredible. It was right in front of me all along. 😎
So here are the pictures.
This is the API response. (in this case I need status = success. It tells me I can go get the data)
This is how I set up the Rest GET Snap. I have Has next set to try again if status <> success.
Hopefully this won’t be as painful for you as it was for me!!