Hello.
This is my SearchOption :
SearchOptionsBuilder sob = new SearchOptionsBuilder(0, 100);
sob.sort(ActivityInstanceSearchDescriptor.ACTIVITY_TYPE, Order.ASC);
SearchOptions so = sob.done();
When I call
result = searchMyAvailableHumanTasks(userId, so).getResult();
I get error :
org.bonitasoft.engine.exception.SearchException: USERNAME=admin | org.bonitasoft.engine.persistence.SBonitaSearchException: Invalid sort key: activityType
The problem is that searchMyAvailableHumanTasks() returns HumanTaskInstance which is subinterface/subclass of ActivityInstance and I can’t sort by any parent field and I can only sort by fields defined in HumanTaskInstanceSearchDescriptor.
Is there any trick to sort by parent fields or it is impossible and only way to sort is by collection sort (code) ?