Using Services in Oracle BPM

16-2 Modeling and Implementation Guide for Oracle Business Process Management Figure 16–1 Business Rules Components in the Business Catalog This figure shows the Rules predefined module in the business catalog. The Rules predefine module contains a module Salesquoteprocess that in turn contains a business rule component named ApprovalRules.

16.1.1 Using Business Rules in a BPMN Process

Business rules enable you to determine the flow of your processes based on a group of rules you define. The business rule task enables you to associate the following: ■ Data object values to the input arguments of a business rule ■ The output arguments of a business rule component to data objects When a token arrives at a business rule task, the BPMN Service Engine invokes Oracle Business Rules Engine using the input arguments defined in the data association of the business rule task. The business rules engine evaluates the defined rules and returns output that contains the result. The BPMN Service Engine maps the output from the business rules engine to the data objects in the process using the data association defined for the business rule task. After a business rule task, you can add an exclusive gateway that determines the flow of the process based on the value of a data object that contains the result of running the business rule task. In the Sales Quote example, the business rule task determines the approval flow for each sales quote in the following way: ■ The business rule task invokes the business rule component providing a Quote business object as an input argument. ■ The business rule component evaluates the defined rules using the provided input. ■ The business rule component returns an ApprovalFlow business object that contains the result of evaluating the defined rules. ■ The business rule task data association maps the result of running the business rule to the approvalFlow process data object. ■ The exclusive gateway Is Business Practices Review Required determines the flow based on the value of the approvalFlow process data object. Figure 16–2 shows a business rule task in the Sales Quote example. 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.