API to list all the tasks of a process

Is there an API to list all the task of a process? I dont need to list the open cases, archived etc what I need is information of a process, to be able to list all the tasks that a process have.

I there any API that I can use to get that result?

Thanks,

1 Like

Hello,

You can do that though the process definition API. Here is an example of how to use the ProcessDefinition API .

and here is the [javadoc]
[javadoc]: https://documentation.bonitasoft.com/javadoc/api/7.9/org/bonitasoft/engine/bpm/process/DesignProcessDefinition.html

The getFlowElementContainer() returns a FlowElementContainerDefinition with all the flow elements of the process (including activities)

best

Hi Mbonita thanks for the reply, is there any REST alternative to that function? sorry for not being clear in my question

Hi,

I guess you could use this one /API/bpm/process/:processId/design. The JSON returned is a representation of the DesignProcessDefinition instance of the given process id. Here is more information about all the resources available in the BPM Rest API

Hope it helps