AnsweredAssumed Answered

How do I sort or filter by a process variable field when the variable is a Hibernate entity?

Question asked by fedd on Oct 19, 2017

I need to sort or search by variable firlds. Is there a way to get the prepared query object before it is executed, so that I am able to add my custom criteria there? like

 

q = taskService.createTaskQuery().or().taskCandidateUser(user).taskAssignee(user).endOr();

CriteriaQuery cq = q.getCriteriaQuery();

cq.join(...Customer...)... whatever to find tasks with Customers where their names start from any string

 

Probably your advice would be to modify myBatis mappings, but I need a generic solution:

 

For example, when requested, the new QueryImpl method named like .taskVariableFieldValueLike will have to join the main object table and then add a limitation field criteria, a sort of the following:

 

q = taskService.createTaskQuery().taskVariableFieldValueLike("lastName", "Cherezzabor%")

 

Hope you've got my problem, I am not the only one and you can show me the correct direction and details

Outcomes