{"record":{"id":"583cf9a9575f7047","repo":"flowable/flowable-engine","slug":"form-engine-is-not-initialized","errorCode":null,"errorMessage":"Form engine is not initialized","messagePattern":"Form engine is not initialized","errorType":"exception","errorClass":"FlowableIllegalStateException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/CaseTaskActivityBehavior.java","lineNumber":108,"sourceCode":"\n        caseInstanceBuilder.parentId(planItemInstanceEntity.getCaseInstanceId());\n\n        if (fallbackToDefaultTenant != null && fallbackToDefaultTenant) {\n            caseInstanceBuilder.fallbackToDefaultTenant();\n        }\n\n        Map<String, Object> finalVariableMap = new HashMap<>();\n        handleInParameters(planItemInstanceEntity, cmmnEngineConfiguration, finalVariableMap, cmmnEngineConfiguration.getExpressionManager());\n\n        // Needed for the form field handler later\n        Map<String, Object> variablesFromFormSubmission = null;\n\n        if (variableInfo != null) {\n\n            if (variableInfo.formInfo != null) {\n                FormService formService = CommandContextUtil.getFormService(commandContext);\n                if (formService == null) {\n                    throw new FlowableIllegalStateException(\"Form engine is not initialized\");\n                }\n\n                variablesFromFormSubmission = formService.getVariablesFromFormSubmission(planItemInstanceEntity.getPlanItemDefinitionId(), \"caseTask\", \n                        planItemInstanceEntity.getCaseInstanceId(), planItemInstanceEntity.getCaseDefinitionId(), ScopeTypes.CMMN, \n                        variableInfo.formInfo, variableInfo.formVariables, variableInfo.formOutcome);\n\n                finalVariableMap.putAll(variablesFromFormSubmission);\n            }\n\n            if (variableInfo.variables != null && !variableInfo.variables.isEmpty()) {\n                finalVariableMap.putAll(variableInfo.variables);\n            }\n        }\n\n        caseInstanceBuilder.businessKey(getBusinessKey(cmmnEngineConfiguration, planItemInstanceEntity, caseTask));\n        caseInstanceBuilder.variables(finalVariableMap);\n\n        if (sameDeployment) {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/CaseTaskActivityBehavior.java#L90-L126","documentation":"When a case task uses a form to provide its input variables, execute() fetches the FormService from the command context. If the form engine module is not deployed/configured in the engine configuration, getFormService returns null and this error is thrown. The case task cannot resolve form-submitted variables without the form engine.","triggerScenarios":"Executing a case task with a formInfo (form key/form definition) whose variables come from a form submission while the flowable-form-engine module is absent from the CmmnEngineConfiguration (no form engine deployed in the app).","commonSituations":"Standalone CMMN engine setup without flowable-form-engine on the classpath; Spring Boot app without the form engine auto-configuration; embedded engine built with an engine configuration lacking the form service.","solutions":["Add the flowable-form-engine dependency and deploy/register the form engine so FormService is available.","In Spring Boot, include the form engine in the process/cmmn engine configuration (Flowable 6 app engines set this up automatically).","If no form is needed, remove the form reference/formKey from the case task so no formInfo is created.","Replace form-based variable resolution with explicit in-parameter mappings on the case task."],"exampleFix":"// before\nCmmnEngineConfiguration cfg = CmmnEngineConfiguration\n    .createStandaloneInMemCmmnEngineConfiguration(); // no form engine\n// after\ncfg.setFormEngineConfiguration(formEngineConfiguration); // deploy form engine\n// or use org.flowable.app engine which wires form + cmmn together","handlingStrategy":"fallback","validationCode":"boolean formEngineAvailable = cmmnEngineConfiguration.getFormEngineConfiguration() != null;\nif (!formEngineAvailable) throw new IllegalStateException(\"form engine required for case tasks with forms\");","typeGuard":null,"tryCatchPattern":"try {\n    cmmnRuntimeService.startCaseInstance(builder);\n} catch (FlowableIllegalStateException e) {\n    if (e.getMessage().equals(\"Form engine is not initialized\")) {\n        // fall back to explicit variable mappings instead of forms\n    }\n}","preventionTips":["Include flowable-form-engine dependency whenever forms are used","Wire the form engine into the CMMN/app engine configuration","Avoid form references in case tasks for standalone CMMN deployments","Smoke-test form-based case tasks in CI with the production engine config"],"tags":["cmmn","form-engine","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"}