{"record":{"id":"df311515356e0f67","repo":"flowable/flowable-engine","slug":"case-instance-with-id-caseinstance-getid-ha","errorCode":null,"errorMessage":"Case instance with id '${caseInstance.getId()}' has no graphical notation defined.","messagePattern":"Case instance with id '(.+?)' has no graphical notation defined\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"warning","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceDiagramResource.java","lineNumber":81,"sourceCode":"\n        CaseDefinition caseDef = repositoryService.getCaseDefinition(caseInstance.getCaseDefinitionId());\n\n        if (caseDef != null && caseDef.hasGraphicalNotation()) {\n            CmmnModel cmmnModel = repositoryService.getCmmnModel(caseDef.getId());\n            CaseDiagramGenerator diagramGenerator = cmmnEngineConfiguration.getCaseDiagramGenerator();\n            InputStream resource = diagramGenerator.generateDiagram(cmmnModel, \"png\", cmmnEngineConfiguration.getActivityFontName(), cmmnEngineConfiguration.getLabelFontName(),\n                            cmmnEngineConfiguration.getAnnotationFontName(), cmmnEngineConfiguration.getClassLoader(), 1.0);\n\n            HttpHeaders responseHeaders = new HttpHeaders();\n            responseHeaders.set(\"Content-Type\", \"image/png\");\n            try {\n                return new ResponseEntity<>(IOUtils.toByteArray(resource), responseHeaders, HttpStatus.OK);\n            } catch (Exception e) {\n                throw new FlowableIllegalArgumentException(\"Error exporting diagram\", e);\n            }\n\n        } else {\n            throw new FlowableIllegalArgumentException(\"Case instance with id '\" + caseInstance.getId() + \"' has no graphical notation defined.\");\n        }\n    }\n}\n","sourceCodeStart":63,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceDiagramResource.java#L63-L85","documentation":"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.","triggerScenarios":"GET /cmmn-runtime/case-instances/{caseInstanceId}/diagram where the underlying case definition was deployed without diagram interchange information (no visual model in the XML).","commonSituations":"CMMN XML authored without DI/diagram sections (headless/generated models); models converted programmatically; deployments stripped of diagram info by build tooling.","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."],"exampleFix":"// before\nGET /cmmn-runtime/case-instances/case-123/diagram // definition has no DI\n// after\nif (caseDefinitionResponse.isGraphicalNotationDefined()) { /* call diagram endpoint */ }","handlingStrategy":"fallback","validationCode":"// Java\nboolean hasDiagram = caseDefinition.hasGraphicalNotation();\nif (!hasDiagram) { /* do not call the diagram endpoint */ }","typeGuard":null,"tryCatchPattern":"try { return fetchDiagram(id); }\ncatch (FlowableIllegalArgumentException e) { return renderModelXmlFallback(id); }","preventionTips":["Author CMMN models with DI diagram sections","Check hasGraphicalNotation() before diagram requests","Provide a non-graphical rendering path in clients"],"tags":["rest-api","diagram","missing-diagram","flowable-cmmn"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}