{"record":{"id":"e466e5a515b5a419","repo":"flowable/flowable-engine","slug":"dmn-repository-service-is-not-available","errorCode":null,"errorMessage":"DMN repository service is not available","messagePattern":"DMN repository service is not available","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/GetDecisionsForCaseDefinitionCmd.java","lineNumber":66,"sourceCode":"    }\n\n    @Override\n    public List<DmnDecision> execute(CommandContext commandContext) {\n        CaseDefinition caseDefinition = CaseDefinitionUtil.getCaseDefinition(caseDefinitionId);\n        \n        if (caseDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"Cannot find case definition for id: \" + caseDefinitionId, CaseDefinition.class);\n        }\n        \n        Case caseModel = CaseDefinitionUtil.getCase(caseDefinitionId);\n\n        if (caseModel == null) {\n            throw new FlowableObjectNotFoundException(\"Cannot find case definition for id: \" + caseDefinitionId, Case.class);\n        }\n\n        dmnRepositoryService = CommandContextUtil.getDmnEngineConfiguration(commandContext).getDmnRepositoryService();\n        if (dmnRepositoryService == null) {\n            throw new FlowableException(\"DMN repository service is not available\");\n        }\n\n        List<DmnDecision> decision = getDecisionsFromModel(caseModel, caseDefinition);\n\n        return decision;\n    }\n\n    protected List<DmnDecision> getDecisionsFromModel(Case caseModel, CaseDefinition caseDefinition) {\n        Set<String> decisionKeys = new HashSet<>();\n        List<DmnDecision> decisions = new ArrayList<>();\n        List<DecisionTask> decisionTasks = caseModel.getPlanModel().findPlanItemDefinitionsOfType(DecisionTask.class, true);\n\n        for (DecisionTask decisionTask : decisionTasks) {\n            if (decisionTask.getFieldExtensions() != null && decisionTask.getFieldExtensions().size() > 0) {\n                for (FieldExtension fieldExtension : decisionTask.getFieldExtensions()) {\n                    if (\"decisionTableReferenceKey\".equals(fieldExtension.getFieldName())) {\n                        String decisionReferenceKey = fieldExtension.getStringValue();\n                        if (!decisionKeys.contains(decisionReferenceKey)) {","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/GetDecisionsForCaseDefinitionCmd.java#L48-L84","documentation":"GetDecisionsForCaseDefinitionCmd needs the DMN engine's repository service to look up DMN decisions referenced by the case. CommandContextUtil.getDmnEngineConfiguration(...).getDmnRepositoryService() returned null, so the command throws FlowableException('DMN repository service is not available'). This indicates the DMN engine is not initialized/attached to the CMMN engine configuration.","triggerScenarios":"Executing getDecisionsForCaseDefinition in a setup where the DMN engine configuration is absent or not wired — e.g. standalone CMMN engine without flowable-dmn on the classpath or DMN engine disabled in the Flowable 6/7 configuration.","commonSituations":"Custom FlowableEngineAgenda/standalone cmmn-engine build without the DMN module dependency; using only flowable-cmmn-engine instead of the full flowable-spring-boot-starter; DMN engine bean not injected in a custom process engine configuration.","solutions":["Add the flowable-dmn-engine dependency (or use a starter that includes it) so the DMN engine initializes","Ensure the CMMN engine configuration's dmnEngineConfiguration is set (integrated configuration)","Check custom ProcessEngineConfiguration code did not disable/omit DMN initialization","Upgrade to an integrated Flowable configuration (flowable-spring-boot-starter-process/cmmn) rather than standalone engine jars"],"exampleFix":"// before (Maven)\n<dependency><groupId>org.flowable</groupId><artifactId>flowable-cmmn-engine</artifactId></dependency>\n// after\n<dependency><groupId>org.flowable</groupId><artifactId>flowable-cmmn-engine</artifactId></dependency>\n<dependency><groupId>org.flowable</groupId><artifactId>flowable-dmn-engine</artifactId></dependency>","handlingStrategy":"validation","validationCode":"boolean dmnAvailable = CommandContextUtil.getDmnEngineConfiguration(commandContext) != null\n    && CommandContextUtil.getDmnEngineConfiguration(commandContext).getDmnRepositoryService() != null;","typeGuard":null,"tryCatchPattern":"try { return getDecisionsForCaseDefinition(id); } catch (FlowableException e) { if (e.getMessage().contains(\"DMN repository service\")) { /* DMN engine missing */ } throw e; }","preventionTips":["Include flowable-dmn-engine when CMMN references DMN decisions","Use integrated starters so engine configurations wire automatically","Smoke-test decision lookup after engine setup changes"],"tags":["java","flowable","dmn","configuration","missing-dependency"],"backgroundTag":"missing-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}