SteveC
SteveC

Reputation: 16813

How long will a Logic App continue to check a HTTP 202 Accepted response?

How long will a Logic App continue to check a HTTP 202 Accepted response?

With the "Asynchronous Pattern" setting enabled, calling an endpoint that continues to return a HTTP 202 with a valid "location" header

Will the logic app just carry on for ever ?

Upvotes: 5

Views: 2857

Answers (1)

Mandar Dharmadhikari
Mandar Dharmadhikari

Reputation: 1119

This will depend upon the combination of the asynchronous pattern flag and the time out specified on the HTTP action. Consider following scenarios

I have a long running orchestration which basically has a delay of 5 min before echoing back the received message. Notice in the image below that I have set the aysnchronous flag to true hence the logic app returns a 202.

Long Running Logic App

Now in my calling logic app, I am calling above long running logic app with following settings on my the HTTP action. HTTP Action to call the Long running process

This setting will cause the Logic app to time out after polling the long running logic app for 1 minute. I have added a status code of 500 to be sent out if the HTTP actions fails or times out.

Send 500 after time out

Following is the request I made it returned a status of 202

enter image description here

When I did a GET on the url received in above call after 1 minute I received a 500 Status code

enter image description here

Following is the Logic app run history, which shows that the Logic App stopped waiting after 1 Minutes of polling

enter image description here

Now I have removed the Timeout defined previously and made a request as shown below enter image description here

After 5 minutes I have received a response as Logic app has reached a terminal state. enter image description here

The logic app history proves that the logic app took 5 minutes to complete

enter image description here

Upvotes: 5

Related Questions