flowable/flowable-engine · warning

Invalid reference in 'bpmnElement' attribute, sequenceFlow

Error message

Invalid reference in 'bpmnElement' attribute, sequenceFlow {} not found

What it means

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.

Solutions

  1. Fix the bpmnElement attribute to point at an existing sequenceFlow id, or delete the orphan BPMNEdge
  2. Re-export the diagram so edges match the current model
  3. Diff the bpmndi section against the process element ids after model changes

Example fix

// before
<bpmndi:BPMNEdge bpmnElement="oldFlow" ...>
// after
<bpmndi:BPMNEdge bpmnElement="currentFlow" ...>
Defensive patterns

Strategy: validation

Validate before calling

// Check bpmnElement of each edge resolves to a sequenceFlow or association
for (String key : edgeKeys) {
    if (bpmnModel.getFlowElement(key) == null && bpmnModel.getArtifact(key) == null)
        logger.warn("bpmnElement {} not found; fix or drop the BPMNEdge", key);
}

Prevention

When it happens

Trigger: BpmnParse.createBPMNEdge() receives a key absent from both the model's flow elements and artifacts — typically a stale bpmnElement attribute on a BPMNEdge.

Common situations: Diagram XML referencing a deleted or renamed sequence flow; association removed while its DI edge remained; third-party modelers emitting inconsistent DI.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/b7f26d60bcfc59cc. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java:432

        target.setY((int) graphicInfo.getY());
        target.setWidth((int) graphicInfo.getWidth());
        target.setHeight((int) graphicInfo.getHeight());
    }

    public void createBPMNEdge(String key, List<GraphicInfo> graphicList) {
        FlowElement flowElement = bpmnModel.getFlowElement(key);
        if (flowElement != null && sequenceFlows.containsKey(key)) {
            TransitionImpl sequenceFlow = sequenceFlows.get(key);
            List<Integer> waypoints = new ArrayList<>();
            for (GraphicInfo waypointInfo : graphicList) {
                waypoints.add((int) waypointInfo.getX());
                waypoints.add((int) waypointInfo.getY());
            }
            sequenceFlow.setWaypoints(waypoints);
        } else if (bpmnModel.getArtifact(key) != null) {
            // it's an association, so nothing to do
        } else {
            LOGGER.warn("Invalid reference in 'bpmnElement' attribute, sequenceFlow {} not found", key);
        }
    }

    public ProcessDefinitionEntity getProcessDefinition(String processDefinitionKey) {
        for (ProcessDefinitionEntity processDefinition : processDefinitions) {
            if (processDefinition.getKey().equals(processDefinitionKey)) {
                return processDefinition;
            }
        }
        return null;
    }

    /*
     * ------------------- GETTERS AND SETTERS -------------------
     */

    public boolean isValidateSchema() {
        return validateSchema;

View on GitHub (pinned to d6d39ce1c6)