Nuxeo Server

Escalation Service

Updated: November 13, 2017 Page Information Edit on GitHub

The Nuxeo workflow engine comes with an escalation service useful for having some automated evolution in the workflow graph.

Principle

It is possible to set escalation rules on a given node. An escalation rule has:

  • A name,
  • A condition (MVEL based expression),
  • An automation chain id,
  • Multiple execution properties.

The escalation service periodically queries for all suspended node (a node is suspended while the engine is waiting for all tasks originating from the node to be completed). For each suspended node, it fetches all its escalation rules. It verifies the condition and if it is true, it runs the corresponding automation chain.

Functions

The following functions are available in the Escalation Rules Expression Editor of a node, so as to simplify rule expression:

  • WorkflowFn.timeSinceTaskWasStarted(): returns the time difference in milliseconds between the current time and the time the current workflow was started.
  • WorkflowFn.timeSinceWorkflowWasStarted(): returns the time difference in milliseconds between the current time and the time the current node was started.
  • WorkflowFn.timeSinceDueDateIsOver(): returns the time difference in milliseconds between the current time and the task due date.
  • WorkflowFn.timeSinceRuleHasBeenFalse(): returns -1 if the current rule hasn't been executed or the execution date was not set on this rule or returns the time difference in milliseconds between the current time and the last time the rule was executed ( equivalent to the rule being evaluated to 'true').
  • WorkflowFn.ruleAlreadyExecuted(): returns 'true' if the current rule has already been executed.

Example of Conditions For Escalation Rules

Remind Every Day as Soon as Task Due Date is Over

@{(WorkflowFn.timeSinceRuleHasBeenFalse()==-1 && WorkflowFn.timeSinceDueDateIsOver()>0) || (WorkflowFn.timeSinceRuleHasBeenFalse()>86400000)}

Remind Every 60 Sec as Soon as the Task Has Been Assigned

@{(WorkflowFn.timeSinceRuleHasBeenFalse()==-1 && WorkflowFn.timeSinceTaskWasStarted()>60000) || (WorkflowFn.timeSinceRuleHasBeenFalse()>60000)}

Rules Evaluation Frequency

Rules are evaluated by default every five minutes. You can override the related scheduler contribution if you want to change it. You may want to reduce the frequency while you are doing the configuration, but then don't forget to set it back to a reasonable value when in production!

<extension
 target="org.nuxeo.ecm.platform.scheduler.core.service.SchedulerRegistryService"
 point="schedule">
 <!-- every 10 seconds -->
 <schedule id="escalationScheduler">
 <eventId>executeEscalationRules</eventId>
 <eventCategory>escalation</eventCategory>
 <cronExpression>0/10 * * * * ?</cronExpression>
 </schedule>
</extension>
4 days ago manonlumeau Added content-review-lts2017 label
a month ago manonlumeau NXDOC-1346-FT review screenshot
2 years ago Manon Lumeau 24
3 years ago Manon Lumeau 23
4 years ago Solen Guitter 22 | Format
4 years ago Jean-Christophe Melaunay 21
4 years ago Jean-Christophe Melaunay 20
4 years ago Jean-Christophe Melaunay 19
4 years ago Jean-Christophe Melaunay 18
4 years ago Jean-Christophe Melaunay 17
4 years ago Jean-Christophe Melaunay 16
4 years ago Jean-Christophe Melaunay 15
4 years ago Jean-Christophe Melaunay 14
4 years ago Jean-Christophe Melaunay 13
4 years ago Jean-Christophe Melaunay 12
4 years ago Jean-Christophe Melaunay 11
4 years ago Solen Guitter 10 | Format
4 years ago Alain Escaffre 9
4 years ago Solen Guitter 8
4 years ago Mariana Cedica 7
4 years ago Solen Guitter 5
4 years ago Solen Guitter 6
4 years ago Solen Guitter 4
4 years ago Alain Escaffre 3
4 years ago Alain Escaffre 2
4 years ago Alain Escaffre 1
History: Created by Alain Escaffre