Implementing a conditional BPD activity

Complete the following steps to implement a conditional BPD activity.

Before you begin

To perform this task, you must be in the IBM® Process Designer desktop editor.

Procedure

  1. Open the Process Designer desktop editor.
  2. Open a process application that contains a business process definition (BPD).
  3. In the BPD diagram, click the activity that you want to make conditional.
  4. Click the Condition tab in the properties, and then select the Is Conditional option.
    Restriction: The conditions tab is disabled for ad hoc activities (unwired activities). If a wired conditional activity is turned into an ad hoc activity by deleting wires to and from the activity, the isConditional option becomes disabled. To set conditions for an ad hoc activity, use preconditions. See Creating an unstructured (ad hoc) activity
    The activity in the BPD diagram includes a diamond-shaped icon to indicate that it is conditional. The diamond-shaped icon on an ad hoc activity indicates that the activity has a precondition.
  5. Select the conditional activity for execution by using one of the following options:
    Option Description
    JavaScript Enter JavaScript in the available box. It returns a valid Boolean (true or false) value. If the runtime return value of the supplied script is true, the activity is carried out.
    Note: If a script is present in the box, it overrides any human decision at run time to carry out or skip the activity.
    Set selected conditional activities If the Is Conditional option is enabled and no JavaScript is entered in the box, the activity is carried out only if previously selected. Use the tw.system.process.selectedConditionalActivities property to set selected conditional activities.
    Note: IBM Business Process Manager Performance Data Warehouse records data that can be used to analyze the conditional activities. When a conditional activity is skipped, a tracking point is created with SKIP appended to the name of the skipped activity. A tracking point is created in the Performance Data Warehouse TRACKINGPOINT views each time an activity is skipped. Using this data, you can generate reports to show which activities are skipped and how often those activities are skipped in a process instance.