To get active task list

Couldnt get active service task. I have tried the below url and its not giving active service task, it return only user task.

 http://localhost:8080/engine-rest/task?processInstanceBusinessKey=BLK2020000000035

@Minisha_M this rest api will fetch records from ACT_RU_TASK table which will have only active user tasks.

If you want to query for active service tasks, subprocesses, events, etc then the data will be found in ACT_RU_EXECUTION table:

image


If you want to query for completed service tasks, subprocesses, events, etc then the data will be found in ACT_HI_ACTINST table:

image

Rest api’s are currently available to query only for historic activity instances: Activity Instance | docs.camunda.org

so no way to get active service task rite via rest api? correct?

Yes. As of now, rest api not there to fetch from ACT_RU_EXECUTION. You can access via Java API, so write a custom rest api and register the resources.

Messages, Event subscriptions can be queried (rest api) from ACT_RU_EXECUTION, not service tasks.


Refer this example for how to write custom-rest-api in camunda:

1 Like