Understanding Oracle Business Rules Decision Point Action Type
10.1.2 Understanding Oracle Business Rules Decision Point Action Type
With Rules SDK, the primary way to update a view object within a Decision Point is with an action type. An action type is a Java class that you import into the rule dictionary data model in the same way you import a rule pattern fact type Java class. A new instance of this action type is then asserted in the action of a rule and then processed by the Postprocessing Ruleset in the DecisionPointDictionary. A Java class to be used as an action type must conform to the following requirements: ■ The Java fact type class must subclass oracle.rules.sdk2.decisionpoint.ActionType or oracle.rules.sdk2.decisionpoint.KeyedActionType . By subclassing KeyedActionType the Java class inherits a standard oracle.rules.sdk2.decisionpoint.KeyChain attribute, which may be used to communicate the rule facts primary keys and parent-keys to the ActionType instance. ■ The class has a default constructor. ■ The class implements abstract exec method for the ActionType. The exec method should contain the main action which you want to perform. ■ The Java class must have properties which conform to the JavaBean interface that is, each property must have a getter and setter method. Example 10–1 shows a sample ActionType implementation. Example 10–1 Implementing an ActionType package com.example; import oracle.jbo.domain.Number; import oracle.rules.sdk2.decisionpoint.ActionType; import oracle.rules.sdk2.decisionpoint.DecisionPointInstance; public class RaiseAction extends ActionType { private double raisePercent; public void execDecisionPointInstance dpi { Number salary = NumbergetViewRowImpl.getAttributeSalary; salary = Numbersalary.multiply1.0d + getRaisePercent.scale100,2, new boolean[]{false}; dpi.addResultraise for + this.getViewRowImpl.getAttributeEmployeeId, getRaisePercent + = + salary ; getViewRowImpl.setAttributeSalary, salary; } public void setRaisePercentdouble raisePercent { this.raisePercent = raisePercent; } 10-4 Oracle Fusion Middleware Users Guide for Oracle Business Rules public double getRaisePercent { return raisePercent; } } In Example 10–1 , there is an oracle.rules.sdk2.decisionpoint.DecisionPointInstance as a parameter to the exec method. Table 10–1 shows the methods in DecisionPointInstance that an application developer might need when implementing the ActionType exec. Using Rules Designer you can select parameters appropriate for the ActionType you are configuring.10.2 Using Decision Points with ADF Business Components Facts
Parts
» Oracle Fusion Middleware Online Documentation Library
» What Are Rule Conditions? What Are Rule Actions?
» What Are Decision Tables? What Are Facts and Bucketsets? What Are Rulesets?
» Oracle Business Rules SDK Rules Designer
» Declarative Rules The RETE Algorithm
» How to Display and Edit XML Facts How to Reload XML Facts with Updated Schema
» What You Need to Know About XML Facts
» How to Display and Edit Java Facts What You Need to Know About Java Facts
» What You Need to Know About List of Values Bucketsets What You Need to Know About Range Bucketsets
» What You Need to Know About Bucketset Allowed in Actions Option
» In the Filter Query field, click insert test to insert a default test as
» How to Add Rules How to Define a Test in a Rule
» What You Need to Know About Advanced Mode Rules
» Introduction to Tree Mode Rules
» What You Need to Know About Tree Mode Rules
» How to Use Bucketsets to Provide Options for Test Expressions
» From the list next to the Add icon, select Rule.
» Introduction to Decision Table Operations
» Introduction to Decision Point API How to Obtain the Car Rental Sample Application
» How to Create Data Model Elements for Use with a Decision Point
» How to Add a Decision Point Using Decision Point Builder
» How to Create and Use Decision Point Instances
» What You Need to Know About Decision Point and Decision Tracing
» Testing Oracle Business Rules at Runtime Introduction to the Grades Sample Application
» Enter a name and test score and click Submit. This returns results as shown in
» Understanding Oracle Business Rules ADF Business Components Fact Types
» Understanding Oracle Business Rules Decision Point Action Type
» How to Call a Decision Point with ADF Business Components Facts
» How to Call a Decision Function with Java Decision Point Interface
» What You Need to Know About Decision Function Configuration with ADF Business Components
» How to Add the Outside Manager Finder Class
» How to Update ADF META INF for Local Dictionary Access
» How to Add the Employee Raises Java Class
» Working with Decision Component Metadata
» Introduction to Decision Components Decision Service Architecture
» Working with Advanced Mode Options
» Expression Builder Condition Browser
» Editing Decision Table Cells
» Understanding the Validation Panel Updating the Validation Panel
Show more