flowable/flowable-engine · error · FlowableObjectNotFoundException

No deployment found for id =

Error message

No deployment found for id = '<id>'

What it means

SetDeploymentCategoryCmd looks up the deployment via DeploymentEntityManager.findById after the null check. When no deployment matches the supplied id it throws FlowableObjectNotFoundException 'No deployment found for id = <id>'.

Solutions

  1. Check existence first: dmnRepositoryService.createDeploymentQuery().deploymentId(id).singleResult()
  2. Point the DMN engine at the same database the deployment was made against
  3. Re-deploy or use a valid deployment id; do not reuse BPMN engine deployment ids

Example fix

// before
repositoryService.setDeploymentCategory(id, "cat");
// after
DmnDeployment dep = repositoryService.createDeploymentQuery().deploymentId(id).singleResult();
if (dep == null) throw new IllegalStateException("Unknown deployment: " + id);
repositoryService.setDeploymentCategory(id, "cat");
Defensive patterns

Strategy: validation

Validate before calling

DmnDeployment dep = repositoryService.createDeploymentQuery().deploymentId(id).singleResult();
if (dep == null) throw new IllegalStateException("Deployment not found: " + id);

Try / catch

try {
    repositoryService.setDeploymentCategory(id, category);
} catch (FlowableObjectNotFoundException e) {
    log.error("Deployment missing: {}", id, e);
    throw new IllegalStateException("Unknown deployment id", e);
}

Prevention

When it happens

Trigger: Calling dmnRepositoryService.setDeploymentCategory(id, category) with a non-null id that does not exist in the DMN engine's ACT_DMN_DEPLOYMENT table.

Common situations: Wrong database/schema or datasource, deployment deleted earlier, id copied from the process (BPMN) engine instead of the DMN engine, or a typo in a configured deployment id.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/SetDeploymentCategoryCmd.java:45

    protected String deploymentId;
    protected String category;

    public SetDeploymentCategoryCmd(String deploymentId, String category) {
        this.deploymentId = deploymentId;
        this.category = category;
    }

    @Override
    public Void execute(CommandContext commandContext) {

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

        DmnDeploymentEntity deployment = CommandContextUtil.getDeploymentEntityManager(commandContext).findById(deploymentId);

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

        // Update category
        deployment.setCategory(category);
        CommandContextUtil.getDeploymentEntityManager(commandContext).update(deployment);

        return null;
    }

    public String getDeploymentId() {
        return deploymentId;
    }

    public void setDeploymentId(String deploymentId) {
        this.deploymentId = deploymentId;
    }

    public String getCategory() {

View on GitHub (pinned to d6d39ce1c6)