flowable/flowable-engine · error · FlowableException

Flowable 5 process definitions are not supported

Error message

Flowable 5 process definitions are not supported

What it means

Thrown by resolveActiveExecution in AbstractDynamicStateManager when a dynamic process-instance change (move activity state, change state, migration) targets an execution whose process definition is a Flowable 5 definition. The dynamic state management APIs only support process definitions natively modeled in Flowable 6+, so Flowable 5 compatibility-mode definitions are explicitly rejected.

Solutions

  1. Redeploy the process as a native Flowable 6 BPMN definition and start new instances from it
  2. Terminate the legacy Flowable 5 process instance and start a fresh Flowable 6 instance at the desired state instead of using change-state
  3. Skip change-state/migration features for Flowable 5 instances; they are unsupported by design

Example fix

// before
runtimeService.createChangeActivityStateBuilder().processInstanceId(f5InstanceId).moveActivityIdTo("oldTask","newTask").changeState();
// after
if (!Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, procDefId)) {
    runtimeService.createChangeActivityStateBuilder().processInstanceId(procInstanceId).moveActivityIdTo("oldTask","newTask").changeState();
}
Defensive patterns

Strategy: validation

Validate before calling

ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId).singleResult();
boolean flowable5 = pd != null && Flowable5Util.isFlowable5ProcessDefinitionId(engineConfig.getCommandContext(), procDefId);
if (flowable5) throw new IllegalStateException("Change-state not supported for Flowable 5 definitions");

Try / catch

try { builder.changeState(); } catch (FlowableException e) { if (e.getMessage().contains("Flowable 5")) { /* fall back to restart at desired state */ } else throw e; }

Prevention

When it happens

Trigger: Calling runtimeService.createChangeActivityStateBuilder() or process instance migration APIs against a process instance started from a Flowable 5 process definition (converted/compat deployment).

Common situations: Organizations migrating from Activiti/Flowable 5 to Flowable 6 that still run legacy Flowable 5 process definitions in compatibility mode and then attempt change-state or migration operations on running instances of those legacy definitions.

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/084ab9e44c3e0665. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/dynamic/AbstractDynamicStateManager.java:298

            for (EnableActivityIdContainer enableActivityIdContainer : changeActivityStateBuilder.getEnableActivityIdList()) {
                EnableActivityContainer enableActivityContainer = new EnableActivityContainer(enableActivityIdContainer.getActivityIds());
                enableActivityContainerList.add(enableActivityContainer);
            }
        }
        
        return enableActivityContainerList;
    }

    protected ExecutionEntity resolveActiveExecution(String executionId, CommandContext commandContext) {
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(commandContext);
        ExecutionEntity execution = executionEntityManager.findById(executionId);

        if (execution == null) {
            throw new FlowableException("Execution could not be found with id " + executionId);
        }

        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {
            throw new FlowableException("Flowable 5 process definitions are not supported");
        }

        return execution;
    }

    protected List<ExecutionEntity> resolveActiveExecutions(String processInstanceId, String activityId, CommandContext commandContext) {
        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(commandContext);
        ExecutionEntity processExecution = executionEntityManager.findById(processInstanceId);

        if (processExecution == null) {
            throw new FlowableException("Execution could not be found with id " + processInstanceId);
        }

        if (!processExecution.isProcessInstanceType()) {
            throw new FlowableException("Execution is not a process instance type execution for id " + processInstanceId);
        }

        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, processExecution.getProcessDefinitionId())) {

View on GitHub (pinned to d6d39ce1c6)