flowable/flowable-engine · error · FlowableException

Not supported for version 5 deployments

Error message

Not supported for version 5 deployments

What it means

SetDeploymentKeyCmd.execute throws FlowableException "Not supported for version 5 deployments" when the deployment resolved to a Flowable 5 deployment but setDeploymentKey is invoked. Changing the key is only implemented for Flowable 6 deployments; the v5 compatibility handler has no such operation (unlike setDeploymentCategory).

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SetDeploymentKeyCmd.java:57

        this.key = key;
    }

    @Override
    public Void execute(CommandContext commandContext) {

        if (deploymentId == null) {
            throw new FlowableIllegalArgumentException("Deployment id is null");
        }

        ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
        DeploymentEntity deployment = processEngineConfiguration.getDeploymentEntityManager().findById(deploymentId);

        if (deployment == null) {
            throw new FlowableObjectNotFoundException("No deployment found for id = '" + deploymentId + "'", Deployment.class);
        }

        if (Flowable5Util.isFlowable5Deployment(deployment, commandContext)) {
            throw new FlowableException("Not supported for version 5 deployments");
        }

        // Update category
        deployment.setKey(key);

        FlowableEventDispatcher eventDispatcher = processEngineConfiguration.getEventDispatcher();
        if (eventDispatcher != null && eventDispatcher.isEnabled()) {
            eventDispatcher.dispatchEvent(FlowableEventBuilder.createEntityEvent(FlowableEngineEventType.ENTITY_UPDATED, deployment),
                    processEngineConfiguration.getEngineCfgKey());
        }

        return null;
    }

    public String getDeploymentId() {
        return deploymentId;
    }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Redeploy the process definitions with the Flowable 6 engine so a native v6 deployment exists, then set the key on that deployment.
  2. Use setDeploymentCategory (which supports v5 deployments) if only a logical grouping is needed.
  3. Check Flowable5Util.isFlowable5Deployment first and skip or route the operation accordingly.

Example fix

// before
repositoryService.setDeploymentKey(deploymentId, key); // v5 deployment
// after
Deployment d = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
if (d != null && !isFlowable5Deployment(d)) {
    repositoryService.setDeploymentKey(deploymentId, key);
}
Defensive patterns

Strategy: fallback

Validate before calling

Deployment d = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
boolean isV5 = d != null && "5".equals(d.getEngineVersion()); // skip key-set for v5 deployments

Type guard

boolean isV5Deployment = deployment != null && "5".equals(deployment.getEngineVersion());

Try / catch

try {
    repositoryService.setDeploymentKey(deploymentId, key);
} catch (FlowableException e) {
    if (e.getMessage() != null && e.getMessage().contains("Not supported for version 5")) {
        // fall back: redeploy as v6 or use setDeploymentCategory instead
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Calling repositoryService.setDeploymentKey(id, key) where the id refers to a deployment created by a Flowable 5 engine running in v5 compatibility mode.

Common situations: Migrated projects still running v5 process definitions/deployments; mixed-mode installations where operators attempt v6-only administration APIs on legacy deployments.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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