{"record":{"id":"b7f26d60bcfc59cc","repo":"flowable/flowable-engine","slug":"invalid-reference-in-bpmnelement-attribute-sequ","errorCode":null,"errorMessage":"Invalid reference in 'bpmnElement' attribute, sequenceFlow {} not found","messagePattern":"Invalid reference in 'bpmnElement' attribute, sequenceFlow (.+?) not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java","lineNumber":432,"sourceCode":"        target.setY((int) graphicInfo.getY());\n        target.setWidth((int) graphicInfo.getWidth());\n        target.setHeight((int) graphicInfo.getHeight());\n    }\n\n    public void createBPMNEdge(String key, List<GraphicInfo> graphicList) {\n        FlowElement flowElement = bpmnModel.getFlowElement(key);\n        if (flowElement != null && sequenceFlows.containsKey(key)) {\n            TransitionImpl sequenceFlow = sequenceFlows.get(key);\n            List<Integer> waypoints = new ArrayList<>();\n            for (GraphicInfo waypointInfo : graphicList) {\n                waypoints.add((int) waypointInfo.getX());\n                waypoints.add((int) waypointInfo.getY());\n            }\n            sequenceFlow.setWaypoints(waypoints);\n        } else if (bpmnModel.getArtifact(key) != null) {\n            // it's an association, so nothing to do\n        } else {\n            LOGGER.warn(\"Invalid reference in 'bpmnElement' attribute, sequenceFlow {} not found\", key);\n        }\n    }\n\n    public ProcessDefinitionEntity getProcessDefinition(String processDefinitionKey) {\n        for (ProcessDefinitionEntity processDefinition : processDefinitions) {\n            if (processDefinition.getKey().equals(processDefinitionKey)) {\n                return processDefinition;\n            }\n        }\n        return null;\n    }\n\n    /*\n     * ------------------- GETTERS AND SETTERS -------------------\n     */\n\n    public boolean isValidateSchema() {\n        return validateSchema;","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java#L414-L450","documentation":"In createBPMNEdge(), a DI edge's bpmnElement key matches neither a SequenceFlow nor an Artifact (association), so the waypoints cannot be attached. The engine warns and drops the edge geometry; the process still deploys.","triggerScenarios":"BpmnParse.createBPMNEdge() receives a key absent from both the model's flow elements and artifacts — typically a stale bpmnElement attribute on a BPMNEdge.","commonSituations":"Diagram XML referencing a deleted or renamed sequence flow; association removed while its DI edge remained; third-party modelers emitting inconsistent DI.","solutions":["Fix the bpmnElement attribute to point at an existing sequenceFlow id, or delete the orphan BPMNEdge","Re-export the diagram so edges match the current model","Diff the bpmndi section against the process element ids after model changes"],"exampleFix":"// before\n<bpmndi:BPMNEdge bpmnElement=\"oldFlow\" ...>\n// after\n<bpmndi:BPMNEdge bpmnElement=\"currentFlow\" ...>","handlingStrategy":"validation","validationCode":"// Check bpmnElement of each edge resolves to a sequenceFlow or association\nfor (String key : edgeKeys) {\n    if (bpmnModel.getFlowElement(key) == null && bpmnModel.getArtifact(key) == null)\n        logger.warn(\"bpmnElement {} not found; fix or drop the BPMNEdge\", key);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Update attached DI ids whenever sequence flow ids change","Use a single modeling tool as the source of truth for DI"],"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"}