Software AG Products 10.7 | Administering and Monitoring Business Processes | Task Engine User’s Guide | Task Expression Reference | About Global Rule Expressions | Expressions for Default Global Rules | Infinite Loop Rule
 
Infinite Loop Rule
This rule places a task in Error status when the one-hundredth version of the task is created. You can edit the expression for this rule to specify a different number. For more information, see Working with Global Task Rules.
Condition Expression:
#{oldTask.taskInfo.taskVersionNumber} == 99 &&
#{newTask.taskInfo.taskVersionNumber} == 100
Result Expression:
#{currentTask.taskInfo.status} = "error";
#{currentTask.taskInfo.errorCode} = "task.error.infinite.loop";
#{currentTask.taskInfo.errorMessage} = "Task has
reached maximum number of modifications"; #{currentTask.applyChanges}