[rules-users] Shadow fact problem?
Anstis, Michael (M.)
manstis1 at ford.com
Tue Mar 13 13:32:46 EDT 2007
Hi,
I am running 3.1-M1 and have (by way of example) two simple rules; A and
B as follows:-
rule "A"
when
$a1 : Attribute ( name == Constants.ATTRIBUTES_A, $pa :
number )
$a2 : Attribute ( name == Constants.ATTRIBUTES_B, $nc :
number )
$p : Process ( attributesList contains $a1,
attributesList contains $a2 )
then
double txy = doSomeMaths($pa, $nc, $p);
Attribute a = new Attribute(Constants.ATTRIBUTES_C,
txy);
$p.addAttribute(a);
assertLogical(a);
modify($p);
System.out.println("Rule 'A' fired");
end
rule "B"
when
$a1 : Attribute ( name == Constants.ATTRIBUTES_C, $txy :
number)
$p : Process( attributesList contains $a1 )
// <-- Line causing rule not to activate
then
double m = doSomeMoreMaths($txy, $p);
System.out.println("Rule 'B' fired");
end
Process exposes an ArrayList of Attribute objects (each having a
name\value pair).
When the content of the ArrayList held by Process is added to (Rule 'A')
the next rule (Rule 'B') is not being activated.
Can anybody provide any insight into how best a workaround can be
engineered?
With kind regards,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070313/1abb7f2d/attachment.html
More information about the rules-users
mailing list