{"record":{"id":"be849b37a3d36cc7","repo":"flowable/flowable-engine","slug":"found-v5-process-definitions-that-are-the-latest-v","errorCode":null,"errorMessage":"Found v5 process definitions that are the latest version. Enable the 'flowable5CompatibilityEnabled' property in the process engine configuration and make sure the flowable5-compatibility dependency is available on the classpath","messagePattern":"Found v5 process definitions that are the latest version\\. Enable the 'flowable5CompatibilityEnabled' property in the process engine configuration and make sure the flowable5-compatibility dependency is available on the classpath","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/ValidateV5EntitiesCmd.java","lineNumber":61,"sourceCode":"            LOGGER.info(\"Total of v5 deployments found: {}\", numberOfV5Deployments);\n\n            if (numberOfV5Deployments > 0) {\n                List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()\n                        .latestVersion()\n                        .processDefinitionEngineVersion(Flowable5Util.V5_ENGINE_TAG)\n                        .list();\n\n                if (!processDefinitions.isEmpty()) {\n                    String message = new StringBuilder(\"Found v5 process definitions that are the latest version.\")\n                            .append(\" Enable the 'flowable5CompatibilityEnabled' property in the process engine configuration\")\n                            .append(\" and make sure the flowable5-compatibility dependency is available on the classpath\").toString();\n                    LOGGER.error(message);\n\n                    for (ProcessDefinition processDefinition : processDefinitions) {\n                        LOGGER.error(\"Found v5 process definition with id: {}, and key: {}\", processDefinition.getId(), processDefinition.getKey());\n                    }\n\n                    throw new FlowableException(message);\n                }\n\n                RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();\n                long numberOfV5ProcessInstances = runtimeService.createProcessInstanceQuery().processDefinitionEngineVersion(Flowable5Util.V5_ENGINE_TAG).count();\n\n                if (numberOfV5ProcessInstances > 0) {\n                    String message = new StringBuilder(\"Found at least one running v5 process instance.\")\n                            .append(\" Enable the 'flowable5CompatibilityEnabled' property in the process engine configuration\")\n                            .append(\" and make sure the flowable5-compatibility dependency is available on the classpath\").toString();\n                    LOGGER.error(message);\n\n                    throw new FlowableException(message);\n                }\n            }\n        }\n\n        return null;\n    }","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/ValidateV5EntitiesCmd.java#L43-L79","documentation":"Thrown during engine startup/validation when the database contains v5 (Activiti 5 compatibility) process definitions that are the latest version, but Flowable 6+ compatibility mode is not enabled. Since the v5 engine is not running, those definitions would be unusable, so startup aborts with a FlowableException listing the offending definitions.","triggerScenarios":"Starting a Flowable 6+ engine against a database previously used by Activiti 5 / Flowable v5, where ACT_RE_PROCDEF has rows with ENGINE_VERSION_ = 'v5' that are the newest version of their key, while flowable5CompatibilityEnabled is false.","commonSituations":"Migrating an Activiti 5 production database to Flowable 6; upgrading an old deployment where the last deployed version of a process was v5; reusing a copied production DB against a fresh Flowable 6 install.","solutions":["Enable compatibility: set flowable5CompatibilityEnabled=true in ProcessEngineConfiguration (or flowable5-compatibility.enabled=true in Spring Boot).","Add the org.flowable:flowable5-compatibility dependency (and flowable5-spring compatibility if using Spring) to the classpath.","If v5 definitions are truly obsolete, deploy a new v6 version of each process (making the v6 row the latest) or archive/clean the v5 definition rows with proper data migration."],"exampleFix":"// before\nProcessEngineConfiguration cfg = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(\"flowable.cfg.xml\");\n// after\ncfg.setFlowable5CompatibilityEnabled(true);\n// pom.xml: <dependency><groupId>org.flowable</groupId><artifactId>flowable5-compatibility</artifactId><version>...</version></dependency>","handlingStrategy":"validation","validationCode":"long v5defs = repositoryService.createProcessDefinitionQuery().processDefinitionEngineVersion(\"v5\").count(); if (v5defs > 0) { enableFlowable5Compatibility(); }","typeGuard":null,"tryCatchPattern":"try { engine = cfg.buildProcessEngine(); } catch (FlowableException e) { if (e.getMessage().contains(\"v5 process definitions\")) { /* enable compatibility and rebuild */ } }","preventionTips":["Before upgrading from Activiti 5, inventory v5 rows: select * from ACT_RE_PROCDEF where ENGINE_VERSION_ = 'v5'","Deploy new v6 versions of all active processes so latest versions are v6","Keep flowable5-compatibility on the classpath during migration periods"],"tags":["v5-compatibility","migration","database"],"backgroundTag":"missing-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}