{"record":{"id":"cbc8a75337f867d9","repo":"flowable/flowable-engine","slug":"dmn-engine-is-not-configured","errorCode":null,"errorMessage":"Dmn engine is not configured","messagePattern":"Dmn engine is not configured","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/util/CommandContextUtil.java","lineNumber":504,"sourceCode":"        return getCaseInstanceHelper(getCommandContext());\n    }\n\n    public static CaseInstanceHelper getCaseInstanceHelper(CommandContext commandContext) {\n        return getCmmnEngineConfiguration(commandContext).getCaseInstanceHelper();\n    }\n\n    public static CommandContext getCommandContext() {\n        return Context.getCommandContext();\n    }\n\n    public static DmnEngineConfigurationApi getDmnEngineConfiguration(CommandContext commandContext) {\n        return (DmnEngineConfigurationApi) commandContext.getEngineConfigurations().get(EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG);\n    }\n\n    public static DmnDecisionService getDmnRuleService(CommandContext commandContext) {\n        DmnEngineConfigurationApi dmnEngineConfiguration = getDmnEngineConfiguration(commandContext);\n        if (dmnEngineConfiguration == null) {\n            throw new FlowableException(\"Dmn engine is not configured\");\n        }\n        return dmnEngineConfiguration.getDmnDecisionService();\n    }\n\n    public static InternalTaskAssignmentManager getInternalTaskAssignmentManager(CommandContext commandContext) {\n        return getCmmnEngineConfiguration(commandContext).getTaskServiceConfiguration().getInternalTaskAssignmentManager();\n    }\n\n    public static InternalTaskAssignmentManager getInternalTaskAssignmentManager() {\n        return getInternalTaskAssignmentManager(getCommandContext());\n    }\n\n}\n","sourceCodeStart":486,"sourceCodeEnd":518,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/util/CommandContextUtil.java#L486-L518","documentation":"CommandContextUtil.getDmnRuleService(commandContext) looks up the DMN engine configuration from the command context's engine configurations; if the DMN engine is not deployed/configured alongside the CMMN engine, it throws this FlowableException instead of returning a null service. It guards against calling DMN decision logic in an installation without the DMN engine.","triggerScenarios":"A case (e.g. a decision task/table rule task in CMMN) executes logic requiring DmnDecisionService while the CmmnEngineConfiguration was built without a DMN engine (no dmnEngineConfiguration added to engineConfigurations under EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG).","commonSituations":"Embedding only flowable-cmmn-engine without flowable-dmn-engine in a standalone setup; building a custom process/case engine configuration that omits DMN; decision table plan items present in the model but DMN not on the classpath/config.","solutions":["Add the DMN engine dependency (flowable-dmn-engine / flowable-dmn-spring-configurator) and configure it, e.g. DmnEngineConfiguration.createDefaultDmnEngineConfiguration() and register it in the engine configurations","In Spring Boot use flowable-spring-boot-starter-cmmn plus DMN support or enable flowable.auto-deployment dmn resources","If DMN is intentionally absent, remove DMN-dependent decision tasks from case definitions or guard their execution","Verify EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG is present in commandContext.getEngineConfigurations() before invoking decision logic"],"exampleFix":"// before\nCmmnEngineConfiguration cfg = CmmnEngineConfiguration.createCmmnEngineConfiguration(); // DMN missing\n// after\nCmmnEngineConfiguration cfg = CmmnEngineConfiguration.createCmmnEngineConfiguration();\ncfg.addEngineConfiguration(EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG,\n    DmnEngineConfiguration.createDefaultDmnEngineConfiguration().buildDmnEngine().getDmnEngineConfiguration());","handlingStrategy":"validation","validationCode":"if (!commandContext.getEngineConfigurations().containsKey(EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG)) {\n    throw new IllegalStateException(\"DMN engine not configured; add flowable-dmn-engine to the configuration\");\n}","typeGuard":"boolean isDmnAvailable(CommandContext ctx) { return ctx.getEngineConfigurations().get(EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG) != null; }","tryCatchPattern":"try { return CommandContextUtil.getDmnRuleService(commandContext); } catch (FlowableException e) { if (\"Dmn engine is not configured\".equals(e.getMessage())) { throw new IllegalStateException(\"Enable flowable-dmn-engine in your engine configuration\", e); } throw e; }","preventionTips":["Include the DMN engine dependency when case models use decision tables","Register the DMN engine configuration under KEY_DMN_ENGINE_CONFIG in embedded setups","Validate engine configuration at startup with a smoke DMN decision"],"tags":["dmn","configuration","cmmn","flowable"],"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"}