Creating a Conditional Script

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 follows the default flow connection to the Record no-fault claim details task.

Procedure

  1. Click on the Specify Claim Type task. The Properties tab at the base of the window displays the properties for that task.
  2. In the Properties tab, click on Data Fields.
  3. Click the plus sign at the right of the Data Fields tab.
  4. Click in the Label column and change the label from the default Field to IsFault.
  5. Click in the Type column and select Boolean from the drop-down list.
  6. To attach a script to the conditional flow:In the Process Editor, select the conditional flow object (the connection that runs to the Record fault claim details task).
  7. In the General tab of the Properties view, select Free Text instead of the default Undefined from the Script Defined As drop-down list.
  8. In the Describe Sequence Flow Condition field, type:
    IsFault = True
    Note: Because this is free text, which a solution designer would interpret as the analyst’s requirement for implementing a script, the exact format does not matter. The designer can then implement the script using JavaScript or some other syntax that is appropriate to the environment on which the process will be executed.

Result

Next you should complete Adding Data to the Process