How to Specify the Number of Times to Execute an Activity

You can specify to execute an activity a specified number of times. This provides a method for verifying that an activity executes the correct number of times in a process flow (for example, ensuring that a while activity executes the correct number of times).

To specify the number of times an activity is executed:

  1. Select the activity to execute through one of the following methods:

    1. In the Structure window, right-click the Assert Execution Counts folder and select Create, or select the Assert Execution Counts folder and click the Add button.

      The Assert Execution Count dialog is displayed.

    2. In the Activity Name field, click the Browse icon to select the activity to execute.

    or

    1. Right-click a specific BPEL activity in the designer, and select Edit Activity Test Data.

    2. Click the Assert Execution Count tab.

    3. Click the Add icon.

      The activity you selected is displayed in the Activity Name field.

  2. In the Count list, select a value.

  3. Click OK.

    The Activity Test Data dialog looks as shown in Figure 51-27.

    Figure 51-27 Activity Test Data Dialog

    Description of Figure 51-27 follows
    Description of "Figure 51-27 Activity Test Data Dialog"
  4. Expand the Assert Execution Counts folder in the Structure window to view execution counts assigned to activities. Figure 51-28 provides details.

    Figure 51-28 Assert Execution Counts Folder in the Structure Window

    Description of Figure 51-28 follows
    Description of "Figure 51-28 Assert Execution Counts Folder in the Structure Window"