SearchOptionsBuilder and sort parent fields
Hello. This is my SearchOption :
SearchOptions so = sob.done();
When I call
I get error :
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) ?
The filter / sort options you use must be valid with the search method you call. For instance, to search for HumanTaskInstance's, you must call ProcessAPI.searchHumanTaskInstances(), and in the SearchOptions parameter, you can only use filters / sort options from class HumanTaskInstanceSearchDescriptor
On the same pattern to search for ActivityInstance's, you must call ProcessAPI.searchActivities(), and in the SearchOptions parameter, you can only use filters / sort options from class ActivityInstanceSearchDescriptor
Hope this helps, Emmanuel.