{"record":{"id":"ab4370f012a37d20","repo":"flowable/flowable-engine","slug":"multiple-start-events-not-supported-for-subprocess","errorCode":null,"errorMessage":"multiple start events not supported for subprocess {}","messagePattern":"multiple start events not supported for subprocess (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/StartEventParseHandler.java","lineNumber":143,"sourceCode":"                if (eventDefinition instanceof org.flowable.bpmn.model.ErrorEventDefinition\n                        || eventDefinition instanceof MessageEventDefinition\n                        || eventDefinition instanceof SignalEventDefinition) {\n                    bpmnParse.getBpmnParserHandlers().parseElement(bpmnParse, eventDefinition);\n                } else {\n                    LOGGER.warn(\"start event of event subprocess must be of type 'error', 'message' or 'signal' for start event {}\", startEvent.getId());\n                }\n            }\n\n        } else { // \"regular\" subprocess\n\n            if (!startEvent.getEventDefinitions().isEmpty()) {\n                LOGGER.warn(\"event definitions only allowed on start event if subprocess is an event subprocess {}\", bpmnParse.getCurrentSubProcess().getId());\n            }\n            if (scope.getProperty(PROPERTYNAME_INITIAL) == null) {\n                scope.setProperty(PROPERTYNAME_INITIAL, startEventActivity);\n                startEventActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createNoneStartEventActivityBehavior(startEvent));\n            } else {\n                LOGGER.warn(\"multiple start events not supported for subprocess {}\", bpmnParse.getCurrentSubProcess().getId());\n            }\n        }\n\n    }\n\n}\n","sourceCodeStart":125,"sourceCodeEnd":150,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/StartEventParseHandler.java#L125-L150","documentation":"This warning is emitted during BPMN parsing when a regular subprocess contains more than one start event. Flowable supports only a single start event per subprocess; the first one becomes the initial activity (PROPERTYNAME_INITIAL) and any additional start events are ignored with this warning. The process will deploy but the extra start events will not function.","triggerScenarios":"Two or more <startEvent> elements inside the same <subProcess> (without triggeredByEvent). The second and later ones hit the branch where scope.getProperty(PROPERTYNAME_INITIAL) is already set, in StartEventParseHandler.createScopeStartEvent during executeParse.","commonSituations":"Modelers adding alternative entry points to a subprocess; copy-paste duplication of a start event in the diagram; importing BPMN from tools that permit multiple subprocess start events.","solutions":["Keep exactly one start event in the subprocess and remove or merge the others.","If alternative entry paths are needed, restructure: split into multiple subprocesses or use an exclusive gateway right after the single start event.","For multiple triggers, use an event subprocess (triggeredByEvent=\"true\"), which does support multiple typed start events."],"exampleFix":"// before\n<subProcess id=\"sub1\">\n  <startEvent id=\"startA\"/>\n  <startEvent id=\"startB\"/>\n</subProcess>\n// after\n<subProcess id=\"sub1\">\n  <startEvent id=\"startA\"/>\n  <sequenceFlow id=\"f1\" sourceRef=\"startA\" targetRef=\"gw1\"/>\n  <exclusiveGateway id=\"gw1\"/>\n</subProcess>","handlingStrategy":"validation","validationCode":"boolean hasMultipleStartEvents(SubProcess sub) {\n  long n = sub.getFlowElements().stream()\n      .filter(StartEvent.class::isInstance).count();\n  return n > 1;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enforce one start event per subprocess in your modeling tooling","Use event subprocesses for multiple typed triggers","Diff-check exported BPMN XML in CI for duplicate startEvent ids inside the same subprocess"],"tags":["bpmn","parser","subprocess","flowable"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}