Sure -- I&#39;ve got a little tar file that contains the isolated example. Should I send it to you, or do you want me to create an issue in JIRA?<br><br>My current workaround (which is to reference all the fact classes that my dynamic rules might be interested in) seems to be working for now, but I don&#39;t really trust it since it seems so odd.
<br><br>Thanks!<br>Justine<br><br><div><span class="gmail_quote">On 1/22/07, <b class="gmail_sendername">Michael Neale</b> &lt;<a href="mailto:michael.neale@gmail.com">michael.neale@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Justine. It does sound like something is amiss, could you wrap up a unit test for this ? is that possible, then we can slap it to a JIRA and fix it.<br><br>Thanks,<br><br>Michael.<br><br><div><div><span class="e" id="q_1104c1b296044459_1">
<span class="gmail_quote">On 1/23/07, 
<b class="gmail_sendername">Justine Hlista</b> &lt;<a href="mailto:justine@vsasset.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">justine@vsasset.com</a>&gt; wrote:</span></span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><span class="e" id="q_1104c1b296044459_3">
Hello, <br><br>I am having some major problems working with dynamic rules. This may be a showstopper for us. Perhaps I have missed something in the docs. <br><br>The main problem is significantly different behavior depending on when I assert facts versus when I read drl files that use them. 
<br><br>It *appears* that I must class load all potential fact classes by referencing them in a dummy rule before I assert facts and and begin using dynamic rules against them. But that is a guess.<br><br>An example:<br>

<br>
I have 2 rule files and 1 fact class (class factA with a String field1).<br><br>---------------------<br>testCase1.drl:<br>---------------------<br>rule Bootstrap<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a : factA(field1==&quot;blah&quot;)
<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;bootstrap: a blah&quot;);<br>end<br>---------------------<br>testCase2.drl:<br>---------------------<br>rule &quot;aIsHello&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a: factA(field1==&quot;hello&quot;)
<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;a: &quot; + a.getField1());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a.setField1(&quot;world&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modify(a);<br>end<br><br>rule &quot;aIsWorld&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a: factA(field1 == &quot;world&quot;)
<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;Retracted a with field1 = &quot; + a.getField1());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retract(a);<br>end<br><br><br>If I first assert my factA (workingMemory.assertObject( new factA(&quot;hello&quot;)) ) before loading either drl file, only rule &quot;aIsHello&quot; fires. 
<br><br>If I first load testCase1.drl and then assert factA and then load testCase2.drl, then both rule &quot;aIsHello&quot; and rule &quot;aIsWorld&quot; both fire. This is the expected behavior (at least for me).<br><br>


If I modify testCase1.drl such that it does not reference class factA but some other class (e.g. factAtoo), then only rule &quot;aIsHello&quot; fires (as in the first case).<br><br>I am extremely confused, as I would at least expect the same behavior in all cases. For our application, it is critical that we be able to assert facts and modify rules independently and dynamically. What am I missing about how dynamic rules should work??
<br><br>Any help is greatly appreciated!<br><span><br>Justine<br><br><br><br>

</span><br></span></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org
</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br><br></blockquote></div>

<br>

<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br><br></blockquote></div><br>