Updating drools version from 7.44.0.Final to 7.64.0.Final.

41 views
Skip to first unread message

Hazel Shefali John

unread,
Mar 9, 2022, 5:45:33 AM3/9/22
to Drools Usage
Hello,

I am currently working on updating drools version from 7.44.0.Final to 7.64.0.Final.

We have some customOperators defined extending BaseEvaluator.
I face an issue where a call on fireAllRules() ends up in the following method of EvaluatorWrapper.class file:
public void loadHandles(InternalFactHandle[] handles, InternalFactHandle rightHandle) which in turn calls the private static InternalFactHandle getFactHandle(Declaration declaration, InternalFactHandle[] handles).

This getFactHandles(Declaration declaration, InternalFactHandle[] handles) throws ArrayIndexOutOfBoundsException. I am expecting 2 entries in handles[ ] array but it shows just 1 due to which we get the ArrayIndexOutOfBoundsException.

It is suspected that the issue could be due to the following change made in drools version 7.52.0 as detailed out here :  https://docs.jboss.org/drools/release/7.57.0.Final/drools-docs/html_single/index.html#optimize-query-payload

While analyzing further, I updated my drools version to 7.49.0.Final and here it works successfully and the flow does not go to the
public void loadHandles(InternalFactHandle[] handles, InternalFactHandle rightHandle) & private static InternalFactHandle getFactHandle(Declaration declaration, InternalFactHandle[] handles) in the EvaluatorWrapper.class file.


Here is the Sample DRL... Problem is with the evaluateRight of the Custom Operation.
import java.util.Date;
...
...
dialect \"mvel\"

rule \"update\"

when
$en : Fact(path == \"Encounter\" )
$a : Fact(path == \"Account\" , (($en.getElement(\"subject\") referenceMatch this.getElement(\"subject\"))))
then
....
end
" }


Kindly let me know if anyone is aware of or has faced similar issues while updating the drools version.

Thank You,
Hazel
Reply all
Reply to author
Forward
0 new messages