How to Call a Decision Function with Java Decision Point Interface

Working with Oracle Business Rules and ADF Business Components 10-7 ListObject invokeList = point.invoke; ListDecisionPoint.NamedValue results = point.getResults; } catch RLException e { System.err.printlne; } catch SDKException e { System.err.printlne; } } Example 10–3 shows how to invoke a DecisionPoint using the setViewObject method to set the ViewObject. Example 10–3 Invoking a Decision Point Using setViewObject Method public void run { final ApplicationModule am = Configuration.createRootApplicationModuleAM_DEF, CONFIG; final ViewObject vo = am.findViewObjectVO_NAME; final DecisionPointInstance point = dp.getInstance; point.setTransactionDBTransactionImpl2am.getTransaction; point.setAutoCommittrue; point.setViewObjectvo; try { ListObject invokeList = point.invoke; ListDecisionPoint.NamedValue results = point.getResults; } catch RLException e { System.err.printlne; } catch SDKException e { System.err.printlne; } }

10.2.1.4 What You Need to Know About Decision Point Invocation

Care must be taken when invoking Decision Points using a view object that loads large amounts of data, since the default behavior of the JBO classes is to load all data eagerly. If a view object with many rows and potentially very many child rows is loaded into memory, not only is there risk of memory-exhaustion, but DML actions taken based on such large data risk using all rollback segments.

10.2.2 How to Call a Decision Function with Java Decision Point Interface

To call a decision function with a ruleset using ADF Business Components fact types with the Oracle Business Rules SDK Decision Point interface you must configure the decision function with certain options. For more information on using decision functions, see Chapter 6, Working with Decision Functions . To define a decision function using the Java Decision Point interface: 1. Double-click the decision function icon to the left of the decision function item or select this item and click the Edit icon. The Edit Decision Function dialog appears. 2. In the Edit Decision Function dialog, configure the decision function: ■ Input Fact Types : names the fact types to use in the configured business rules. 10-8 Oracle Fusion Middleware Users Guide for Oracle Business Rules The inputs, when working with an application using ADF Business Components fact types, are the ADF Business Components view objects used in your rules. When you use the setViewObject method with a Decision Point, the List attribute should be unselected. Each Input fact type should have the List attribute selected when you are using addInput or setInputs methods with the Decision Point. Optionally, depending on the usage of the view objects, select the Tree attribute: – List : defines that a list of ADF Business Components fact types are passed to the decision function. – Tree : defines that all objects in the master-detail hierarchy should be asserted, instead of only the top-level object. For more information, see Section 10.2.1, How to Call a Decision Point with ADF Business Components Facts . ■ Output Fact Types : defines the fact types that the caller returns. When calling a decision function using the Java Decision Point interface for a decision function that uses ADF Business Components fact types, Output Fact Types should be left empty. The view object is updated using an ActionType . For more information, see Section 10.1.2, Understanding Oracle Business Rules Decision Point Action Type . ■ RuleSets and Decision Functions : an ordered list of the rulesets and other decision functions that this decision function executes. The rulesets DecisionPointDictionary.Preprocessing and DecisionPointDictionary.Postprocessing from the DecisionPoint dictionary must be added so that they run before and after, respectively, the application-specific rulesets and decision functions.

10.2.3 What You Need to Know About Decision Function Configuration with ADF Business Components