How to re-initiate calling the rest message from flow/sub flow whenever error/400 status received?

KM SN
Tera Expert

On 10th action in below sub flow I am calling the rest message there is a possibility that I may receive  400 saying request is not created from third party or general error.

 

If I got the 400 or error, I should not move to next step instead it should wait for fixing the issue caused due to 400 or error and then should re-initiate the same 10th action once after successful status code i.e. 200 I need to move to next logic inside the flow.

What are the different ways I can implement here following best practices in ServiceNow?

flow-7.png

7 REPLIES 7

JenniferRah
Mega Sage

You can also check the results, and if it's a 400, use the Go Back To statement to go back and try it again. However, you need to be aware that you could get yourself in an infinite loop this way, so you should add a counter or something to allow yourself to get out of it after a certain number of retries.

I am not able to select this option neither in flow nor in sub flow, but I can see with read-only mode.

If you can't select it, then there might not be any viable statements for you to go back to. You can only go back to certain points (if statements, etc.). 

 

https://www.servicenow.com/docs/bundle/yokohama-build-workflows/page/administer/flow-designer/refere...