cancel
Showing results for 
Search instead for 
Did you mean: 

What API call to use to get All the task names in a Process?

plehal
Champ in-the-making
Champ in-the-making
What API call to use to get All the task names in a deployed Process without instantiating it?
5 REPLIES 5

iam
Champ in-the-making
Champ in-the-making
see ProcessDiagramGenerator
ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processDefinitionId);

if (processDefinition != null) {
    for (ActivityImpl activity : processDefinition.getActivities()) {
      String type = (String) activity.getProperty("type");
      // …
    }
}

plehal
Champ in-the-making
Champ in-the-making
Thanks…I had almost forgotten about that……

I have a question for the development team though… Is there any plan or road map to move these necessary functions to public API or at least provide wrapper around the Impl API so that code generated for Activiti  is more of production quality and does not depend on any hidden APIs?

jbarrez
Star Contributor
Star Contributor
Actually yes. Tijs is currently writing a parser that parser BPMN 2.0 to a one-on-one object model.
The idea is that this parser will be the foundation for the engine parser, the Eclipse plugin, etc.

If all goes well, this should be part of the next release.

raghuramanpe
Champ in-the-making
Champ in-the-making
Hi, I need to list all the active user tasks including subprocess user tasks, how to do that?

jbarrez
Star Contributor
Star Contributor
subprocesses should be ok and part of the results.

If you'r talking about call activities, you'll need the id of the call activity unfortunately to fetch those tasks.