In the documentation we can read for HumanTask search:
- o: name, priority, dueDate, state, userId, groupId, roleId, processDefinitionId, processInstanceId, parentActivityInstanceId, assigneeId, parentContainerId, displayName, reachedStateDate
- s: search on any field that can be used to order results
But if I try to order by groupId or roleId with this command:
bonita/API/bpm/humanTask?p=0&c=500&f=rootCaseId=3002&o=groupId
I get the following error:
[2020-09-23 11:19:40.310] [ERROR ] Invalid path: 'processsupervisor.groupId' (logger: org.hibernate.hql.internal.ast.ErrorCounter)
[2020-09-23 11:19:40.311] [ERROR ] Invalid path: 'processsupervisor.groupId'
Invalid path: 'processsupervisor.groupId'
.
.
2020-09-23 11:19:40.313] [FINE ] THREAD_ID=50 | HOSTNAME=bonita-test | Setting rollbackOnly on current transaction because callable 'org.bonitasoft.engine.api.impl.ServerAPIImpl$$Lambda$117/261716060@2f87e01c' has thrown an exception: org.bonitasoft.engine.exception.SearchException: org.bonitasoft.engine.persistence.SBonitaReadException: org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'processsupervisor.groupId' [
SELECT a
FROM org.bonitasoft.engine.core.process.instance.model.SHumanTaskInstance AS a
WHERE (a.logicalGroup2 = '3002') ORDER BY processsupervisor.groupId ASC,a.id ASC]
org.bonitasoft.engine.api.impl.ServerAPIRuntimeException: org.bonitasoft.engine.exception.SearchException: org.bonitasoft.engine.persistence.SBonitaReadException: org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'processsupervisor.groupId' [
SELECT a
FROM org.bonitasoft.engine.core.process.instance.model.SHumanTaskInstance AS a
WHERE (a.logicalGroup2 = '3002') ORDER BY processsupervisor.groupId ASC,a.id ASC]
I suppose the correct filter should by actorId, not roleId nor groupId!
Best regards