What You May Need to Know About Rule Firing Limit Option for Debugging Rules What You May Need to Know to About Decision Function Arguments

Working with Decision Functions 6-5

2. Select the decision function to edit and click the Edit icon or double-click the

decision function icon.

3. Select the input argument you want to move. Click either Move Up or Move

Down to reorder the input argument. To change the order of outputs: 1. In Rules Designer, select the Decision Functions navigation tab. 2. Select the decision function to edit and click the Edit icon or double-click the decision function icon.

3. Select the output argument you want to move. Click either Move Up or Move

Down to reorder the output argument.

6.3 What You Need to Know About Decision Functions

A decision function is a function that is configured declaratively.

6.3.1 What You May Need to Know About Rule Firing Limit Option for Debugging Rules

The Rule Firing Limit allows you to set the maximum number of steps rule firings that are allowed at runtime. Using this option and specifying a value other than unlimited can help you debug certain rule design problems and in some cases might help prevent java.lang.OutOfMemoryError errors at runtime. This is can be useful when debugging infinitely recursive rule firings.

6.3.2 What You May Need to Know to About Decision Function Arguments

Oracle Business Rules generates a corresponding RL Language function for each decision function. The signature of a generated decision function is similar to: function nameInputFactType1 input1, ... InputFactTypeN inputN returns List In a decision function, each parameter is generated depending on the List option, with the decision function input, as follows: ■ Input argument, List option unselected: for FactTypei the input must be a single object and the assertion applies only to that single input object. ■ Input List option selected: ListFactTypei the input must be a List of objects and the assertion applies to each object in the input List java.util.List. The generated RL Language function includes calls either to assert or assertTree for each argument, depending on the decision function Input option, Tree. When Tree is unselected the input is asserted using the assert function. When Tree is selected, the input is asserted using the assertTree function. When Tree is selected it is expected that the input object or objects are the root of an object tree that is connected in one-to-many relationships with other objects using List or array type properties. For the decision function selected rulesets, as specified in the Rulesets and Decision Functions area Selected box, the generated RL Language function includes a call to run with the selected rulesets in the selected ruleset stack order. The generated RL Language function returns a list. The list has an element for each decision function output in order. If the output is declared to be a list, then the corresponding element is a list. However, if the output is not declared to be a list, then the corresponding element is the output fact or null if there is no output fact of the 6-6 Oracle Fusion Middleware Users Guide for Oracle Business Rules declared type. If an output is not declared to be a list, and more than one output fact of the specified type is found in the working memory of Oracle Business Rules Engine, then an exception is thrown. After you edit a decision function, for example, to change or add inputs and outputs, the changes are visible in BPEL for new Business Rule activities. However, the changes are not visible to existing Business Rule activities. For more information, see Getting Started with Oracle Business Rules in the Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

6.3.3 What You May Need to Know About the Decision Function Stateless Option