flowable/flowable-engine · warning · FlowableIllegalArgumentException
Case instance with id '${caseInstance.getId()}' has no graph
Error message
Case instance with id '${caseInstance.getId()}' has no graphical notation defined. What it means
getCaseInstanceDiagram returns this error when the case instance's case definition has no graphical notation (no diagram resource) defined. The library throws FlowableIllegalArgumentException because a PNG cannot be produced for a model without BPMN/CMMN DI diagram information.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceDiagramResource.java:81
CaseDefinition caseDef = repositoryService.getCaseDefinition(caseInstance.getCaseDefinitionId());
if (caseDef != null && caseDef.hasGraphicalNotation()) {
CmmnModel cmmnModel = repositoryService.getCmmnModel(caseDef.getId());
CaseDiagramGenerator diagramGenerator = cmmnEngineConfiguration.getCaseDiagramGenerator();
InputStream resource = diagramGenerator.generateDiagram(cmmnModel, "png", cmmnEngineConfiguration.getActivityFontName(), cmmnEngineConfiguration.getLabelFontName(),
cmmnEngineConfiguration.getAnnotationFontName(), cmmnEngineConfiguration.getClassLoader(), 1.0);
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.set("Content-Type", "image/png");
try {
return new ResponseEntity<>(IOUtils.toByteArray(resource), responseHeaders, HttpStatus.OK);
} catch (Exception e) {
throw new FlowableIllegalArgumentException("Error exporting diagram", e);
}
} else {
throw new FlowableIllegalArgumentException("Case instance with id '" + caseInstance.getId() + "' has no graphical notation defined.");
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Redeploy the case definition including graphical DI information from the CMMN modeler.
- Check caseDefinition.hasGraphicalNotation() / the definition's diagram resource before requesting the diagram.
- Handle the 409/400 response and fall back to a non-graphical representation of the case.
- Do not call the diagram endpoint for definitions known to be headless.
Example fix
// before
GET /cmmn-runtime/case-instances/case-123/diagram // definition has no DI
// after
if (caseDefinitionResponse.isGraphicalNotationDefined()) { /* call diagram endpoint */ } Defensive patterns
Strategy: fallback
Validate before calling
// Java
boolean hasDiagram = caseDefinition.hasGraphicalNotation();
if (!hasDiagram) { /* do not call the diagram endpoint */ } Try / catch
try { return fetchDiagram(id); }
catch (FlowableIllegalArgumentException e) { return renderModelXmlFallback(id); } Prevention
- Author CMMN models with DI diagram sections
- Check hasGraphicalNotation() before diagram requests
- Provide a non-graphical rendering path in clients
When it happens
Trigger: GET /cmmn-runtime/case-instances/{caseInstanceId}/diagram where the underlying case definition was deployed without diagram interchange information (no visual model in the XML).
Common situations: CMMN XML authored without DI/diagram sections (headless/generated models); models converted programmatically; deployments stripped of diagram info by build tooling.
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
- Error exporting diagram
- Case definition with id '${caseDefinition.getId()}' has no i
- ${aonfe.getMessage()}
- Illegal action: '${request.getAction()}'.
- Error exporting diagram
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/df311515356e0f67.
Report an issue: GitHub.