flowable/flowable-engine · warning
Invalid reference in diagram interchange definition
Error message
Invalid reference in diagram interchange definition: {} does not reference a sequence flow What it means
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.
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
Example fix
// before <bpmndi:BPMNEdge bpmnElement="userTask1" ...> // after <bpmndi:BPMNEdge bpmnElement="flowToUserTask1" ...>
Defensive patterns
Strategy: validation
Validate before calling
// Edges must reference SequenceFlows
for (String ref : bpmnModel.getFlowLocationMap().keySet()) {
FlowElement fe = bpmnModel.getFlowElement(ref);
if (fe != null && !(fe instanceof SequenceFlow))
throw new IllegalArgumentException("BPMNEdge must reference a SequenceFlow: " + ref);
} Prevention
- Keep shape/edge DI entries consistent with element types
- Re-export diagrams from the modeler after model changes
When it happens
Trigger: A bpmndi:BPMNEdge's bpmnElement attribute points to a FlowNode (task, gateway, event) instead of a SequenceFlow; logged in BpmnParse.processDI().
Common situations: Swapped shape/edge DI entries from manual edits; modeler export anomalies where an edge wraps a node id.
Related errors
- Invalid reference in 'bpmnElement' attribute, sequenceFlow
- Invalid reference in diagram interchange definition
- Invalid reference in diagram interchange definition: could…
- Error while generating process diagram, image will not be…
- Process instance with id
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/f379402347faf523.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java:368
// ACT-1625: don't warn when artifacts are referenced from DI
if (bpmnModel.getArtifact(bpmnReference) == null) {
// check if it's a Pool or Lane, then DI is ok
if (bpmnModel.getPool(bpmnReference) == null && bpmnModel.getLane(bpmnReference) == null) {
LOGGER.warn("Invalid reference in diagram interchange definition: could not find {}", bpmnReference);
}
}
} else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof FlowNode)) {
LOGGER.warn("Invalid reference in diagram interchange definition: {} does not reference a flow node", bpmnReference);
}
}
for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) {
if (bpmnModel.getFlowElement(bpmnReference) == null) {
// ACT-1625: don't warn when artifacts are referenced from DI
if (bpmnModel.getArtifact(bpmnReference) == null) {
LOGGER.warn("Invalid reference in diagram interchange definition: could not find {}", bpmnReference);
}
} else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof SequenceFlow)) {
LOGGER.warn("Invalid reference in diagram interchange definition: {} does not reference a sequence flow", bpmnReference);
}
}
for (Process process : bpmnModel.getProcesses()) {
if (!process.isExecutable()) {
continue;
}
// Parse diagram interchange information
ProcessDefinitionEntity processDefinition = getProcessDefinition(process.getId());
if (processDefinition != null) {
processDefinition.setGraphicalNotationDefined(true);
for (String shapeId : bpmnModel.getLocationMap().keySet()) {
if (processDefinition.findActivity(shapeId) != null) {
createBPMNShape(shapeId, bpmnModel.getGraphicInfo(shapeId), processDefinition);
}
}
View on GitHub (pinned to d6d39ce1c6)