Skip to main content

 In my workbench I have a WKT that I send (using HTTPCaller POST) to an API. The API then runs a background model and I need to use a HTTPCaller GET to retrieve the json results via the same API. The model can take anywhere from 5 seconds to 3 minutes to run. When the model is still processing it returns a '202' status code and when it completes successfully with a '200' code. Right now, I have various decelerators, however, this slows down the entire workspace, I would like have the HTTPCaller wait or check for a 200 response and continue the rest of the workbench immediately.HTTPCaller

Hi @cstelow​, do you want to wait for the HTTP status code 200 or 200 features to come out from HTTPCaller output port?

If you are looking for some solution around to wait for first 200 features from HTTPCaller output port, then FeatureHolder can help you. Use group by functions

image


Hi @cstelow​ , how about creating a custom transformer performing HTTP request repeatedly until status would be 200?

The attached screenshot illustrates an implementation example. Be aware that you have to set 1 to the Maximum Number of Concurrent HTTP Requests parameter in the HTTPCaller within Loop.custom-transformer-httpcaller-loop


Reply