diff --git a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationDocumentBuilderImpl.java b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationDocumentBuilderImpl.java index 6ba54df9942..52310f28e52 100644 --- a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationDocumentBuilderImpl.java +++ b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/migration/ProcessInstanceMigrationDocumentBuilderImpl.java @@ -129,7 +129,7 @@ public ProcessInstanceMigrationDocument build() { if (migrateToProcessDefinitionKey == null) { throw new FlowableException("Process definition key cannot be null"); } - if (migrateToProcessDefinitionVersion == null || migrateToProcessDefinitionVersion < 0) { + if (migrateToProcessDefinitionVersion != null && migrateToProcessDefinitionVersion < 0) { throw new FlowableException("Process definition version must be a positive number"); } }