-
Notifications
You must be signed in to change notification settings - Fork 48
Timers
All Timers are persisted, therefore, if the Node.js session is restared timers will pickup where they left
<timerEventDefinition>
<timeDate>2011-03-11T12:13:14Z</timeDate>
</timerEventDefinition>
Example (interval lasting 10 days):
<timerEventDefinition>
<timeDuration>P10D</timeDuration>
</timerEventDefinition>
Example (3 repeating intervals, each lasting 10 hours):
<timerEventDefinition>
<timeCycle>R3/PT10H</timeCycle>
</timerEventDefinition>
Time Cycle accepts both ISO 8601 format and Cron format
Example for cron format:
<timerEventDefinition>
<bpmn:timeCycle xsi:type="bpmn:tFormalExpression">5 * * * *</bpmn:timeCycle>
</timerEventDefinition>
bpmn-server allow you to modify the timer behaviour during development without changing bpmn definition
By changing the configuration.ts to force timers to specific time
let definitionsPath = __dirname + '/processes/';
var configuration = new Configuration(
{
definitionsPath: definitionsPath,
timers: {
forceTimersDelay: 1000,
precision: 3000,
},
Event Type | TimeDate | Duration | TimeCycle | TimeCycle Repeat |
---|---|---|---|---|
Start | NA | NA | Yes | Default |
Intermediate | NA | Yes | Yes | NA |
Boundary Event | NA | Yes | Yes | Yes |
-
Start Event support 'Time Cycle' only since duration and timeDate make no sense.
-
Intermediate Events are implemented as a normal event, will start the timer at start of the node and once the timer is completed the node will end.
-
Start Event Timers will start a new execution, therefore, they are scheduled by a cron job managed by bpmn-server.
- All start event are re-evaluated and reschedules
- other events that are in wait state are re-evaluated and reschedules