flowable/flowable-engine · error · FlowableException
Cannot migrate case(es), not enough information
Error message
Cannot migrate case(es), not enough information
What it means
CaseInstanceMigrationBatchCmd.execute dispatches to the migration manager based on how the command was constructed: by definition id, or by key+version(+tenant). If neither identification path is available it cannot determine which instances to migrate and throws this message.
Solutions
- Construct the command through CaseInstanceMigrationBuilder and call withTargetCaseDefinitionId(...) or withTargetCaseDefinitionKey/Version before migrating
- Verify caseDefinitionVersion is set to a non-negative value when using key-based construction
- If you have the id, prefer the id-based constructor so execute's first branch is taken
Example fix
// before
cmmnEngineConfig.getCommandExecutor().execute(new CaseInstanceMigrationBatchCmd()); // no identifiers set
// after
cmmnEngineConfig.getCaseInstanceMigrationService().createCaseInstanceMigrationBuilder()
.withTargetCaseDefinitionId(definitionId)
.batchMigrateCaseInstances(document); Defensive patterns
Strategy: validation
Validate before calling
if (caseDefinitionId == null && (caseDefinitionKey == null || caseDefinitionVersion < 0)) {
throw new IllegalArgumentException("Provide target case definition id or key+version for batch migration");
} Try / catch
try {
command.execute(commandContext);
} catch (FlowableException e) {
if (e.getMessage().contains("not enough information")) {
// rebuild the command with a target definition id or key+version
}
throw e;
} Prevention
- Always construct the command via CaseInstanceMigrationBuilder which enforces target selection
- Never construct or reflectively instantiate the command without an identifier path
- Verify version is a non-negative integer when using key-based construction
When it happens
Trigger: The command object was built such that caseDefinitionId == null and (caseDefinitionKey == null || caseDefinitionVersion < 0), then execute(commandContext) is run — possible when subclasses or reflective construction skip all constructor validations.
Common situations: CaseInstanceMigrationBuilder misconfiguration where neither id nor key/version was set before calling batchMigrateCaseInstances; reflection/deserialization bypassing constructor checks.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Cannot find the case definition to migrate to, identified by
- Cannot find the case to migrate, with id
- Cannot find the historic case instance to migrate, with id
- Cannot migrate case(es), not enough information
- Case instance ids is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d10478b38ce351b7.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/CaseInstanceMigrationBatchCmd.java:76
throw new FlowableException("Must specify a case instance migration document to migrate");
}
this.caseDefinitionKey = caseDefinitionKey;
this.caseDefinitionVersion = caseDefinitionVersion;
this.caseDefinitionTenantId = caseDefinitionTenantId;
this.caseInstanceMigrationDocument = caseInstanceMigrationDocument;
this.cmmnEngineConfiguration = cmmnEngineConfiguration;
}
@Override
public Batch execute(CommandContext commandContext) {
CaseInstanceMigrationManager migrationManager = cmmnEngineConfiguration.getCaseInstanceMigrationManager();
if (caseDefinitionId != null) {
return migrationManager.batchMigrateCaseInstancesOfCaseDefinition(caseDefinitionId, caseInstanceMigrationDocument, commandContext);
} else if (caseDefinitionKey != null && caseDefinitionVersion >= 0) {
return migrationManager.batchMigrateCaseInstancesOfCaseDefinition(caseDefinitionKey, caseDefinitionVersion, caseDefinitionTenantId, caseInstanceMigrationDocument, commandContext);
} else {
throw new FlowableException("Cannot migrate case(es), not enough information");
}
}
}
View on GitHub (pinned to d6d39ce1c6)