Rest Call to get SubTasks of ProcessInstanceId

Hi,

I have a ProcessInstance and it has three sub tasks.I am looking for a Rest Call to fetch the SubTasks based on ProcessInstanceId.

But I didnt find the rest call for this.

I tried below call but it is not returning all Sub Tasks.

http://localhost:8080/flowable-rest/service/runtime/process-instances/c22dfc55-9272-11e9-9efb-005056ab96de

Please help me with this.

Tasks are available via the /runtime/tasks endpoint you can query active tasks by Process Instance ID using the processInstanceId query parameter. Example:

http://localhost:8080/flowable-rest/service/runtime/tasks?processInstanceId=c22dfc55-9272-11e9-9efb-005056ab96de

Will

I tried this but my requirement is I need all Tasks of ProcessInstanceId.I believe the call you gave me will return only Active task, but I want all Tasks for that ProcessInstanceId.

Yes, calls to the runtime service will give you only active processes and tasks. You can get active and previously executed tasks using the history service:

http://localhost:8080/flowable-rest/service/history/historic-task-instances?processInstanceId=22158a63-9295-11e9-95e3-eaba79340052

Note that if async history is turned on the active tasks may be stale.

Will