flowable/flowable-engine · error · FlowableException
To use the case service task a CaseInstanceService implement
Error message
To use the case service task a CaseInstanceService implementation needs to be available in the process engine configuration
What it means
The CMMN case service task (CaseTaskActivityBehavior) starts a case instance through the CaseInstanceService obtained from the process engine configuration. If no CaseInstanceService implementation is registered (typically because the flowable-cmmn engine/converter isn't wired into the process engine configuration), the behavior cannot proceed and throws this FlowableException.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CaseTaskActivityBehavior.java:69
private static final Logger LOGGER = LoggerFactory.getLogger(CaseTaskActivityBehavior.class);
private static final long serialVersionUID = 1L;
@Override
public void execute(DelegateExecution execution) {
ExecutionEntity executionEntity = (ExecutionEntity) execution;
CaseServiceTask caseServiceTask = (CaseServiceTask) executionEntity.getCurrentFlowElement();
CommandContext commandContext = CommandContextUtil.getCommandContext();
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(commandContext);
ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager();
CaseInstanceService caseInstanceService = processEngineConfiguration.getCaseInstanceService();
if (caseInstanceService == null) {
throw new FlowableException("To use the case service task a CaseInstanceService implementation needs to be available in the process engine configuration");
}
String businessKey = null;
if (!StringUtils.isEmpty(caseServiceTask.getBusinessKey())) {
Expression expression = expressionManager.createExpression(caseServiceTask.getBusinessKey());
businessKey = expression.getValue(execution).toString();
} else if (caseServiceTask.isInheritBusinessKey()) {
ExecutionEntity processInstance = executionEntityManager.findById(execution.getProcessInstanceId());
businessKey = processInstance.getBusinessKey();
}
String caseInstanceName = null;
if (StringUtils.isNotEmpty(caseServiceTask.getCaseInstanceName())) {
Expression caseInstanceNameExpression = expressionManager.createExpression(caseServiceTask.getCaseInstanceName());
caseInstanceName = caseInstanceNameExpression.getValue(execution).toString();
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add the flowable-cmmn-engine dependency and run via CmmnEngineConfiguration (or app engine) so the CaseInstanceService is registered automatically.
- Explicitly set an implementation: processEngineConfiguration.setCaseInstanceService(new DefaultCaseInstanceService(...)) if wiring engines manually.
- If cases are not intended, replace the case service task in the BPMN with a call activity or service task.
- Verify engine initialization order so the process engine is built after the CMMN engine registers its service.
Example fix
// before: plain process engine without cmmn ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()... // after: use the combined configuration so CaseInstanceService is available CmmnEngineConfiguration.createStandaloneCmmnEngineConfiguration()... // or add flowable-cmmn-engine dependency
Defensive patterns
Strategy: validation
Validate before calling
if (processEngineConfiguration.getCaseInstanceService() == null) {
throw new IllegalStateException("Case service task used but CaseInstanceService not configured — add flowable-cmmn-engine");
} Try / catch
try { runtimeService.startProcessInstanceByKey("procWithCaseTask"); }
catch (FlowableException e) { if (e.getMessage().contains("CaseInstanceService")) { enableCmmnIntegration(); } else { throw e; } } Prevention
- Add flowable-cmmn-engine dependency when processes use case tasks.
- Bootstrap via CmmnEngineConfiguration/AppEngine so services register automatically.
- Smoke-test every process type at startup in a canary environment.
- Scan BPMN for flowable:type="case" and assert CMMN integration in CI.
When it happens
Trigger: A process containing a case service task (flowable:type="case") executes while processEngineConfiguration.getCaseInstanceService() returns null — i.e. the engine was built without CMMN integration.
Common situations: Using ProcessEngineConfiguration standalone without flowable-cmmn-engine on the classpath; custom engine configuration that doesn't install the CMMN CaseInstanceService (e.g. missing cmmnEngineConfiguration/engines wiring); case task introduced into a BPMN-only deployment.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Form engine is not initialized
- Could not execute decision instance: no dmn service found. F
- Could not start process instance: no
- Form engine is not initialized
- DMN repository service is not available
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/77b64450686431fe.
Report an issue: GitHub.