I am migrating my Activiti 5 process instances to Flowable 6.5 follow the Flowable's guide at https://blog.flowable.org/2019/08/07/migration-of-a-bpmn-process/ and https://flowable.com/open-source/docs/bpmn/ch09-ProcessInstanceMigration/#process-instance-migration-experimental
with some adaptation because the method to create ProcessInstanceMigrationBuilder is moved to ProcessMigrationService, so my code looks like
processMigrationService
.createProcessInstanceMigrationBuilder()
.migrateToProcessDefinition(v6ProcessDefinition.getId()) // I checked it using engineVersion <> Flowable5Util.V5_ENGINE_TAG
.migrate(processInstance.getId())
org.flowable.common.engine.api.FlowableException: Flowable 5 process definitions are not supported
at org.flowable.engine.impl.dynamic.AbstractDynamicStateManager.resolveActiveExecution(AbstractDynamicStateManager.java:186) ~[flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.dynamic.AbstractDynamicStateManager.resolveMoveExecutionEntityContainers(AbstractDynamicStateManager.java:108) ~[flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.migration.ProcessInstanceMigrationManagerImpl.doMigrateProcessInstance(ProcessInstanceMigrationManagerImpl.java:425) ~[flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.migration.ProcessInstanceMigrationManagerImpl.migrateProcessInstance(ProcessInstanceMigrationManagerImpl.java:390) ~[flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.ProcessMigrationServiceImpl.migrateProcessInstance(ProcessMigrationServiceImpl.java:62) ~[flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.migration.ProcessInstanceMigrationBuilderImpl.migrate(ProcessInstanceMigrationBuilderImpl.java:138) ~[flowable-engine-6.5.0.jar:6.5.0]
but I get an exception says that "Flowable 5 process definitions are not supported" when Flowable is doing some logic in my v5 bpmn process instance. I get confused here, the purpose of the APIs provided by Flowable is to migrate v5 bpmn process instance to v6, and when I run it, it says that my process definition is not supported.
The purpose of the Migration API is to support migrating between different Process Definition versions of the Flowable 6 process instances.
Migrating a Process Instance from Activiti / Flowable 5 to Flowable 6 is not supported due to the different structure that those have. The compatibility layer is there so you can keep running the old Flowable 5 process instances in parallel with the Flowable 6 ones.