flowable/flowable-engine · error · FlowableException
Behavior is not supported for a case task for
Error message
Behavior ${behavior} is not supported for a case task for ${execution} What it means
After excluding CaseTaskActivityBehavior and MultiInstanceActivityBehavior, the case task element's behavior is of an unrecognized type, so TriggerCaseTaskCmd cannot trigger it and throws FlowableException. This is a model/behavior wiring problem: the element does not behave as a triggerable case task.
Solutions
- Ensure the case task element uses CaseTaskActivityBehavior (or MultiInstance wrapping it)
- Remove custom behavior overrides that replaced the default case-task behavior
- Check for engine version mismatches between deployed models and the Flowable runtime
- Register proper support in the custom behavior factory if the behavior is intentionally custom
Example fix
// before: custom behavior replacing case task activity.setBehavior(new MyCustomBehavior()); // after: keep the standard case-task behavior activity.setBehavior(new CaseTaskActivityBehavior());
Defensive patterns
Strategy: validation
Validate before calling
ActivityBehavior b = caseServiceTask.getBehavior();
if (!(b instanceof CaseTaskActivityBehavior) && !(b instanceof MultiInstanceActivityBehavior)) {
throw new IllegalStateException("unsupported case task behavior: " + b.getClass());
} Type guard
boolean hasSupportedCaseTaskBehavior(FlowElement el) {
return el instanceof CaseServiceTask cst && cst.getBehavior() instanceof CaseTaskActivityBehavior;
} Try / catch
try {
trigger(executionId, vars);
} catch (FlowableException e) {
if (e.getMessage().startsWith("Behavior ")) {
// restore the default CaseTaskActivityBehavior for this element
}
} Prevention
- Avoid replacing default behaviors on case tasks with custom implementations
- Pin the Flowable engine version and re-test custom behavior factories on upgrade
- Log behavior class names in diagnostics to catch wiring regressions early
When it happens
Trigger: The execution's caseServiceTask (or its behavior field) was customized/replaced with a custom ActivityBehavior or an incompatible behavior class, then triggered via the case-task trigger path.
Common situations: Custom behavior factories or process-engine config overriding default behaviors; engine upgrades where behavior classes changed; manual manipulation of activity behavior in code.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Multi instance inner behavior
- Can only delete a child entity for a plan item with…
- Can only trigger a plan item that is in the ACTIVE state
- can't clear configuration beans
- can't clear configuration beans
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/cc2e144d39aa5a55.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/TriggerCaseTaskCmd.java:76
FlowElement flowElement = execution.getCurrentFlowElement();
if (!(flowElement instanceof CaseServiceTask caseServiceTask)) {
throw new FlowableException("No execution could be found with a case service task for " + execution);
}
Object behavior = caseServiceTask.getBehavior();
if (behavior instanceof CaseTaskActivityBehavior) {
((CaseTaskActivityBehavior) behavior).triggerCaseTaskAndLeave(execution, variables);
} else if (behavior instanceof MultiInstanceActivityBehavior) {
AbstractBpmnActivityBehavior innerActivityBehavior = ((MultiInstanceActivityBehavior) behavior).getInnerActivityBehavior();
if (innerActivityBehavior instanceof CaseTaskActivityBehavior) {
((CaseTaskActivityBehavior) innerActivityBehavior).triggerCaseTask(execution, variables);
} else {
throw new FlowableException("Multi instance inner behavior " + innerActivityBehavior + " is not supported for " + execution);
}
((MultiInstanceActivityBehavior) behavior).leave(execution);
} else {
throw new FlowableException("Behavior " + behavior + " is not supported for a case task for " + execution);
}
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)