How to Customize a Service or a Reference

Using Business Rules 16-3 Figure 16–2 Business Rule Task in the Sales Quote Example This figure shows a business rule task in the Sales Quote example process. An exclusive gateway follow the business rule task. The exclusive gateway is based on the result of running the business rule task.

16.2 Assigning an Existing Business Rule to a Business Rule Task

You can assign existing business rules to a business rule task. You can implement a business rule task using a business rule that you created using the Business Rule wizard or that existed in the SOA project you used as the basis for the BPM project. All the business rule components that your project contains appear in the Rules predefined module in the business catalog. They also appear in the SOA composite. If there are business rule tasks in your BPMN processes that use a business rule component, then the SOA composite shows a wire between them.

16.2.1 How to Assign an Existing Business Rule to a Business Rule Task

You can reuse existing business rules to implement the business rules tasks in your BPMN processes. To assign an existing business rule to a business rule task: 1. Right-click the business rule task. 2. Select Properties. 3. Click the Implementation tab. 4. Click the Browse button next to the Business Rule field. The Type dialog box appears.

5. Select a business rule from the list or enter the name or part of the name in the

Search field to search for a business rule.

6. Click OK.

The Type dialog box closes, and the Business Rule field shows the business rule you selected. 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