Timer Event
Timer Start Event
In descriptive models, a Timer start event indicates a process run on some recurring schedule. In executable models, a process instance is started automatically on some recurring schedule.
Depending on configuration, the process can be started at a specific date and time or on a repeating schedule:
-
Specific date option triggers an event once and only once at, as its name says, a specific date
-
Cycle allows to specify an interval between triggering of an event and occurrences
It must be noted that the timer event supports two norms: ISO8601 and iCalendar Recurrence Rule.
To configure the event, use Attributes/Timer Event context menu action.
The cycle option is the most complete and complex of the three options available and offers great flexibility on when to trigger an event.
In the figure above, we can see that a start date can be set. At the time of publishing the process, if the start date is overdue and the timer is associated with a start event, the process is immediately triggered.
End behavior can also be set. If set to “Never”, the events are triggered indefinitely.
If set to “After a specific number of occurrences”, the event will be triggered a specified number of occurrences and after that will not be triggered again. In this case, the event will be triggered after a certain amount of time specified the “Repeats every” section. In that section, a lap can be set from years to seconds.
Time expression can be relative to two points in time:
|
The "Timer Event" attribute allows you to define a timer trigger which will start the process at specific hour or pause it for a certain amount of time.
Timer Intermediate Event
A Timer intermediate event is always catching. With sequence flow in and out, it represents a fixed delay, either for a specified duration or until a specified date and time.
A Timer boundary event triggers an exception flow if the activity it is attached to does not complete before the Timer trigger occurs. An interrupting Timer boundary event trigger can be specified as a duration, measured from arrival of the sequence flow at the activity, or a specific date and time. A non-interrupting Timer boundary event also may be triggered on a recurring cycle, measured from the previous firing of the trigger.
Event Configuration
-
Navigate to the trigger dropdown and select what kind of trigger you want to choose. It could be a date, a duration or even a cycle.
-
To define the trigger as a specific date and time, you can use a date picker or a FEEL expression for a date or date and time.
-
To define a date by using an expression just select the "Expression" in the second dropdown.
Note: Defining a timer trigger using expression is only available for durations or dates !
-
"Relative to" refers to when the timer starts counting. Time expression can be relative to two points in time:
-
"activation" - it calculates expiration time from the timestamp when the node was activated - this is the default
-
"lastUpdate" - it calculates expiration time based on last update of the process instance and by that it might require reschedule
-
Note: It applies to a cycle and a duration only.