I have created a parse listener where I am able to read all activities within a bpmn. Is there a way to parse the call-activity or sub-process during parsing the parent bpmn?
I get the callactivity name like this: String bpmnFileName = elem.attributeMap.get("calledElement").value;
I don’t think it’s possible in general since the called process model might not be a part of this application. It could be in another application working with the same process DB.
@aravindhrs Looks like repositoryService is not available during process parsing. I see that it is available during event listeners of process instance though.
I would like to read from repositoryService dynamically the bpmn and not directly from the file. Here is what I have to register the process parseListener :
@Component
public class pluginRegisterer extends AbstractProcessEnginePlugin { @Override
public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
List preParseListeners = processEngineConfiguration.getCustomPreBPMNParseListeners();
if(preParseListeners == null) {
preParseListeners = new ArrayList();
processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
}
preParseListeners.add(new deployedProcessParseListener());
}
}
Here is the deployedProcessParseListener.java. repositoryService is null though.
@Slf4j @Component
public class deployedProcessParseListener extends AbstractBpmnParseListener {