Wait for HTTP request completion

Hi all !

My organization is using custom tasks to perform http requests to some API servers. These tasks seem to complete before the output variable is initialized with the response value, which can be an issue when I want to use this value in other tasks. I guess API calls should have been asynchronously performed in order to wait for the response before the task is completed, but for the moment I don’t want to rewrite these custom tasks.

Is there any way I can wait for my http request to be completed before the execution of my other tasks ? I am new to XLRelease, so I just have some leads so far :

  • Gate task dependencies, but I don’t think that could work for anything else than a release identifier ;
  • Next task failure handling, as I could check the variable value and redo the task if the variable is uninitialized (maybe not the best way to do it)
  • Some script that would check the http status or the response value before going on with the other tasks (with some loop, sleep time and a timeout maybe)

What is the proper way to do it ?

Thank you all, bye !

Misinterpretation here, the variable was actually initialized, but the API wasn’t responding properly to the next call.