Actually there is a $h in the code… sorry for the omission in the email.
Just checked it again today – it gives me same result as yesterday :
rule …
when
o : Date from accumulate (
Parent( $h : height ) ,
init(;),
action(;),
reverse(),
result( $h )
)
then …
end
-Sergey
From: rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Mark Proctor
Sent: Wednesday, August 08, 2007
4:51 PM
To: Rules Users List
Subject: Re: [rules-users] bug in
"accumulate"
you didn't have a dollar on the field binding:
Parent( h : height )
$ is optional, but you must use the same in all places.
Mark
Manukyan, Sergey wrote:
Folks,
Using 4.0. Think I found a bug in accumulate. The variables defined inside <source pattern> cannot be recognized inside of other parts of accumulate (action, result)
f.e.
rule …
when
o : Date from accumulate (
Parent( h : height ) ,
init(;),
action(;),
reverse(),
result( $h )
)
then …
end
Produces : $h cannot be resolved
Stack trace:
at org.drools.rule.Package.checkValidity(Package.java:408)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
at com.lear.rules.RuleBaseFacade.getRuleBase(RuleBaseFacade.java:46)
-Sergey
********************** |
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users