IBM FileNet P8, Version 5.2.1            

WaitForCondition system function

Via the WaitForCondition system function, a work item waits for another work item that meets a specified condition.

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 a WaitForCondition system function:

  1. From the General System Palette, drag a WaitForCondition step onto the workflow map where you want to begin waiting for another work item.
  2. In the Conditions table, click Add to select the workflow to wait for and other parameters for each condition.

    You can define multiple conditions. The first workflow to meet the specified criteria will satisfy the wait.

    In a multi-server environment, the waiting work item and the waited for work item must be on the same Process Engine.

  3. 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. The 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:

        convert("01/01/2001 12:00:00",time) or

        stringtotime("01/01/2001 12:00:00","mm/dd/yyyy hh:mm:ss")

        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.

  4. 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.



Last updated: March 2016
bpfdh116.htm

© Copyright IBM Corporation 2016.