Using Timers

Overview

Timers can be used in a workflow to trigger process steps at particular times or after specified intervals. Common timer-triggered actions include:
  • start a process
  • stop a process
  • automatically traverse a transition
  • deliver a notification

Adding Timers

There are two ways to define timers:
  • Use the timer tool (timer tool), which generates an associated Timer Tool Policy.
  • Explicitly define a policy that is triggered by a Timer Expired event.
Either way, a timer element is incorporated into the process with the specified timer settings.

Timer Considerations

Timers can be configured to reset and fire any number of times. Here is a list of important considerations for determining the approach that is best for your process:
  • Timers are initialized when the innermost process or activity containing the timer is started.
  • All outgoing connections from a timer element are traversed each time it fires.
    The timer execution varies depending on its orientation in the process diagram. A timer can assume the following configurations:
    • on the border of an activity: stops the activity when triggered.
    • inside the border of an activity: executes an associated action while the activity remains active.
      Note: The timer starts when the parent activity begins.
    • outside an activity in the main process: executes an associated action.
Note: All transitions leading from a stand-alone timer share the same timer interval. That is, different timer intervals cannot be specified for each transition from the timer. If this behavior is desired, then a separate timer is required for each interval.

Advanced Timer Parameters

Accessing Advanced Timer Properties

The advanced timer properties dialog box can be viewed by selecting the Advanced button to the right of the Schedule Expression field. The advanced timer properties dialog box defines the following information:
  • Schedule Expression
  • Recurrence
  • Timer End

Schedule Expression

The Schedule Expression field is used to specify the time at which the timer triggers. The value should be a relative expression or cron-type syntax based on when the parent element starts. The expression supports second, minute, hour, day, and week time intervals. The supported syntax is either the special reserved word Now or a plus sign, followed by one or more digits, followed by a unit of measure. A combination of one or more sequences of plus sign followed by a unit can be specified.
The following units are supported:
Unit
Description
s
Seconds
m
Minutes
h or H
Hours
d
Days
w
Weeks
The following examples illustrate valid expressions:
Expression
Interpretation
Now
The timer expires immediately.
+1s
The timer expires in one second.
+1m
The timer expires in one minute.
+1h
The timer expires in one hour.
+1d
The timer expires in one day.
+1w
The timer expires in one week.
+1h+1m+1s
The timer expires in one hour + one minute + one second.
See Timer Examples for additional examples of timer expressions, including cron syntax.

Recurrence

The Specify recurrence section includes the following fields:
Number of repetitions
specifies how many times the timer should fire.
Interval of repetitions
is a relative expression that identifies the time interval between repeated executions. By default, timers fire only once.
Note: This field is ignored when a cron expression is specified for the Schedule Expression. The syntax for cron expressions implicitly supports repeated firings of the timer object.

Timer End

The Specify timer end section includes the following fields:
End timer
specifies when the timer should stop. The end value is a relative or cron expression that identifies when the timer should stop. The syntax supported is similar to that for the Schedule Expression field.
Interval of repetitions
is a relative expression that identifies the time interval between repeated executions. By default, timers fire only once.