bur@celf.dk

UDA as Safe Looping alternative

Blog Post created by bur@celf.dk on Mar 31, 2015

Problem:

Wanting the safety of safe looping enabled, but not wanting the five minute delay at every loop or at every statemachine shift.

 

Solution:

Use UDA to implement escalating safe looping

 

Steps:

1)

Disable safe looping at central admin (of course, at your own risk)

 

2)

Create UDA as follows:

     Parameters:

          "Number of iterations before pause" (integer) (input)

          "Number of minutes waittime" (integer) (input)

          "Counter input" (integer) (input)

          "Counter output" (integer) (output)

     Workflow:

          Math operation: Add 1 to "Counter input" and store in "Counter output"

          Run if: "Counter output" > "Number of iterations before pause"

               Pause: Wait for "Number of minutes waittime" minutes

 

 

 

3)

Use the above UDA as first action in every state in every statemachine and as first action in loops.

Add variable "Safe looping Counter" (integer) to workflow.

 

4)

Configure the Safe Looping UDA (screenshot from Danish setup)

 

          "Number of iterations before pause" = (value) (integer)

          "Number of minutes waittime" = (value) (integer)

          "Counter input" = (workflow data) "Safe Looping counter"

          "Counter output" = "Safe Looping counter"

 

In the above example, the workflow will loop 2 times with no delay, and after that it will continue to loop every 30 minutes.

 

Remarks:

Remember to add the UDA to your workflow in the right places, or else it will have no effect.

Remeber to reset the "Safe Looping counter", as shown in the screenshot above, before each use.

 

Benefits:

Quick and responsive workflow, even with many states shifting or looping, with the added security of a "pulling the brake" mechanism if the workflow for some reason starts to loop endlessly.

Outcomes