After update to 6.7.2, Exception: Ambiguous method overloading for method variableValueEquals


after update flowable engine from 6.7.1 to 6.7.2, i got following exception, when i try to query processInstances by variable name and value. for example

					.variableValueEquals("bpm_abc", 'hello').count()
Ambiguous method overloading for method org.flowable.engine.impl.ProcessInstanceQueryImpl#variableValueEquals.
Cannot resolve which method to invoke for [class java.lang.String, class java.lang.String] due to overlapping prototypes between:
        [class java.lang.String, class java.lang.Object]
        [class java.lang.Object, class java.lang.String]

it seems like problem from ProcessInstanceQuery , but there is no changes here, right?

ProcessInstanceQuery variableValueEquals(String name, Object value);
ProcessInstanceQuery variableValueEquals(Object value);

before 6.7.2 there is no such exception

Thanks for letting us know about this @tommy_725. Seems like Groovy is using the ProcessInstanceQueryImpl to determine the methods and it is clashing with some of our protected methods. We’ve fixed this in Rename protected scope related methods to avoid clashing with Groovy … · flowable/flowable-engine@9787084 · GitHub.

For the time being you can try something like:

					.variableValueEquals("bpm_abc", (java.lang.Object) 'hello').count()


1 Like