Testing Oracle Business Rules at Runtime Introduction to the Grades Sample Application

8-6 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 8–5 Test Passed Test Function Output Figure 8–6 Test Failed Test Function Output

8.2 Testing Oracle Business Rules at Runtime

In an SOA application that uses Oracle Business Rules with a Decision Service you can test rules at runtime with Oracle Enterprise Manager Fusion Middleware Control Console Test function. For more information on using the Test function, see Oracle Fusion Middleware Administrators Guide for Oracle SOA Suite and Oracle Business Process Management Suite. 9 Creating a Rule-enabled Non-SOA Java EE Application 9-1 9 Creating a Rule-enabled Non-SOA Java EE Application You can use Oracle JDeveloper to create a rule-enabled non-SOA Java EE application with Oracle Business Rules. This chapter shows a sample application, a Java Servlet, that runs as a Java EE application using Oracle Business Rules this describes using of Oracle Business Rules without an SOA composite. This chapter includes the following sections: ■ Section 9.1, Introduction to the Grades Sample Application ■ Section 9.2, Creating an Application and a Project for Grades Sample Application ■ Section 9.3, Creating Data Model Elements and Rules for the Grades Sample Application ■ Section 9.4, Adding a Servlet with Rules SDK Calls for Grades Sample Application ■ Section 9.5, Adding an HTML Test Page for Grades Sample Application ■ Section 9.6, Preparing the Grades Sample Application for Deployment ■ Section 9.7, Deploying and Running the Grades Sample Application The source code for Oracle Business Rules-specific samples is available online at https:www.samplecode.oracle.comsfgopage1497 For SOA samples online visit https:www.samplecode.oracle.comsfprojectssoasamples

9.1 Introduction to the Grades Sample Application

The Grades application provides a sample use of Oracle Business Rules in a Java Servlet. The servlet uses Rules SDK Decision Point API. This sample demonstrates the following: ■ Creating rules in an Oracle Business Rules dictionary using an XSD schema that defines the input and the output data, and the facts for the data model. In this case you provide the XSD schema in the file grades.xsd. ■ Creating a servlet that uses Oracle Business Rules to determine a grade for each test score that is input. ■ Creating a test page to supply input test scores and to submit the data to the grades servlet. 9-2 Oracle Fusion Middleware Users Guide for Oracle Business Rules ■ Deploying the application, running it, submitting test values, and seeing the output.

9.2 Creating an Application and a Project for Grades Sample Application