Could not figure out how to use subprocess


I have created following process model to test out subprocess:

53 PM

But when I try to start a process instance for this, it says cannot start process with multiple start events. Funny thing is if I remove the ‘Start’ in the subprocess then it errors that ‘ActivitiException: No initial activity found for subprocess’.

Looking at the implementation, I see following is the part where the problem exists

    public Map<String, List<ExtensionElement>> getStartExtensionElements(String actProcessDefinitionId) {
        BpmnModel bpmnModel = repositoryService.getBpmnModel(actProcessDefinitionId);
        List<StartEvent> startEvents = bpmnModel.getMainProcess().findFlowElementsOfType(StartEvent.class);
        if (startEvents.size() != 1) {
            throw new BpmException("Cannot process process with multiple start events");
        StartEvent startEvent = startEvents.get(0);
        return startEvent.getExtensionElements();

Calling findFlowElementsOfType without second param fetches start event from subprocess as well. Instead findFlowElementsOfType should be called with second argument as false

Today I tested and its a UI bug as I am able to start the same process instance using ProcessRuntimeManager.


we have an issue about that:
Thanks for pointing out!

Thanks Max,

Sorry I did not find the youtrack issue when searching for this so raised duplicate. However when I am trying to access above youtrack issue (by url shared by you) its asking for authentication. Earlier I remember it was not needed.


Sorry, I fixed the URL