Pick

See Also

The Pick element blocks the business process and waits until one of the specified events occurs. After the specified event occurs, the activity associated with that event is performed. The possible events involved in the Pick activity are the arrival of a message or an "alarm" based on a timer. The occurrence of the events is mutually exclusive. If more than one of the events occurs, then the selection of the activity to perform depends on which event occurred first.

The Pick activity provides two branches, onMessage and onAlarm. The branch whose condition is satisfied first (i.e. a message is received or the specified deadline passes) is executed. When you add a Pick element to your diagram, it automatically includes one onMessage statement in which you specify the properties of the message that the process awaits from a partner service. Each Pick element must include at least one onMessage statement. The onAlarm branch contains a timer you can use to specify how long the process is to wait.

To use the Pick element:

  1. In the Design view, drag the Pick element from the Palette to the diagram.
  2. Select the Pick element on the diagram.
    The Properties window shows the Pick properties (Ctrl-Shift-7).
  3. (Optional) In the Properties window, select the Create Instance checkbox to enable creating an instance. This attribute is used when the Pick element starts an instance of a business process after receiving a message with the specified parameters.
    If you do not plan to start a new process instance, leave the Create Instance checkbox unselected.
  4. In the onMessage branch, select the Receive element and configure the properties of the message for which the process is waiting. Follow the instructions for the Receive element.
  5. From the Palette, drag the activity that will be executed and place it inside the onMessage branch. Configure the activity's properties.
  6. (Optional) Add more onMessage branches by choosing Add > On Message from the pop-up menu and configure them as described above.
  7. (Optional) Add one or more onAlarm branches following the procedure below.

To add an onAlarm branch (a timer) to a Pick element:

  1. Right-click the Pick element and choose Add > On Alarm from the pop-up menu.
  2. Specify the following conditions for the onAlarm branch:
  3. To specify the fixed date or duration, in the Properties window, select one of the following expiration types from the Alarm Type drop-down list:
  4. In the next row, click the ellipsis button (...) and specify the time in accordance with the selected expiration type.
  5. From the Palette, drag an activity that will be executed and place it inside the onAlarm branch. Configure the activity's properties.
  6. (Optional) Add one or more onAlarm branches as described above.
See Also
Receive
Understanding Correlation. Using the Correlation Wizard
About the BPEL Mapper
BPEL Designer Palette: Structured Activities
About the Design View of the BPEL Designer

Legal Notices