Hi, i want to sort the tasks by the value of the process variables.
I explored solving it using native queries but i want the solution to be extensible for any type of task query.
Wanted to check the following:
(1) Is it possible to suffix the query generated by task query with where NAME_=’’ order by LONG_/TEXT_? what is your suggestion here? in that case, what is the direction, how do i create and inject a custom xml into mysql? Lets say i have 10000 records at any point of time, Will it improve my performance by sorting it at database level instead of application side sorting.
(2) Is there a way to exploit native query for this and make it generic for any task
(3) Is flowable planning to release this feature any time soon?
Is it possible to get the query generated by createTaskQuery() Method. I am planning to get the query generated by createTaskQuery and do a left join with task_var and do a order by on the variable value. Thanks.
Doing that is not that easy, you’d need to swap out many low-level things.
E.g. (didn’t test this), you’d have to override ProcessEngineConfigurationImpl#getMyBatisXmlConfigurationStream (or set the mybatisMappingFile) to read your xml config vs the default one. Assuming you would need to pass parameters to the query, you also would need to inject your own DataManager impl class into the process engine configuration (extending from the MybatisTaskManager).