flowable/flowable-engine · warning
Invalid reference in diagram interchange definition: could…
Error message
Invalid reference in diagram interchange definition: could not find {} What it means
processDI iterates the diagram interchange (DI) section of the CMMN XML, which references model element ids for positioning shapes. When a DI shape references an id that resolves to no plan item, criterion, or text annotation in the model, the reference cannot be visualized, so the parser logs this warning and drops the shape. Deployment continues.
Solutions
- Find the logged cmmnReference id in the XML's DI section and delete the stale shape/edge entry
- Re-export the diagram from the Flowable modeler so DI entries are regenerated against current element ids
- Synchronize ids: if you rename an element, update every DI bpmnElement reference to match
- If generated programmatically, only add DiagramElement entries for ids present in the CmmnModel
Example fix
<!-- before: stale DI reference --> <cmmnShape id="Shape_oldTask" cmmnElementRef="oldTask" ... /> <!-- after: removed, or ref updated to an existing id --> <cmmnShape id="Shape_renamedTask" cmmnElementRef="renamedTask" ... />
Defensive patterns
Strategy: validation
Validate before calling
Set<String> modelIds = collectAllElementIds(cmmnModel); // plan items + criteria + annotations
cmmnModel.getDiagrams().stream()
.flatMap(d -> d.getShapes().stream())
.map(s -> s.getCmmnElementRef())
.filter(ref -> ref != null && !modelIds.contains(ref))
.forEach(ref -> log.warn("Stale DI reference: {}", ref)); Prevention
- Never hand-edit element ids in CMMN XML without updating DI refs
- Regenerate diagrams from the modeler after model changes
- Add a pre-deploy check comparing DI cmmnElementRef values against model ids
When it happens
Trigger: A BPMNDiagram/BPMNPlane DI entry in the CMMN XML points at an element id (cmmnReference) absent from the model — typically because the referenced plan item/criterion/annotation was deleted or renamed in the modeler while the DI section kept the stale id.
Common situations: Hand-editing CMMN XML and changing element ids without updating the DI section; models round-tripped between tools where ids are regenerated; diff-merged XML where one side removed elements.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- A dynamically created plan item can only be injected into a…
- A dynamically created plan item can only be injected into a…
- A 'maxInstanceCount' on a repetition rule with value '0' is…
- a suspended
- activatedBefore is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c167e0160b91ba04.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/parser/CmmnParserImpl.java:149
if (!cmmnModel.getLocationMap().isEmpty()) {
List<String> planModelIds = new ArrayList<>();
for (Case caseObject : cmmnModel.getCases()) {
planModelIds.add(caseObject.getPlanModel().getId());
}
// Verify if all referenced elements exist
for (String cmmnReference : cmmnModel.getLocationMap().keySet()) {
if (planModelIds.contains(cmmnReference)) {
continue;
}
if (cmmnModel.findPlanItem(cmmnReference) == null && cmmnModel.getCriterion(cmmnReference) == null &&
cmmnModel.findTextAnnotation(cmmnReference) == null) {
logger.warn("Invalid reference in diagram interchange definition: could not find {}", cmmnReference);
}
}
for (Case caseObject : cmmnModel.getCases()) {
CaseDefinitionEntity caseDefinition = getCaseDefinition(caseObject.getId(), caseDefinitions);
if (caseDefinition != null) {
caseDefinition.setHasGraphicalNotation(true);
}
}
}
}
public CaseDefinitionEntity getCaseDefinition(String caseDefinitionKey, List<CaseDefinitionEntity> caseDefinitions) {
for (CaseDefinitionEntity caseDefinition : caseDefinitions) {
if (caseDefinition.getKey().equals(caseDefinitionKey)) {
return caseDefinition;
}
}View on GitHub (pinned to d6d39ce1c6)