Pick activity

The Pick activity determines what starter activity to launch based on the action that has occurred during run time.

For example, a Pick activity could contain three branches, one that contains a Get Inserted Rows activity, one that contains a Get Deleted Rows activity, and the other that contains a Get Updated Rows activity. If an update event occurs on the database, an instance of the orchestration is created and branch that contains the Get Updated Rows activity is called.

When you add a Pick activity to an orchestration, two Receive branches are automatically added. You can add additional receiveEvent nodes to the Pick activity. A Pick activity is always a starter activity and in each branch of a Pick activity the first activity must be a starter activity.

The Receive branch contains a receiveEvent node and an empty placeholder. Each message is defined in a Receive branch that can contain other activities to handle that specific message.

Delete Receive branches if you do not want a receive operation to be a part of the Pick activity. Deleting the Receive node removes the entire Receive branch.

Attention: If a variable is not initialized in every branch of a Pick activity, the variable cannot be used outside the scope of a Pick activity. Attempting to use a variable outside the Pick activity that is not initialized in every branch results in an invalid orchestration. For example, a Pick activity has two branches, one that contains a Get Updated Rows activity and one that contains a Get Inserted Rows activity. The Get Updated Rows activity returns the data to a variable named updateResult while the Get Updated Rows activity returns the data to a variable named insertResult. These variables can only be used within the Pick activity and cannot be used in the activities that follow after the Pick activity in the orchestration. If the output of each activity is based on the same schema, you can however define one variable that both activities initialize. If all branches in a Pick activity initialize the variable, the scope of the variable includes all activities after the Pick activity and is not limited to the scope of the Pick activity.

To use a Pick activity complete the following steps:

Procedure

  1. Drag the Pick activity from the Logic folder in the Activities tab onto the orchestration.
  2. Select an inbound activity or the Schedule Job activity and drag it onto the receiveEvent placeholder.
  3. To add an activity to the branch, drag the activity onto the empty placeholder.

Adding, editing, or deleting condition branches

The Pick activity can have several branches to process complex conditions

To add a branch to the Pick activity:

  1. Click the Pick node.
  2. Select Add Receive Branch from the list.
To edit a branch or activity name complete the following steps:
  1. Select an activity or branch.
  2. Select Edit from the list. The name is displayed in a box.
  3. Select the current name, then enter the new one.
  4. Press Enter.

To delete an activity or branch complete the following steps:

  1. Select an activity or branch.
  2. Select Delete from the list.
    Note: If you delete a condition branch, all activities within the condition branch are also deleted.