[rules-users] Rule id / Rule name

Nadav Hashimshony nadavh at gmail.com
Thu Oct 7 10:14:12 EDT 2010


Hi,

I would like to return to the Fact object the rule id that was caught

my facts class has a memeber

String caughtRule;

and set and get

setCaughtRuleId (String s) { caughtRule= s;}
String getCaughtRuleId () {return caughtRule;}


my rule looks like:

rule "01"
salience 100
activation-group "mygrp"
    no-loop true
    when
        d : CFactClass(   someMember matches "some-string");

    then
        System.out.println("01 caught");
        d.setCaughtRuleId("01");
        d.setCaught();
end


when the rule is fired i see the the setCaught() worked (its a boolean
variable) but the setCaughtRuleId methids return empty string...

any ides?

Thanks
Nadav,.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101007/70011110/attachment.html 


More information about the rules-users mailing list