Modelled Iterative (Looping) Deadlines

SAP

blog

Modelled Iterative (Looping) Deadlines

As we mentioned in a previous article on simple modelled deadlines, the deadline functionality is one of the efficiencies of SAP Business Workflow that can be used to help motivate end users to move a process along.  In many cases, that requires the sending of more than one reminder, or escalating the work item through one or more levels of the organisation.  One of my favorite gag jokes is that SAP Workflow can roll up the entire org structure and print a pink slip at the end.  Although I’ve never had to implement the pink slip, I regularly use iterative or looping deadlines to accomplish the escalation and frequent reminder requests.

To implement a looping deadline, the same four steps from a simple modelled deadline are required, with the addition of three further steps within the workflow template itself.  We now need the loop, a way to exit the loop, and a process control step to bring it all together.  

We need the way to start the loop before we put the loop step into the template.  By creating a new workflow container element, we can use that element as a flag to exit the loop.  I normally create a single character element of data type XFELD, and name it something like exit_flag, or similar.

Next, we create a loop using the loop step type.  The loop step is just set to loop until exit_flag = ‘X’ or some other random character you wish to use.  Once you place your deadline step in the middle of the loop, you then need to make sure you create a container operation to set the exit_flag to this random character so that the loop will exit once a decision has been made – on the rejected and approved outcomes, for example.

The last piece is to deal with the step on the modelled deadline.  On the deadline outcome, I use a process control step to set the deadline step to obsolete.  This activates another outcome for the step which allows the system to continue.  It’s on this obsolete outcome where you would place any logic about escalation or counting reminders, etc. 

For a brief tutorial on how to create these types of deadlines, feel free to check out our video on the same topic or comment below if you have any other creative solutions for the same business issues