171
Views
2
Comments
Solved
The timeout defined in the Rest API
Question
  1. How many tries are made by the outsystems to send request payload to external server?
  2.  Also how much time interval is there between the consecutive tries made by the outsystems?
  3.  Could we extend the number of tries or not? 
2020-03-12 15-06-24
Steven Decock
Solution

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?

2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

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

2020-03-12 15-06-24
Steven Decock
Solution

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?

2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.