I'm trying to list the tasks of JBPM users (ex: john) using REST API: http://localhost:8090/rest/server/queries/tasks/instances but it is returning empty even though there are tasks
Status 200 OK
{
"task-summary": []
}
Anyone can help?
If you're looking for a particular task detail, the correct REST endpoint to fetch that information from is as follows:
http://localhost:8090/rest/server/queries/tasks/instances/{taskInstanceId}
Where taskInstanceId is the placeholder for your task id.
In case you're looking for a tasks assigned to John, within a particular bpmn process, then the right REST api endpoint is:
http://localhost:8090/rest/server/queries/tasks/instances/pot-owners/{userId}
Where userId is the placeholder for the actual userId you're looking for. Bear in mind that in order for you to fetch someone else's tasks you need to set up the following system property in advance at kie-server level:
-Dorg.kie.server.bypass.auth.user=true
Hope it helps