How to Create a Business Rule from Oracle BPM Studio How to Add Input and Output Arguments When Creating a Business Rule Component

Controlling the Process Flow 17-3 The following fields in a multi-instance loop marker require you to write an expression: ■ Loop Cardinality This expression defines the number of tokens to create in the subprocess. ■ Completion Condition This expression determines when to stop repeating the subprocess. The BPM Service Engine evaluates this condition every time a token completes the subprocess. If the condition evaluates to true, it considers the subprocess completed and the instance moves to the next flow object in the process.

17.2.1 How to Configure Loop Markers

You can configure a loop marker to run a subprocess multiple times. To configure loop markers: 1. Right-click the subprocess.

2. Select Properties.

3. Click the Loop Characteristics tab.

4. Select Loop.

5. Specify the Loop Condition:

1. Select the expression language.

Possible options are Simple or XPath.

2. In the text area below, write the condition that drives the loop.

Optionally you can write the condition using the Expression Builder. To launch the Expression Builder click the Expression Builder button next to the text area.

6. Optionally, you can specify a maximum number of times for the loop to run:

1. Select Loop Maximum.

2. Specify a number.

7. Select before to evaluate the condition before running the flow object, or deselect

it to evaluate the condition after running the flow object.

8. Click OK.

17.2.2 How to Configure Multi-Instance Markers

You can configure a multi-instance marker to run subprocess multiple times based on a set of data. To configure multi-instance markers: 1. Right-click the subprocess.

2. Select Properties.

3. Click the Loop Characteristics tab.

4. Select MultiInstance.

17-4 Modeling and Implementation Guide for Oracle Business Process Management 5. Specify the Loop Cardinality: 1. Select the expression language. Possible options are Simple or XPath. 2. In the text area below, write the specifies the loop cardinality. Optionally you can write the condition using the Expression Builder. To launch the Expression Builder click the Expression Builder button next to the text area. 6. Optionally, you can specify the Completion Condition: 1. Select the expression language. Possible options are Simple or XPath. 2. In the text area below, write the condition that determines if the loop is completed. Optionally you can write the condition using the Expression Builder. To launch the Expression Builder click the Expression Builder button next to the text area.

7. Click the Browse button next to the Loop Data Output field, to specify the data

output. You can select a data object or an attribute in a complex data object to pass to the subprocess. Generally the selected data object is a collection of items.

8. Click the Browse button next to the Loop Data Input field, to specify the data

input. Select a data object or an attribute in a complex data object to assign the result of the subprocess. 9. Optionally, check the Is Sequential check box to specify that the each token must complete the subprocess before the next token starts to run the subprocess.

10. Click OK.