{"record":{"id":"f379402347faf523","repo":"flowable/flowable-engine","slug":"invalid-reference-in-diagram-interchange-definitio-f37940","errorCode":null,"errorMessage":"Invalid reference in diagram interchange definition: {} does not reference a sequence flow","messagePattern":"Invalid reference in diagram interchange definition: (.+?) does not reference a sequence flow","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java","lineNumber":368,"sourceCode":"                    // ACT-1625: don't warn when artifacts are referenced from DI\n                    if (bpmnModel.getArtifact(bpmnReference) == null) {\n                        // check if it's a Pool or Lane, then DI is ok\n                        if (bpmnModel.getPool(bpmnReference) == null && bpmnModel.getLane(bpmnReference) == null) {\n                            LOGGER.warn(\"Invalid reference in diagram interchange definition: could not find {}\", bpmnReference);\n                        }\n                    }\n                } else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof FlowNode)) {\n                    LOGGER.warn(\"Invalid reference in diagram interchange definition: {} does not reference a flow node\", bpmnReference);\n                }\n            }\n            for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) {\n                if (bpmnModel.getFlowElement(bpmnReference) == null) {\n                    // ACT-1625: don't warn when artifacts are referenced from DI\n                    if (bpmnModel.getArtifact(bpmnReference) == null) {\n                        LOGGER.warn(\"Invalid reference in diagram interchange definition: could not find {}\", bpmnReference);\n                    }\n                } else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof SequenceFlow)) {\n                    LOGGER.warn(\"Invalid reference in diagram interchange definition: {} does not reference a sequence flow\", bpmnReference);\n                }\n            }\n\n            for (Process process : bpmnModel.getProcesses()) {\n                if (!process.isExecutable()) {\n                    continue;\n                }\n\n                // Parse diagram interchange information\n                ProcessDefinitionEntity processDefinition = getProcessDefinition(process.getId());\n                if (processDefinition != null) {\n                    processDefinition.setGraphicalNotationDefined(true);\n                    for (String shapeId : bpmnModel.getLocationMap().keySet()) {\n                        if (processDefinition.findActivity(shapeId) != null) {\n                            createBPMNShape(shapeId, bpmnModel.getGraphicInfo(shapeId), processDefinition);\n                        }\n                    }\n","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java#L350-L386","documentation":"BPMN parsing failure for diagram interchange information: a DI reference points at a model element that is not a sequence flow (nor an allowed artifact/pool/lane), indicating malformed DI in the BPMN XML.","triggerScenarios":"A bpmndi:BPMNEdge's bpmnElement attribute points to a FlowNode (task, gateway, event) instead of a SequenceFlow; logged in BpmnParse.processDI().","commonSituations":"Swapped shape/edge DI entries from manual edits; modeler export anomalies where an edge wraps a node id.","solutions":["Change the entry to a BPMNShape for that node id, or fix bpmnElement to reference the intended sequenceFlow","Regenerate the DI section from the modeling tool","Validate that every BPMNEdge targets a sequenceFlow id"],"exampleFix":"// before\n<bpmndi:BPMNEdge bpmnElement=\"userTask1\" ...>\n// after\n<bpmndi:BPMNEdge bpmnElement=\"flowToUserTask1\" ...>","handlingStrategy":"validation","validationCode":"// Edges must reference SequenceFlows\nfor (String ref : bpmnModel.getFlowLocationMap().keySet()) {\n    FlowElement fe = bpmnModel.getFlowElement(ref);\n    if (fe != null && !(fe instanceof SequenceFlow))\n        throw new IllegalArgumentException(\"BPMNEdge must reference a SequenceFlow: \" + ref);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep shape/edge DI entries consistent with element types","Re-export diagrams from the modeler after model changes"],"tags":["bpmn","diagram","di"],"backgroundTag":"invalid-identifier","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}