Configuring Retry Logic
  • 26 Apr 2022
  • 1 Minute to read
  • Dark
    Light

Configuring Retry Logic

  • Dark
    Light

Article Summary

Overview 

Flows can be configured to rerun In the event of an Exception or Failed Action (for Scheduled Jobs) through various ways. One method is achieved via use of user-defined criteria that determines whether or not the Flow should loop back to a desired point within the logic. One such criteria could be the number of how many iterations the Flow has followed.

The following document demonstrates how to employ retry logic by using a Greater Than (Number) Rule to compare the number of times the Flow has followed the On Exception path. 


Example

  1. From the Flow Designer add a Create Data step before a step with a pre-configured On Exception path. 
  2. From the Properties tab of the Create Data step, select SHOW EDITOR. In the resulting Data to Create window, input "RetryCounter" in the NAME field, and select Decimal [Number] from the TYPE dropdown.

    Under INPUT, Constant map a value of "1". Then, Save and close the window. 
  3. Attach an Add step from Properties > DATA > NUMBERS, to the On Exception path.

    From the Properties tab of the newly added step, map RetryCounter to Value1, and Constant map "1" to Value2.
  4. From Properties > OUTPUTS, set Output to Change Value.

    Then, PICK RetryCounter; this will allow the step to increase the value of the RetryCounter on each iteration of the On Exception path. 


  5. On the Done path of the Add step, attach a Greater Than (Number) Rule from DATA > NUMBERS.

    Map ReturnCounter to INPUTS > Value1. Then, Constant map the desired number that the number of returns will be checked against (in this example, "5"), to Value2.


  6. Attach the True path of the Greater Than (Number) to the End step, and the False path back to the point in the Flow after the Create Data step. 


  7. Save the Flow, then if desired close via X

Debug

  1. From the Flow Designer, Debug the Flow.
  2. Ensure that allowing the Flow to reach an Exception results in the Flow following the On Exception path to the Rule, and subsequently restarting from the point after the Create Data step. 
  3. Allow the Flow to rerun and the RetryCounter value to exceed the amount defined by the Greater Than (Number) Rule, and to complete via the True path. 

For further information on Flows, visit the Decisions Forum.

Was this article helpful?