<div dir="ltr">What would be the fully qualified name for a generated class, that is based upon a fact type (for example a type named "Foo") that is defined inside a declarative model? <div>How is the fully qualified name affected if the model resides in the Global Area, and is imported into multiple packages?</div>
<div><br></div><div>The reason for my question is that I have the following issue:</div><div><br></div><div>In the Global Area, I have a declarative model (named MyModel) with a definition like...</div><div><font face="courier new, monospace"> declare Foo</font></div>
<div><font face="courier new, monospace"> bar: String</font></div><div><font face="courier new, monospace"> version: String</font></div><div><font face="courier new, monospace"> end</font></div><div><br></div>
<div>In a package (com.mypkg.a), I have imported MyModel from the Global Area. I have a rule like...</div><div><br></div><div><font face="courier new, monospace"> rule "myRuleA"</font></div><div><font face="courier new, monospace"> ruleflow-group "firstGroup"</font></div>
<div><font face="courier new, monospace"> when</font></div><div><font face="courier new, monospace"> not Foo( bar=="bar" )</font></div><div><font face="courier new, monospace"> then</font></div><div><font face="courier new, monospace"> Foo fact = new Foo();</font></div>
<div><font face="courier new, monospace"> fact.setBar("bar");</font></div><div><font face="courier new, monospace"> fact.setVersion("1");</font></div><div><font face="courier new, monospace"> insert(fact);</font></div>
<div><br></div><div>In another package (com.mypkg.b), I have also imported MyModel from the Global Area. I have a rule like</div><div><br></div><div> <font face="courier new, monospace"> rule "myRuleB"</font></div>
<div><font face="courier new, monospace"> ruleflow-group "secondGroup"<br></font></div><div><font face="courier new, monospace"> when</font></div><div><font face="courier new, monospace"> Foo()</font></div>
<div><font face="courier new, monospace"> then</font></div><div><font face="courier new, monospace"> System.out.println("got at least one Foo");</font></div><div><br></div><div>Looking at logs, the rule myRuleA fires as is appropriate; however, the rule myRuleB does not fire, even though both ruleflow groups are represented in the ruleflow. I have verified that both of the ruleflow groups are activated, using the logs. My best guess at this point is that the class generated for fact type Foo is different for each package. So, how can I make sure that I am instantiating and checking for the same type across packages?</div>
<div><br></div><div><br></div><div><br clear="all"><div>Lance Leverich</div>
</div></div>