Enter a name and test score and click Submit. This returns results as shown in

9-34 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 9–36 Grades Sample Application Servlet

2. Enter a name and test score and click Submit. This returns results as shown in

Figure 9–37 . The first time you run the servlet there may be a delay before any results are returned. The first time the servlet is invoked, during servlet initialization the runtime loads the dictionary and creates a rule session pool. Subsequent invocations do not perform these steps and should run much faster. Figure 9–37 Grades Sample Application Servlet with Results 10 Working with Oracle Business Rules and ADF Business Components 10-1 10 Working with Oracle Business Rules and ADF Business Components Oracle Business Rules allows you to use Oracle ADF Business Components view objects as facts. By using ADF Business Components facts you can assert trees of view object graphs representing the business objects upon which rules should be based, and let Oracle Business Rules handle the complexities of managing the relationships between the various related view objects in the main view objects tree. This chapter includes the following sections: ■ Section 10.1, Introduction to Using Business Rules with ADF Business Components ■ Section 10.2, Using Decision Points with ADF Business Components Facts ■ Section 10.3, Creating a Business Rules Application with ADF Business Components Facts

10.1 Introduction to Using Business Rules with ADF Business Components

The ADF Business Components rule development process can be summarized as follows: 1. Create view object definitions. 2. Create action types. 3. Create rule dictionary. 4. Register view object fact types. 5. Register Java fact types for actions. 6. If you are invoking from Java: ■ If the view object is already instantiated at the Decision Point, code the Decision Point invocation passing the view object instance. ■ If the view object is not instantiated at the Decision Point, code the Decision Point invocation passing the view object key values.

10.1.1 Understanding Oracle Business Rules ADF Business Components Fact Types

When an ADF Business Components view object is imported into an Oracle Business Rules data model, an ADF Business Components fact type is created which has a property corresponding to each attribute of the view object, as shown in Figure 10–1 .