<div dir="ltr">Btw, is there a more elegant way to get from Drools the rule he caught?<br>my way foeces the user to set the ruleId for each rule he writes.<br><br>Nadav.<br><br><div class="gmail_quote">On Thu, Oct 7, 2010 at 4:14 PM, Nadav Hashimshony <span dir="ltr"><<a href="mailto:nadavh@gmail.com">nadavh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hi,<br><br>I would like to return to the Fact object the rule id that was caught<br>
<br>my facts class has a memeber<br><br>String caughtRule;<br><br>and set and get<br><br>setCaughtRuleId (String s) { caughtRule= s;}<br>
String getCaughtRuleId () {return caughtRule;}<br><br><br>my rule looks like:<br><br>rule "01"<br>salience 100<br>activation-group "mygrp"<br> no-loop true<br> when<br> d : CFactClass( someMember matches "some-string");<br>
<br> then<br> System.out.println("01 caught");<br> d.setCaughtRuleId("01");<br> d.setCaught();<br>end<br><br><br>when the rule is fired i see the the setCaught() worked (its a boolean variable) but the setCaughtRuleId methids return empty string...<br>
<br>any ides?<br><br>Thanks<br>Nadav,.<br><br></div>
</blockquote></div><br></div>