OutSystems doesn't do automatic retries to consumed REST API's. If a REST call fails, it will raise an exception and your server action will fail, without retrying.If you want to implement automatic retries you could either:- Create a Server action calling your API, catching the exception in which case you want to retry. Have that server action return an output parameter IsSuccess = False in that case. Call this server action from another server action that will retry the call x times as long as IsSuccess = False.
- If the REST call can be done asynchronously, you could use a BPT process for this, that has retries built in to the system.
I do wonder why you want to do retries like this? Because typically, if it fails the first time, it will very probably fail subsequent times, especially if you retry right away.
I hope this answers your question?
Hi,
i recently created an extension using the Polly .net library for a thread safe wait and retry pattern. For now, it only supports a http get request (typically you need that to poll for job status updates until you get the final result). Let me know if you would also need other HTTP verbs like Post, Put asf.
For instructions, please find my article here https://medium.com/itnext/resilient-api-status-polling-in-outsystems-with-polly-79967cbea4df
I also created an idea for adding a resilient wait and retry pattern directly to the platform and would be happy if you upvote it. https://www.outsystems.com/ideas/13083/resilience-and-fault-handling-policies-for-rest-consume/
Best
Stefan