To create assertion conditions in invoke activities, receive activities, reply activities, and OnMessage branches:

  1. In the SOA Composite Editor, double-click the BPEL process service component.

  2. In the Components window, expand BPEL Constructs.

  3. Drag a Receive activity, Invoke activity, Pick activity, or Scope activity into the designer.

  4. Expand the Receive, Invoke, or onMessage branch of the Pick or Scope activity.

  5. Click the Assertions tab.

  6. If you are creating an assertion for a BPEL 2.0 project, perform the following tasks. Otherwise, go to Step 6.

    1. Select when to execute the condition. Table 12-9 provides details.

      Table 12-9 Assertion Condition Tabs

      To Create A... Select The...

      Preassertion condition

      Pre Asserts tab

      Postassertion condition

      Post Asserts tab

    2. Click the Add icon, as shown in Figure 12-41.

      Figure 12-41 Add Icon of Assertions Tab in BPEL 2.0

      Description of Figure 12-41 follows
      Description of "Figure 12-41 Add Icon of Assertions Tab in BPEL 2.0"

    The Assert dialog is displayed.

  7. If you are creating an assertion for a BPEL 1.1 project, perform the following tasks.

    1. Click the Add icon, as shown in Figure 12-42.

      Figure 12-42 Add Icon of Assertions Tab in BPEL 1.1

      Description of Figure 12-42 follows
      Description of "Figure 12-42 Add Icon of Assertions Tab in BPEL 1.1"
    2. Select when to execute the condition. Table 12-10 provides details.

      Table 12-10 Condition Execution Options

      Element Description

      Pre Assert

      If selected, the condition is executed before the invoke or reply activity send out the outbound message.

      Note: A fault policy does not handle faults thrown from a preassert condition. Only faults thrown from a postassert condition are supported. For more information about fault policies, see Handling Faults with the Fault Management Framework.

      Post Assert

      If selected, the condition is executed after an invoke activity, receive activity, or onMessage branch receives the inbound message.

      Based on your selection, the Pre Assert or Post Assert dialog is displayed.

  8. Specify values for the assertion condition, as shown in Figure 12-43. For this example, Post Assert was selected for an assertion condition on a receive activity in a BPEL 2.0 project.

    1. Select the Fault QName to be thrown by clicking the Search icon and selecting an existing fault from the Fault Chooser dialog. You can also provide your own values for the Namespace URI and Local Part fields of the fault. If you do not specify anything for the Fault QName, then a bpelx:assertFailure fault is thrown.

    Figure 12-43 Assertion Condition Values

    Description of Figure 12-43 follows
    Description of "Figure 12-43 Assertion Condition Values"
  9. When complete, click OK to return to the Assertions tab of the activity. The completed assertion condition is displayed, as shown in Figure 12-44.

    Figure 12-44 Assertions Tab with Data

    Description of Figure 12-44 follows
    Description of "Figure 12-44 Assertions Tab with Data"
  10. Click Apply, then OK.