cancel
Showing results for 
Search instead for 
Did you mean: 

List of callActivity

houstoniasian
Champ in-the-making
Champ in-the-making
I have a main process that would call several callActivity.

Is there an API or REST service call to give me a list of all the callActivity of the process?  If not, how do we get around it other than that we have to write a parser to parse the xml file to look for "callActivity" tags?

Tan
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
You can try to get it from repository service API and model.

ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ( ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition( processDefinitionId ));

        for (ActivityImpl activity : processDefinition.getActivities()) {
        …..
        }

houstoniasian
Champ in-the-making
Champ in-the-making
The above block of codes give me the list of ALL activities which include gateway, end events…in the process.  What I am looking for is the id of the "calledElement" of CallActivity.  I'm trying to dig in to look at ActivityImpl class for further info but I couldn't find it in Activiti JavaDocs.  What am I missing?

Tan

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Tan,

From the collection

processDefinition.getActivities()

you can filter callActivities. Only activity with activityBehavior set to CallActivityBehavior will call external subprocess. Id of the called process is stored in org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior#processDefinitonKey.

Regards
Martin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.