flowable/flowable-engine · error · FlowableException

Flowable 5 process definitions are not supported for ${execu

Error message

Flowable 5 process definitions are not supported for ${execution}

What it means

DeleteMultiInstanceExecutionCmd.execute() rejects process definitions created by the Flowable 5 engine; multi-instance execution deletion is only supported for Flowable 6+ definitions. The check uses Flowable5Util.isFlowable5ProcessDefinitionId on the execution's process definition.

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/DeleteMultiInstanceExecutionCmd.java:69

    @Override
    public Void execute(CommandContext commandContext) {
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
        ExecutionEntity execution = executionEntityManager.findById(executionId);
        
        BpmnModel bpmnModel = ProcessDefinitionUtil.getBpmnModel(execution.getProcessDefinitionId());
        Activity miActivityElement = (Activity) bpmnModel.getFlowElement(execution.getActivityId());
        MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = miActivityElement.getLoopCharacteristics();
        
        if (miActivityElement.getLoopCharacteristics() == null) {
            throw new FlowableException("No multi instance execution found for " + execution);
        }
        
        if (!(miActivityElement.getBehavior() instanceof MultiInstanceActivityBehavior)) {
            throw new FlowableException("No multi instance behavior found for " + execution);
        }
        
        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {
            throw new FlowableException("Flowable 5 process definitions are not supported for " + execution);
        }
        
        ExecutionEntity miExecution = getMultiInstanceRootExecution(execution);
        executionEntityManager.deleteChildExecutions(execution, "Delete MI execution", false);
        executionEntityManager.deleteExecutionAndRelatedData(execution, "Delete MI execution", false);
        
        int loopCounter = 0;
        if (multiInstanceLoopCharacteristics.isSequential()) {
            SequentialMultiInstanceBehavior miBehavior = (SequentialMultiInstanceBehavior) miActivityElement.getBehavior();
            loopCounter = miBehavior.getLoopVariable(execution, miBehavior.getCollectionElementIndexVariable());
        }
        
        if (executionIsCompleted) {
            VariableInstance nrOfCompletedInstancesVariable = miExecution.getVariableInstance(NUMBER_OF_COMPLETED_INSTANCES);
            if (!ParallelMultiInstanceLoopVariableType.TYPE_NAME.equals(nrOfCompletedInstancesVariable.getTypeName())) {
                Integer numberOfCompletedInstances = (Integer) nrOfCompletedInstancesVariable.getValue();
                miExecution.setVariableLocal(NUMBER_OF_COMPLETED_INSTANCES, numberOfCompletedInstances + 1);
            }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Upgrade the process definition to a Flowable 6 (BPMN-native) deployment and start new instances from it.
  2. For v5 instances, terminate the multi-instance via the v5 compatibility handler API instead of this command.
  3. Check the process definition id/version with RepositoryService to confirm whether it is a v5 definition before calling the command.
  4. Complete or delete the v5 process instance and redeploy as v6 if MI execution manipulation is required.

Example fix

// before
runtimeService.deleteMultiInstanceExecutionForExecution(executionId); // v5 definition
// after
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
    .processInstanceId(executionId) // or resolve via execution
    .singleResult();
if (!Flowable5Util.isFlowable5ProcessDefinitionId(pd.getId())) {
    runtimeService.deleteMultiInstanceExecutionForExecution(executionId);
}
Defensive patterns

Strategy: validation

Validate before calling

boolean isFlowable5(String processDefinitionId) {
    return processDefinitionId != null && processDefinitionId.contains(":") && versionCheckIsV5(processDefinitionId);
}
// guard: skip v5 definitions before calling deleteMultiInstanceExecutionForExecution

Try / catch

try { rs.deleteMultiInstanceExecutionForExecution(id); } catch (FlowableException e) { /* migrate to v6 or use v5 API */ }

Prevention

When it happens

Trigger: Passing an execution that belongs to a process definition deployed and executed via the Flowable 5 compatibility layer into the multi-instance delete command.

Common situations: Migrated projects still running legacy v5 process definitions side-by-side with v6; admin tooling or REST calls that apply v6-only MI operations to old process instances.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/7834193a13297b4b. Report an issue: GitHub.