{"record":{"id":"becae6e1a5dc0510","repo":"flowable/flowable-engine","slug":"invalid-reference-in-diagram-interchange-definitio-becae6","errorCode":null,"errorMessage":"Invalid reference in diagram interchange definition: could not find {}","messagePattern":"Invalid reference in diagram interchange definition: could not find (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java","lineNumber":354,"sourceCode":"            bpmnParserHandlers.parseElement(this, sequenceFlow);\n        }\n\n    }\n\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()) {","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java#L336-L372","documentation":"During DI (diagram interchange) processing in processDI(), a location (BPMNShape) reference points to an id that does not exist as a flow element, artifact, pool, or lane in the model. The engine logs a warning and skips the shape, so diagram rendering may be incomplete but deployment proceeds.","triggerScenarios":"A bpmndi:BPMNShape whose bpmnElement attribute references an id absent from the process model (not a FlowElement, Artifact, Pool, or Lane); logged in BpmnParse.processDI().","commonSituations":"Hand-edited BPMN XML with stale ids; modeler export where elements were deleted but DI entries remained; copy-paste of diagram sections referencing renamed elements.","solutions":["Find the id named in the log and either restore the element or remove its BPMNShape from the bpmndi section","Re-export the diagram from the modeling tool so DI entries are regenerated","Validate the XML so every bpmnElement reference resolves to a defined model element"],"exampleFix":"// before\n<bpmndi:BPMNShape bpmnElement=\"deletedTask\" .../>\n// after\n<!-- remove the orphan BPMNShape or re-add the task with id deletedTask -->","handlingStrategy":"validation","validationCode":"// Ensure every BPMNShape bpmnElement id exists in the model\nSet<String> ids = collectAllModelIds(bpmnModel); // flow elements + artifacts + pools + lanes\nfor (String ref : bpmnModel.getLocationMap().keySet()) {\n    if (!ids.contains(ref)) throw new IllegalArgumentException(\"Orphan DI shape: \" + ref);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always re-export diagrams after renaming/deleting elements","Avoid hand-editing bpmndi sections","Diff DI ids against model ids in CI"],"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"}