Hierarchy
- ProcessTimer
Properties
Readonly id
ID of the timer.
Readonly ownerId
ID of the activity that the timer is set in.
Methods
interrupt
-
The method interrupts an active timer in a process.
You can skip an active timer. In this case, the business process will move on to the next activity on the process diagram. If a timer has already gone off by the time the method is executed, the script is interrupted with an exception. The example shows a timer set in the BPMN element with the ID
diagram-element-uuid
and how to interrupt it. You can find the ID of the BPMN element you need by opening the settings of the Timer activity and copying it from the address bar. It’s a regular UUID formatted as a string.// `instance` is a variable containing the data of a launched business process instance const timer = await instance.getTimer ('diagram-item-uuid'); if (timer) { try { await timer.interrupt(); } catch (e) { // The timer has already gone off, so the exception is processed } }
Returns Promise<void>
Active process timer instance