Reputation: 113
We are using Camunda REST-API.
Suppose there is a process-definition with work-flow as follows :
Start Event --> User-Task A --> User-Task B --> User-Task C --> End Event
Say, one of my process-instance is at user-Task B.
Is there any possible way (by calling Camunda REST-API) to know :
What I'm aware of:
Thanks.
Upvotes: 1
Views: 3032
Reputation: 113
Answering my own question since its encouraged...Note that community version has been used. One can get the list of completed tasks through History REST API (/history/task) provided by Camunda using processinstanceid and finished (set to true) as query parameters. History REST API offers many functionalities which can be explored further.
However, listing all the tasks can only be possible using Model API but they shall be unordered. Its not wise to order tasks since hard-coding the order itself defeats the use of BPM. Algorithms like depth-first/breadth-first search, since the adjacency matrix shall need ordering of tasks wrt row/columns, would not help neither it would be wise to rely on topological sorting if graphs are cyclic.
Hope this helps somebody.
Upvotes: 3