{"record":{"id":"1b485a015489cced","repo":"flowable/flowable-engine","slug":"invalid-reference-in-diagram-interchange-definitio-1b485a","errorCode":null,"errorMessage":"Invalid reference in diagram interchange definition: {} does not reference a flow node","messagePattern":"Invalid reference in diagram interchange definition: (.+?) does not reference a flow node","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java","lineNumber":358,"sourceCode":"\n    // Diagram interchange\n    // /////////////////////////////////////////////////////////////////\n\n    public void processDI() {\n        if (!bpmnModel.getLocationMap().isEmpty()) {\n\n            // Verify if all referenced elements exist\n            for (String bpmnReference : bpmnModel.getLocationMap().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                        // 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","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java#L340-L376","documentation":"In processDI(), a BPMNShape references an existing flow element that is not a FlowNode (e.g. a SequenceFlow or other non-node element). Shapes can only be drawn for flow nodes, so the engine warns and skips rendering that shape.","triggerScenarios":"A bpmndi:BPMNShape's bpmnElement attribute points to a FlowElement that is not a FlowNode — typically a sequenceFlow id — logged by BpmnParse.processDI().","commonSituations":"Modeler bug or manual edit placing a sequence flow id inside BPMNShape instead of BPMNEdge; mixing up shape/edge entries when hand-editing DI XML.","solutions":["Move the DI entry from BPMNShape to BPMNEdge (use bpmndi:BPMNEdge for sequence flows)","Regenerate the diagram from the modeler","Correct the bpmnElement attribute to reference the intended flow node id"],"exampleFix":"// before\n<bpmndi:BPMNShape bpmnElement=\"flow1\" ...>\n// after\n<bpmndi:BPMNEdge bpmnElement=\"flow1\" ...>","handlingStrategy":"validation","validationCode":"// Shapes must reference FlowNodes\nfor (Map.Entry<String, GraphicInfo> e : bpmnModel.getLocationMap().entrySet()) {\n    FlowElement fe = bpmnModel.getFlowElement(e.getKey());\n    if (fe != null && !(fe instanceof FlowNode))\n        throw new IllegalArgumentException(\"BPMNShape must reference a FlowNode: \" + e.getKey());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use BPMNEdge for sequence flows, BPMNShape only for nodes","Regenerate DI from the modeler instead of manual edits"],"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"}