What Happens When You Customize a Service or a Reference

16-4 Modeling and Implementation Guide for Oracle Business Process Management 7. From the Decision Function list, select a decision function.

8. Click OK.

The Business Rule Task Properties dialog box closes and saves the implementation you selected for the business rule task.

16.2.2 What Happens When You Assign an Existing Business Rule to a Business Rule Task

The business rule task implementation uses the selected business rule component and the selected decision function. When the BPMN Service Engine runs the business rule task, it invokes the Oracle Business Rules Engine using the input arguments defined in the business rule task data association. The Oracle Business Rules Engine evaluates the rules using the provided input argument and returns an output argument that contains the result of this evaluation.

16.2.3 How to Edit the Business Rule Associated to a Business Rule Task

You can launch the Business Rule Editor from a business rule task, to edit the associated business rule. To edit the business rule associated to a business rule task: 1. Right-click the business rule task. 2. Select Open Business Rule. The Business Rule Editor appears.

16.3 Creating a Business Rule from Oracle BPM Studio

You can create a business rule using the simplified interface Oracle BPM Studio provides. You can access this interface from the business rule task configuration dialog box. The simplified business rule creation interface enables you to create a business rule with one decision function. When you create the business rule, you can configure the following properties: ■ Name of the Business Rule Oracle BPM Studio uses this name to create the business rule component. ■ Input and output Specifies the input and output parameters for the default decision function Oracle BPM Studio automatically adds to the business rule component. Oracle BPM Studio uses these parameters to create the data association for the business rule task. The parameters of the decision function must be complex data objects created based on an XML schema. The XML schema must contain only one element. You must not use types from the WSDL. ■ Dictionary package Specifies the Java package to which your rule dictionary belongs, for example, com.example. ■ Name of the decision function Using Business Rules 16-5 Oracle BPM Studio uses this name to add a default decision function to the business rule you create. After you create the business rule with the simplified interface you can edit it using the editor included in Oracle SOA Suite.

16.3.1 How to Create a Business Rule from Oracle BPM Studio

You can create a business rule component from Oracle BPM Studio from the Implementation Properties dialog box of a business rule task. To create a business rule from Oracle BPM Studio: 1. Right-click the Business Rule task. 2. Select Properties. 3. Click the Implementation tab. 4. Click the Add button next to the Business Rule field. The Create Business Rule dialog box appears.

5. In the Name field, enter a name to identify the business rule.

6. Configure the input and output of the business rule.

See Section 16.3.2, How to Add Input and Output Arguments When Creating a Business Rule Component for more information on how to configure the input and output of a business rule.

7. Optionally, configure the advanced properties of the business rule.

See Section 16.3.3, How to Configure the Advanced Properties When Creating a Business Rule Component for more information on how to configure the advanced properties of a business rule.

8. Click OK.

The Create Business Rule closes and creates the business rule. The Business Rule field in the Business Rules Task Properties dialog box shows the business rule you created. 9. From the Decision Function list, select a decision function.

10. Click OK.

The Business Rule Task Properties dialog box, closes and saves the implementation you created for the business rule task.

16.3.2 How to Add Input and Output Arguments When Creating a Business Rule Component

The data objects you add as input or output arguments must use business objects based on external types as their types. To add input and output arguments when creating a business rule component: 1. In the Input and Output Data Objects section, click the Add button. 2. Select the type of argument you want to add. The Data Object dialog box appears. 3. Select a data object from the Data Object dialog box and drag it to the table. 16-6 Modeling and Implementation Guide for Oracle Business Process Management The input or output argument appears in the table.

16.3.3 How to Configure the Advanced Properties When Creating a Business Rule Component

To configure the advanced properties when creating a business rule component: 1. Click the Advanced tab. 2. In the Package field, enter the name of the package in which to store the rules dictionary.

3. In the Decision Function field, enter a name for the decision function that the

simplified interface creates in the business rule component.

16.3.4 What Happens When You Create a Business Rule Task from Oracle BPM

Oracle BPM Studio creates a business rule component. You can edit this business rule component using the SOA Business Rule editor in the same way you edit a component created using Oracle SOA Suite. The business rule task uses the business rule component for its implementation.