Creating and Using a Conditional Script

In this task you will define how the flow of processing is determined.

The flow of processing branches at the Fault claim? gateway depending on whether a fault claim or a no-fault claim is being made. You will create a data field isFault which, if set to True (meaning that the claim is a fault claim), directs the flow down the conditional flow connection to the Record fault claim details task.

(If the field is set to False (meaning that the claim is not a fault claim), processing thus follows the default flow connection to the Record no-fault claim details task.)

Procedure

  1. In the Project Explorer, right-click Data Fields under the Notification of Claim process.
  2. Select New > Data Field.
  3. In the New Data Field dialog, name the field isFault and set the type to Boolean.
  4. Expand Initial Value(s) and select false.
  5. Click Finish.

    Now you need to attach a script to the conditional flow.

  6. Select the conditional flow object in the Process Editor.
  7. In the General tab of the Properties view, select JavaScript from the Script Defined As list.
  8. In the Define Sequence Flow Condition field, type:
    isFault==true;

    (Note that you need two "=" characters.)