Rule Author Syntax Error
678086Jan 4 2009 — edited Jan 5 2009I am new to this forum. Recently I have been working with Oracle SOA platform. I am trying to build rules in Rules Author using XML facts. The Java code is generated using JAXB. I am able to import the java types generated and use the same in defining RL functions and RuleSets. But when I generate RL code and do a RL Syntax check in the syntax check fails.
I am getting error as follow
Error:
A syntax error is found.
Error:'generated.DriverType' is undefined at line 4 column 14 in DM
1. ruleset DM
2.
3. {
4. fact class generated.DriverType supports xpath{ hide property ableToDrive, driverLicenseNumber, licenseType, preAccidents, preConvictions, vehicleType; };
5. fact class generated.ObjectFactory supports xpath;
6. fact class generated.RepositoryType supports xpath;{color}
So I have two questions. Why rule author is not able to find the Drivertype and if it is NOT loading the class files where should we keep the files for the RuleAuthor to see these classes. And also during runtime.
I am working with the following XML Schema
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://rules.oracle.com/carrental"
elementFormDefault="qualified"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:car="http://rules.oracle.com/carrental">
<element name="repository" type="car:repositoryType"/>
<p>
<complexType name="repositoryType">
<sequence>
<element name="driver" type="car:driverType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="driverType">
<sequence>
<element name="driver-license-number" type="string"/>
<element name="name" type="string"/>
<element name="age" type="int"/>
<element name="vehicle-type" type="string"/>
<element name="license-type" type="string"/>
<element name="pre-convictions" type="int" default="0"/>
<element name="pre-accidents" type="int" default="0"/>
<element name="able-to-drive" type="boolean"/>
</sequence>
</complexType>
</p>
<p>
</schema>
As you can see this is from the car example...
Thanks,
Jay
</p>