background preloader

Business Rules

Facebook Twitter

Oracle Business Rules Frequently Asked Questions. This appendix contains frequently asked questions about Oracle Business Rules.

Oracle Business Rules Frequently Asked Questions

C.1 Why Do Rules Not Fire When A Java Object is Asserted as a Fact and Then Changed Without Using the Modify Action? When a Java object has been asserted and then the object is changed without using the modify action, the object must be re-asserted in the Rules Engine. Therefore, if a rule associated with the changed Java object does not fire, this means that the Rules Engine did not re-evaluate any rule conditions and did not activate any rules. Thus, when a Java object changes without using the modify action, the object must be re-asserted in the Rules Engine. C.3 How Does a RuleSession Handle Concurrency and Synchronization? Method calls on an Oracle Business Rules RuleSession object are thread-safe such that calls by multiple threads do not cause exceptions at the RuleSession level.

Oracle Business Rules functions are not synchronized by default. For the case where Thread-1 includes the following: Note: Testing Business Rules. You can test your rules and Decision Tables from Rules Designer by creating an Oracle Business Rules Function.

Testing Business Rules

In an SOA application or in an application that accesses Oracle Business Rules with a decision function with a web service, you can test the rules at runtime with Oracle Enterprise Manager Fusion Middleware Control Console using the Test function. You can define a test function to run without deploying an application. This allows you to call a decision function at runtime and to test data model elements and rulesets. 8.1.1 How to Test Rules Using a Test Function in Rules Designer You can use Oracle Business Rules Functions to test rules from within Rules Designer. To enable logging you call RL.watch.all(). For more information about functions, see Section 2.5, "Working with Oracle Business Rules Functions".

To test rules using a test function: 8.1.2 What You Need to Know About Testing Using an Oracle Business Rules Function. Troubleshooting. This appendix contains workarounds and solutions for issues you may encounter when using Oracle Business Rules. The following topics are covered: D.1 Getter and Setter Methods are not Visible Rules Designer does not list the methods supporting a Java bean property in choice lists; only the bean properties are visible. For example, a Java bean with a property named Y must have at least a getter method getY() and may also have a setter method setY(y-type-param). All of properties and methods (including getter and setter that compose the properties) are displayed when viewing the Java FactType. D.2 Java Class with Only a Property Setter In Java the Java Bean introspector includes write-only properties. For example, if a bean Foo only has the method setProp1(int i), then you cannot use the following in Oracle RL: Foo f = new Foo(prop1: 0) D.3 Renaming a Dictionary or Dictionary Package Note that this the rename operation changes the name of the dictionary but not the alias.

Decision Tables. After you create a Decision Table there are operations that you may want to perform on the Decision Table, including the following: 5.3.1 Introduction to Decision Table Operations After you create a Decision Table you may want to modify the contents of the Decision Table to produce a Decision Table that includes a complete set of rules for all cases, or to produce a Decision Table that provides the least number of rules for the cases. 5.3.1.1 Understanding Decision Table Split and Compact Operations The split and compact operations allow you to manipulate the contents of the condition cells in a Decision Table.

Decision Tables

The split table operation creates a rule for every combination of buckets across the conditions. When you want to apply match conditions for the "do not care" values in a Decision Table and create a match case for each cell, you use the split table operation. Split can be applied to an entire Decision Table or to a single condition row. Table 5-3 Summary of Split Operation.