Hi,
I have a simple rule that references a "Process" fact:-
package com.ford.nges.jboss.rules
import com.ford.nges.om.Constants
import com.ford.nges.om.Component
import com.ford.nges.om.ResourceEntry
import com.ford.nges.om.Process
import com.ford.nges.om.Machine
rule "A rule"
when
p:Process( )
then
System.out.println(p.toString());
end
However I receive the following error on builder.addPackageFromDrl(new
InputStreamReader(Main.class.getResourceAsStream("rules.drl"))); even
though I have an import statement.
Exception in thread "main" java.lang.Error: Unable to find
unambiguously defined class 'Process', candidates are:
[java.lang.Process, com.ford.nges.om.Process]
at
org.drools.semantics.java.ClassTypeResolver.resolveType(Unknown Source)
at org.drools.semantics.java.RuleBuilder.build(Unknown
Source)
at org.drools.semantics.java.RuleBuilder.build(Unknown
Source)
at org.drools.semantics.java.RuleBuilder.build(Unknown
Source)
at org.drools.compiler.PackageBuilder.addRule(Unknown
Source)
at org.drools.compiler.PackageBuilder.addPackage(Unknown
Source)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown Source)
at com.ford.nges.Main.main(Main.java:43)
If "Process" is referred to in the RHS or the Class name is not Process
I don't get the error.
Any thoughts?
With kind regards,
Michael Anstis
-------------------------------------------
Next Generation Estimating System
* Trafford House (Int) 8 718 2239
* Trafford House (Ext) +44 (0)1268 702239
* <mailto:manstis1@ford.com>