flowable/flowable-engine · error · FlowableException

Cannot migrate case(es), not enough information

Error message

Cannot migrate case(es), not enough information

What it means

Thrown in CaseInstanceMigrationCmd.execute() when none of the supported targeting variants is present: neither a case instance id, a case definition id, nor a case definition key with version >= 0 was set. The command has no way to determine which case instance(s) to migrate.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/CaseInstanceMigrationCmd.java:98

        this.caseDefinitionKey = caseDefinitionKey;
        this.caseDefinitionVersion = caseDefinitionVersion;
        this.caseDefinitionTenantId = caseDefinitionTenantId;
        this.caseInstanceMigrationDocument = caseInstanceMigrationDocument;
        this.cmmnEngineConfiguration = cmmnEngineConfiguration;
    }

    @Override
    public Void execute(CommandContext commandContext) {
        CaseInstanceMigrationManager migrationManager = cmmnEngineConfiguration.getCaseInstanceMigrationManager();

        if (caseInstanceId != null) {
            migrationManager.migrateCaseInstance(caseInstanceId, caseInstanceMigrationDocument, commandContext);
        } else if (caseDefinitionId != null) {
            migrationManager.migrateCaseInstancesOfCaseDefinition(caseDefinitionId, caseInstanceMigrationDocument, commandContext);
        } else if (caseDefinitionKey != null && caseDefinitionVersion >= 0) {
            migrationManager.migrateCaseInstancesOfCaseDefinition(caseDefinitionKey, caseDefinitionVersion, caseDefinitionTenantId, caseInstanceMigrationDocument, commandContext);
        } else {
            throw new FlowableException("Cannot migrate case(es), not enough information");
        }
        return null;
    }
}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Set exactly one target: call migrateCaseInstance(id, ...) for one instance, or migrateToCaseDefinition(caseDefinitionId), or migrateToCaseDefinition(key, version, tenantId) with version >= 0.
  2. If targeting by key, ensure the version is a real deployed version number (0 or higher), not a sentinel like -1.
  3. Validate the migration request object for a target selector before executing the command.

Example fix

// before
cmmnEngineConfiguration.getCommandExecutor().execute(new CaseInstanceMigrationCmd(null, -1, null, doc, cfg));
// after
cmmnEngineConfiguration.getCommandExecutor().execute(new CaseInstanceMigrationCmd("orderCase", 2, "tenant1", doc, cfg));
Defensive patterns

Strategy: validation

Validate before calling

boolean hasTarget = caseInstanceId != null
        || caseDefinitionId != null
        || (caseDefinitionKey != null && caseDefinitionVersion >= 0);
if (!hasTarget) {
    throw new IllegalArgumentException("provide caseInstanceId, caseDefinitionId, or key+version for migration");
}

Try / catch

try {
    cmmnEngineConfiguration.getCommandExecutor().execute(migrationCmd);
} catch (FlowableException e) {
    if (e.getMessage().contains("not enough information")) {
        // request is missing a target selector; reject upstream
    }
}

Prevention

When it happens

Trigger: Constructing CaseInstanceMigrationCmd with all target fields null (e.g. a no-arg/default path), or key set but version left as -1/0-unset so `caseDefinitionVersion >= 0` fails.

Common situations: Custom code creating the command directly without setting any target; deserializing a migration request where the target selector was omitted; using version sentinel -1 while providing key and tenant.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/ff1b150e48ae6e0f. Report an issue: GitHub.