Retry an HTTP Get if a specific value doesnt match

I have an API that I am using the HTTP Connector to generate, and then get a report. 

The flow starts by creating a POST to request the report, and in the response an ExportRequestID is received to acknolwdge a report will be generated. 

The next step is to check if the report is ready with a GET request, and from this I need to get an ExportID.. If the report is not ready, I need to wait, and then check again. The report is ready when either the ExportID is populated or a status has updated to Completed. 

I am not sure how to achieve the desired result, any suggestions would be helpful. 

0

Comments

4 comments
Date Votes
  • Hey Ross!

    I've done some retry loops but not with same detail as you.  One idea I had was if you take your ExportRequestID and drop it into a file someplace. You would have a second second flow that exports that file and checks to see if the report is complete.  If it is great. If not, then dump that exportRequestID back into that same location again. So, you make a sort of while loop that ends by not writing the file back.

    Hope that spurs some ideas for you.  

    1
  • Thats a clever idea David, I will give that a try. 

    Thanks mate

    0
  • Thanks so much for sharing that suggestion, David Gollom! Ross Orr , let us know if that doesn't work!

    0
  • Let us know how it goes!!  

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post