Hi, Filip,
Sorry for taking me this long. My DB was corrupted and I had to rebuild it. Now I have it.
Here is what I have. I built my spring boot by following the blog: https://blog.flowable.org/2018/12/19/building-your-own-flowable-spring-boot-application/
As far as I can tell, this blog builds almost identical application as flowable-rest.war is.
In my system, I have two groups: managers (admin, admin.approver) and approvers(approver, admin.approver). admin.approver user is in both groups.
I started two process instances, one is waiting for user task with candidategroup=managers and the other one with candidategroup=approvers.
If I do a GET http://winchester:8080/demo-flowable/process-api/runtime/tasks/, I saw both of the tasks:
{“data”:[{“id”:“272613d1-4f31-11ea-9393-00155d7357f8”,“url”:“http://winchester:8080/demo-flowable/process-api/runtime/tasks/272613d1-4f31-11ea-9393-00155d7357f8",“owner”:null,“assignee”:null,“delegationState”:null,“name”:"Approve or reject”,“description”:null,“createTime”:“2020-02-14T08:51:51.703-05:00”,“dueDate”:null,“priority”:50,“suspended”:false,“claimTime”:null,“taskDefinitionKey”:“approveOrReject”,“scopeDefinitionId”:null,“scopeId”:null,“scopeType”:null,“tenantId”:"",“category”:null,“formKey”:null,“parentTaskId”:null,“parentTaskUrl”:null,“executionId”:“2704a918-4f31-11ea-9393-00155d7357f8”,“executionUrl”:“http://winchester:8080/demo-flowable/process-api/runtime/executions/2704a918-4f31-11ea-9393-00155d7357f8",“processInstanceId”:“2702380d-4f31-11ea-9393-00155d7357f8”,“processInstanceUrl”:“http://winchester:8080/demo-flowable/process-api/runtime/process-instances/2702380d-4f31-11ea-9393-00155d7357f8”,“processDefinitionId”:“AccountOperation:1:ff1126d9-4f30-11ea-9393-00155d7357f8”,“processDefinitionUrl”:“http://winchester:8080/demo-flowable/process-api/repository/process-definitions/AccountOperation:1:ff1126d9-4f30-11ea-9393-00155d7357f8”,“variables”:[]},{“id”:“5d553b7b-4f31-11ea-9393-00155d7357f8”,“url”:“http://winchester:8080/demo-flowable/process-api/runtime/tasks/5d553b7b-4f31-11ea-9393-00155d7357f8”,“owner”:null,“assignee”:null,“delegationState”:null,“name”:"Approve or reject request”,“description”:null,“createTime”:“2020-02-14T08:53:22.607-05:00”,“dueDate”:null,“priority”:50,“suspended”:false,“claimTime”:null,“taskDefinitionKey”:“approveTask”,“scopeDefinitionId”:null,“scopeId”:null,“scopeType”:null,“tenantId”:"",“category”:null,“formKey”:null,“parentTaskId”:null,“parentTaskUrl”:null,“executionId”:“5d553b77-4f31-11ea-9393-00155d7357f8”,“executionUrl”:“http://winchester:8080/demo-flowable/process-api/runtime/executions/5d553b77-4f31-11ea-9393-00155d7357f8",“processInstanceId”:“5d553b73-4f31-11ea-9393-00155d7357f8”,“processInstanceUrl”:“http://winchester:8080/demo-flowable/process-api/runtime/process-instances/5d553b73-4f31-11ea-9393-00155d7357f8”,“processDefinitionId”:“holidayRequest:1:143bb34c-4f31-11ea-9393-00155d7357f8”,“processDefinitionUrl”:“http://winchester:8080/demo-flowable/process-api/repository/process-definitions/holidayRequest:1:143bb34c-4f31-11ea-9393-00155d7357f8”,“variables”:[]}],“total”:2,“start”:0,“sort”:“id”,“order”:“asc”,"size”:2}
Here is my POST query:
POST http://winchester:8080/demo-flowable/process-api/query/tasks
{ “candidateUser” : “approver” }
I got back one task:
{
“data”: [
{
“id”: “272613d1-4f31-11ea-9393-00155d7357f8”,
“url”: “http://winchester:8080/demo-flowable/process-api/runtime/tasks/272613d1-4f31-11ea-9393-00155d7357f8”,
“owner”: null,
“assignee”: null,
“delegationState”: null,
“name”: “Approve or reject”,
“description”: null,
“createTime”: “2020-02-14T08:51:51.703-05:00”,
“dueDate”: null,
“priority”: 50,
“suspended”: false,
“claimTime”: null,
“taskDefinitionKey”: “approveOrReject”,
“scopeDefinitionId”: null,
“scopeId”: null,
“scopeType”: null,
“tenantId”: “”,
“category”: null,
“formKey”: null,
“parentTaskId”: null,
“parentTaskUrl”: null,
“executionId”: “2704a918-4f31-11ea-9393-00155d7357f8”,
“executionUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/executions/2704a918-4f31-11ea-9393-00155d7357f8”,
“processInstanceId”: “2702380d-4f31-11ea-9393-00155d7357f8”,
“processInstanceUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/process-instances/2702380d-4f31-11ea-9393-00155d7357f8”,
“processDefinitionId”: “AccountOperation:1:ff1126d9-4f30-11ea-9393-00155d7357f8”,
“processDefinitionUrl”: “http://winchester:8080/demo-flowable/process-api/repository/process-definitions/AccountOperation:1:ff1126d9-4f30-11ea-9393-00155d7357f8”,
“variables”: []
}
],
“total”: 1,
“start”: 0,
“sort”: “id”,
“order”: “asc”,
“size”: 1
}
If I POST http://winchester:8080/demo-flowable/process-api/query/tasks
{ “candidateUser” : “admin” }
I got back the other task:
{
“data”: [
{
“id”: “5d553b7b-4f31-11ea-9393-00155d7357f8”,
“url”: “http://winchester:8080/demo-flowable/process-api/runtime/tasks/5d553b7b-4f31-11ea-9393-00155d7357f8”,
“owner”: null,
“assignee”: null,
“delegationState”: null,
“name”: “Approve or reject request”,
“description”: null,
“createTime”: “2020-02-14T08:53:22.607-05:00”,
“dueDate”: null,
“priority”: 50,
“suspended”: false,
“claimTime”: null,
“taskDefinitionKey”: “approveTask”,
“scopeDefinitionId”: null,
“scopeId”: null,
“scopeType”: null,
“tenantId”: “”,
“category”: null,
“formKey”: null,
“parentTaskId”: null,
“parentTaskUrl”: null,
“executionId”: “5d553b77-4f31-11ea-9393-00155d7357f8”,
“executionUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/executions/5d553b77-4f31-11ea-9393-00155d7357f8”,
“processInstanceId”: “5d553b73-4f31-11ea-9393-00155d7357f8”,
“processInstanceUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/process-instances/5d553b73-4f31-11ea-9393-00155d7357f8”,
“processDefinitionId”: “holidayRequest:1:143bb34c-4f31-11ea-9393-00155d7357f8”,
“processDefinitionUrl”: “http://winchester:8080/demo-flowable/process-api/repository/process-definitions/holidayRequest:1:143bb34c-4f31-11ea-9393-00155d7357f8”,
“variables”: []
}
],
“total”: 1,
“start”: 0,
“sort”: “id”,
“order”: “asc”,
“size”: 1
}
If I POST with body { “candidateUser” : “admin.approver” }, I got both tasks back:
{
“data”: [
{
“id”: “272613d1-4f31-11ea-9393-00155d7357f8”,
“url”: “http://winchester:8080/demo-flowable/process-api/runtime/tasks/272613d1-4f31-11ea-9393-00155d7357f8”,
“owner”: null,
“assignee”: null,
“delegationState”: null,
“name”: “Approve or reject”,
“description”: null,
“createTime”: “2020-02-14T08:51:51.703-05:00”,
“dueDate”: null,
“priority”: 50,
“suspended”: false,
“claimTime”: null,
“taskDefinitionKey”: “approveOrReject”,
“scopeDefinitionId”: null,
“scopeId”: null,
“scopeType”: null,
“tenantId”: “”,
“category”: null,
“formKey”: null,
“parentTaskId”: null,
“parentTaskUrl”: null,
“executionId”: “2704a918-4f31-11ea-9393-00155d7357f8”,
“executionUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/executions/2704a918-4f31-11ea-9393-00155d7357f8”,
“processInstanceId”: “2702380d-4f31-11ea-9393-00155d7357f8”,
“processInstanceUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/process-instances/2702380d-4f31-11ea-9393-00155d7357f8”,
“processDefinitionId”: “AccountOperation:1:ff1126d9-4f30-11ea-9393-00155d7357f8”,
“processDefinitionUrl”: “http://winchester:8080/demo-flowable/process-api/repository/process-definitions/AccountOperation:1:ff1126d9-4f30-11ea-9393-00155d7357f8”,
“variables”: []
},
{
“id”: “5d553b7b-4f31-11ea-9393-00155d7357f8”,
“url”: “http://winchester:8080/demo-flowable/process-api/runtime/tasks/5d553b7b-4f31-11ea-9393-00155d7357f8”,
“owner”: null,
“assignee”: null,
“delegationState”: null,
“name”: “Approve or reject request”,
“description”: null,
“createTime”: “2020-02-14T08:53:22.607-05:00”,
“dueDate”: null,
“priority”: 50,
“suspended”: false,
“claimTime”: null,
“taskDefinitionKey”: “approveTask”,
“scopeDefinitionId”: null,
“scopeId”: null,
“scopeType”: null,
“tenantId”: “”,
“category”: null,
“formKey”: null,
“parentTaskId”: null,
“parentTaskUrl”: null,
“executionId”: “5d553b77-4f31-11ea-9393-00155d7357f8”,
“executionUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/executions/5d553b77-4f31-11ea-9393-00155d7357f8”,
“processInstanceId”: “5d553b73-4f31-11ea-9393-00155d7357f8”,
“processInstanceUrl”: “http://winchester:8080/demo-flowable/process-api/runtime/process-instances/5d553b73-4f31-11ea-9393-00155d7357f8”,
“processDefinitionId”: “holidayRequest:1:143bb34c-4f31-11ea-9393-00155d7357f8”,
“processDefinitionUrl”: “http://winchester:8080/demo-flowable/process-api/repository/process-definitions/holidayRequest:1:143bb34c-4f31-11ea-9393-00155d7357f8”,
“variables”: []
}
],
“total”: 2,
“start”: 0,
“sort”: “id”,
“order”: “asc”,
“size”: 2
}
However, If I POST with { “candidateUsers” : “foo” } or { “candidateGroups” : “foo” }, I also got ALL the tasks back, but according to document, only tasks assigned to group foo or user foo should have been returned. So I think this is a bug.