Drools: Variables can not be used inside bindings -
i error
variables can not used inside bindings
on following drools-rule code
rule "mingapsbetweenappointments" when $leftassignment : appointmentrequest(feasibleappointment != null) $totalvalue : number( ) accumulate( appointmentrequest(feasibleappointment != null, $leftassignment.requestid != requestid, $quality : this.getoccupiedsurroundingsvalue($leftassignment)), sum( $quality ) ) // error line scoreholder.addsoftconstraintmatch(kcontext, $totalvalue.intvalue()); end
although found post question, it's not helping me much, need call function getoccupiedsurroundingsvalue other appointmentrequests, they're related.
any appreciated.
that code should work. there's nothing wrong far can see. double check if it's same code you're executing it. use similar code in examples , work.
if it's ok, might bug in drools expert. there 2 ways proceed:
the easy way: repost question on the drools mailing list, maybe edson or wolfgang sees don't. post jira if no 1 sees user-mistake.
the fastest way solve problem: create new test in misctest proves case , submit pull request. either find out you're doing wrong or prove without shadow of doubt there's bug need fix asap :)
Comments
Post a Comment