Via the WaitForCondition system function, a work item waits for another
work item that meets a specified condition. For further details, see About
WaitForCondition processing.
TIP
Before you define the WaitForCondition system function, the workflow definition
of the waited-for work item must already exist in the workflow database.
In addition, this workflow definition must include a condition identifier.
To specify properties for the WaitForCondition system
function
Place a system step on the workflow map where you want to begin waiting
for another work item.
In the Properties pane, select WaitForCondition
then click the right arrow to move it to the Selected Functions column.
Double-click WaitForCondition in
the Selected Functions column.
In the Conditions table, click the
Add button to select the workflow to
wait for and other parameters for each condition. See Condition
parameters for WaitForCondition.
You can define multiple conditions. The first workflow
to meet the specified criteria will satisfy the wait.
NOTE In
a multi-server environment, the waiting work item and the waited for
work item must be on the same Process Engine.
Under Timeout, specify a time limit
for the wait.
Never timeout (there is no time limit).
Expression, which can be one of the following:
A period of time. Enter a valid time expression that returns the
desired timeout period. Your entry should include a time
function.
For example, to specify a time limit of 45
minutes after the wait begins, enter the following expression.
addminutes(systemtime(),45)
A specific time. Enter the time as a string expression that you
convert to type time using either stringtotime
or convert.
For example, to specify an expiration time
of 01/01/2001 12:00:00, enter either:
NOTE
Entering a specific time is generally not recommended, because
doing so can limit the reusability of the workflow definition.
No timeout will occur if this system function executes after the
specified time has already passed.
Under Condition Result Data Field,
select a data field that will contain the row number (from the table
above) of the condition that satisfied the wait. The data field must
be an integer or integer array. If the data field is an array, you
must manually specify an element in the array in the format
<data
field name>[<expression that evaluates to the desired element
number>].
At the end of WaitForCondition processing, the
data field or array element you specify will hold a value, as appropriate:
If the wait condition was satisfied, the data field holds a value
that corresponds to the row in the Conditions table that satisfied
the wait. For example, if there are two rows, the value will be
either 1 or 2, depending on which wait condition was satisfied.
If the specified time limit is reached and no wait condition has
been satisfied, the data field is set to 0.
In most cases, you should test the result in this data field in a
subsequent step to determine what action to do next. See WaitForCondition
example for details.