Oracle® Application Server Release Notes 10g Release 3 (10.1.3.1.0) for HP-UX Itanium Part Number B32223-06 |
|
|
View PDF |
This chapter describes issues associated with Oracle Business Rules. It includes the following topic:
Section 17.2, "Multiple Inheritance Exception When Using XML Facts"
Section 17.3, "Deploying Rule Author on Non-Oracle Containers"
Section 17.4, "RL serviceDateValidation Error: Fact Class Should Be Declared Earlier"
To install Rule Author in a Standalone OC4J, do the following:
Deploy Rule Author EAR, found in /Disk2/rules/webapps/ruleauthor_s.ear
.
Create a security group "rule-administrators".
Create a Rule Author user, for example, ruleadmin
, and add this user to the "rule-administrators" group.
Copy the "rules" directory from an installation of Oracle Application Server into the ORACLE_HOME of the Standalone OC4J install.
Stop and restart OC4J.
When using XML Facts, the following error may occur when attempting an assertXPath
call:
Oracle Business Rules RL: RL code error RLRuntimeException: fact class multiple inheritance not supported at line 1 column 1 in main caused by MultipleInheritanceException: fact class 'mypkgname.MyClassNameImpl' cannot extend both 'mypkgname.MyClassNameType' and 'mypkgname.MyClassName'
This may be caused by the fact class declaration for ObjectFactory
appearing before the fact class declaration for the other JAXB classes in the generated RL.
The workaround for this issue is to delete ObjectFactory
from the imported XML facts list. There are no known scenarios in which rules will be written using this class, so it is safe to remove.
If this does not resolve the problem, it may be necessary to prevent a fact class declaration for top-level XML Object in the generated RL.
The workaround for this issue is to uncheck the "Support XPath Assertion" for the top-level object. In the case of the previous error message, this would be "mypkgname.MyClassName".
The documentation in section, C.3 of the Oracle Business Rules User's Guide incorrectly lists the location on the OracleAS Companion CD Disk of the non-Oracle .ear files for the supported non-Oracle containers. For some platforms, these .ear files are found on Disk3 of the OracleAS Companion CD Disk, and not on Disk2, as documented.
In certain cases, you can receive the following RL generation error:
"Fact class should be declared earlier ...".
For example, with the following generated RL for a data model:
ruleset DM { function CreateDataAndTestRules() { servOrders.ServiceOrderTypeImpl sot = new servOrders.ServiceOrderTypeImpl(); . . .
This causes the implemented Impl
class to be autofactclassed before the Type is factclassed. When the Type is then referred to in the rules, the following error is thrown:
ClassName: A syntax error is found. Error:fact class should be declared earlier at line 5 column 3 in serviceDateValidation
To fix this problem:
Classes with complex type hierarchies, for example they both extends a class and implements an interface must have classes referenced in a particular order. If the classes are not referenced in the correct order, then the rules engine cannot correctly determine the class hierarchy.
There are two ways to fix this problem:
Check "supports XPath" for the ServiceOrderType
class; this introduces a slight performance cost.
Change the code in the CreateDataAndTestRules
function. For example, change the instance creation to:
servOrders.ServiceOrderType sot = new servOrders.ServiceOrderTypeImpl();
This parses in the right order such that the superclass is created before the implementing class.