From the Component Palette, drag-and-drop a Business Rule from the Service To add an input, from the list next to the Add icon select Input to enter input for In the Import Schema dialog click Browse Resources to choose the XML schema In the Import Schema

Working with Decision Tables 5-27 select it in the Available pane and add it to the Selected pane using the Add button. Figure 5–19 Adding a Project to an Application

4. Click Finish.

5.4.3 How to Create a Business Rule Service Component for Order Approval

After creating a project in Oracle JDeveloper you need to create a Business Rule Service component within the project. When you add a business rule you can create input and output variables to provide input to the service component and to obtain results from the service component. To use business rules with Oracle JDeveloper, you do the following: ■ Add a business rules service component ■ Create input and output variables for the service component ■ Create an Oracle Business Rules dictionary in the project To create a business rule service component: 1. In the Application Navigator, in the OrderApproval project expand SOA Content and double-click composite.xml to launch the SOA composite editor this may already be open after you create the project.

2. From the Component Palette, drag-and-drop a Business Rule from the Service

Components area of the SOA menu to the Components lane of the composite.xml editor. Oracle JDeveloper displays a Create Business Rules page, as shown in Figure 5–20 . 5-28 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 5–20 Adding a Business Rule Dictionary with the Create Business Rules Dialog

3. To add an input, from the list next to the Add icon select Input to enter input for

the business rule. 4. In the Type Chooser dialog, click the Import Schema File... icon. This displays the Import Schema File dialog, as shown in Figure 5–21 . Figure 5–21 Import Schema File with Type Chooser

5. In the Import Schema dialog click Browse Resources to choose the XML schema

elements for the input variable of the process. This displays the SOA Resource Lookup dialog. Working with Decision Tables 5-29 6. In the SOA Resource Lookup dialog, navigate to find the order.xsd schema file and click OK.

7. In the Import Schema File dialog, make sure Copy to Project is selected, as shown

in Figure 5–22 . Figure 5–22 Importing the Order.xsd Schema File

8. In the Import Schema File dialog, click OK.

9. If the Localize Files dialog displays, click OK to copy the schema to the composite

process directory.

10. In the Type Chooser, navigate to the Project Schemas Files folder to select the input

variable. For this example, select CustomerOrder as the input variable.

11. On the Type Chooser window, click OK. This displays the Create Business Rules

dialog, as shown in Figure 5–23 . 5-30 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 5–23 Create Business Rules Dialog with CustomerOrder Input

12. In a similar manner, add the output fact type OrderApproval from the imported