{"record":{"id":"084ab9e44c3e0665","repo":"flowable/flowable-engine","slug":"flowable-5-process-definitions-are-not-supported-084ab9","errorCode":null,"errorMessage":"Flowable 5 process definitions are not supported","messagePattern":"Flowable 5 process definitions are not supported","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/dynamic/AbstractDynamicStateManager.java","lineNumber":298,"sourceCode":"            for (EnableActivityIdContainer enableActivityIdContainer : changeActivityStateBuilder.getEnableActivityIdList()) {\n                EnableActivityContainer enableActivityContainer = new EnableActivityContainer(enableActivityIdContainer.getActivityIds());\n                enableActivityContainerList.add(enableActivityContainer);\n            }\n        }\n        \n        return enableActivityContainerList;\n    }\n\n    protected ExecutionEntity resolveActiveExecution(String executionId, CommandContext commandContext) {\n        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(commandContext);\n        ExecutionEntity execution = executionEntityManager.findById(executionId);\n\n        if (execution == null) {\n            throw new FlowableException(\"Execution could not be found with id \" + executionId);\n        }\n\n        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {\n            throw new FlowableException(\"Flowable 5 process definitions are not supported\");\n        }\n\n        return execution;\n    }\n\n    protected List<ExecutionEntity> resolveActiveExecutions(String processInstanceId, String activityId, CommandContext commandContext) {\n        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(commandContext);\n        ExecutionEntity processExecution = executionEntityManager.findById(processInstanceId);\n\n        if (processExecution == null) {\n            throw new FlowableException(\"Execution could not be found with id \" + processInstanceId);\n        }\n\n        if (!processExecution.isProcessInstanceType()) {\n            throw new FlowableException(\"Execution is not a process instance type execution for id \" + processInstanceId);\n        }\n\n        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, processExecution.getProcessDefinitionId())) {","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/dynamic/AbstractDynamicStateManager.java#L280-L316","documentation":"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.","triggerScenarios":"Calling runtimeService.createChangeActivityStateBuilder() or process instance migration APIs against a process instance started from a Flowable 5 process definition (converted/compat deployment).","commonSituations":"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.","solutions":["Redeploy the process as a native Flowable 6 BPMN definition and start new instances from it","Terminate the legacy Flowable 5 process instance and start a fresh Flowable 6 instance at the desired state instead of using change-state","Skip change-state/migration features for Flowable 5 instances; they are unsupported by design"],"exampleFix":"// before\nruntimeService.createChangeActivityStateBuilder().processInstanceId(f5InstanceId).moveActivityIdTo(\"oldTask\",\"newTask\").changeState();\n// after\nif (!Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, procDefId)) {\n    runtimeService.createChangeActivityStateBuilder().processInstanceId(procInstanceId).moveActivityIdTo(\"oldTask\",\"newTask\").changeState();\n}","handlingStrategy":"validation","validationCode":"ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId).singleResult();\nboolean flowable5 = pd != null && Flowable5Util.isFlowable5ProcessDefinitionId(engineConfig.getCommandContext(), procDefId);\nif (flowable5) throw new IllegalStateException(\"Change-state not supported for Flowable 5 definitions\");","typeGuard":null,"tryCatchPattern":"try { builder.changeState(); } catch (FlowableException e) { if (e.getMessage().contains(\"Flowable 5\")) { /* fall back to restart at desired state */ } else throw e; }","preventionTips":["Run legacy instances on Flowable 5 compatibility only for read/complete flows, never change-state","Migrate definitions to Flowable 6 before using dynamic state APIs","Check definition id prefix/format before invoking change-state"],"tags":["flowable","process-migration","compatibility"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}