Java Reference
In-Depth Information
Executing an Activity After a Specific Delay
Problem
You want your business process to wait for a set amount of time before it executes a given
activity.
Solution
Use the <wait for="..."> activity. Supply a value to the for attribute using XPath expres-
sion syntax after a “P” (durations always start with “P”).
Discussion
The complete expression syntax for durations is represented in Table 10-2 .
Table10-2.XPath Duration Expression Values
Value
Meaning
P
Duration designator, indicating that the following values represent a period of time.
Y
Years.
M
Months or Minutes, depending on relation to the T.
D
Days.
H
Hours.
S
Seconds.
There are a few ways to represent durations with more or less precision, as shown in the fol-
lowing examples.
NOTE
Remember that all durations start with a “P”, and the time must be demarcated by prepending a “T”.
The following timer will expire in three hours, five minutes:
<wait for="PT3H05M" />
Search WWH ::




Custom Search