flowable/flowable-engine · error · FlowableException
Multi instance inner behavior
Error message
Multi instance inner behavior ${innerActivityBehavior} is not supported for ${execution} What it means
When the case task's activity behavior is a MultiInstanceActivityBehavior, only a CaseTaskActivityBehavior as the inner behavior is supported. Any other inner behavior (e.g. service task inside a multi-instance wrapping a case task) cannot be triggered via this command and throws FlowableException.
Solutions
- Make the multi-instance inner activity a case task (caseTask with CaseTaskActivityBehavior)
- Remove multi-instance from the case task if a single trigger is intended
- If the inner behavior is another task type, use the matching trigger API for that type instead of the case-task trigger
- Validate the BPMN model (behavior wiring) at deployment time
Example fix
// before (BPMN): multi-instance wrapping a serviceTask <serviceTask id="st"><multiInstanceLoopCharacteristics/></serviceTask> // after: multi-instance wrapping a case task <callActivity id="ct" flowable:caseRef="myCase"><multiInstanceLoopCharacteristics/></callActivity>
Defensive patterns
Strategy: validation
Validate before calling
MultiInstanceActivityBehavior mi = (MultiInstanceActivityBehavior) behavior;
if (!(mi.getInnerActivityBehavior() instanceof CaseTaskActivityBehavior)) {
throw new IllegalStateException("multi-instance inner behavior must be a case task");
} Type guard
boolean supportsCaseTaskTrigger(ActivityBehavior b) {
if (b instanceof CaseTaskActivityBehavior) return true;
return b instanceof MultiInstanceActivityBehavior mi
&& mi.getInnerActivityBehavior() instanceof CaseTaskActivityBehavior;
} Try / catch
try {
trigger(executionId, vars);
} catch (FlowableException e) {
if (e.getMessage().startsWith("Multi instance inner behavior")) {
// fix the BPMN model or use the correct trigger for the inner task type
}
} Prevention
- Only wrap case tasks in multi-instance when the trigger path supports it
- Review multi-instance settings after refactoring the inner activity type
- Validate behavior wiring in a deployment-time model check
When it happens
Trigger: Modeling a multi-instance activity whose inner activity is not a case task, then attempting TriggerCaseTaskCmd on an execution of that multi-instance activity.
Common situations: Copy-pasting multi-instance configuration from another element; refactoring the inner task type to a service/receive task while keeping the case-task trigger code; invalid BPMN modeling not caught at deployment.
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
- Behavior is not supported for a case task for
- The process definition with id
- Call activity '" + executionActivityId + "' loop…
- Can only delete a child entity for a plan item with…
- Can only trigger a plan item that is in the ACTIVE state
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/af9725a3f35c7788.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/TriggerCaseTaskCmd.java:72
ExecutionEntity execution = (ExecutionEntity) processEngineConfiguration.getExecutionEntityManager().findById(executionId);
if (execution == null) {
throw new FlowableException("No execution could be found for id " + executionId);
}
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)