Query for Tasks with task variable name/value and 'like' condition

Hello,

Query for Tasks with task variable name/value and ‘like’ condition always returns empty

            request.setIncludeProcessVariables(true);
            request.setIncludeTaskLocalVariables(true);
            QueryVariable user = new QueryVariable();
            user.setName("taskUsers");
            user.setValue("%|"  + assignee + "|%");
            user.setOperation(QueryVariable.QueryVariableOperation.LIKE.getFriendlyName());
            user.setType("string");
            request.setTaskVariables(Collections.singletonList(user));

I’ve tried it both with TaskQueryRequest and HistoricTaskInstanceQueryRequest.

In Admin UI I see task variables which should definitely match.

Thanks,
–MG

Which database do you use?
What’s the value - does it take in account case sentitivity?

We’ve got unit tests (e.g. https://github.com/flowable/flowable-engine/blob/master/modules/flowable-rest/src/test/java/org/flowable/rest/service/api/runtime/TaskQueryResourceTest.java#L431) that test this, hence my guess for a db specific thing.

It doesn’t work when the string is >2000 chars.
Flowable stores its type as ‘longString’ and the value goes into different table where serializable types are stored. In Admin UI the type shows as ‘string’.

Thanks
–MG