flowable/flowable-engine · error · FlowableObjectNotFoundException

no deployed channel definition found with id

Error message

no deployed channel definition found with id '${channelDefinitionId}'

What it means

findDeployedChannelDefinitionById throws FlowableObjectNotFoundException when neither the definition cache nor the database (via ChannelDefinitionEntityManager.findById) contains a channel definition with the given id.

Solutions

  1. Verify the id exists in the event-registry channel definition table
  2. Redeploy the channel definition if missing
  3. Point the engine configuration at the correct database
  4. Catch FlowableObjectNotFoundException and handle the absent-channel case gracefully

Example fix

// before
ChannelDefinitionEntity ch = deploymentManager.findDeployedChannelDefinitionById(channelId);
// after
try {
    ch = deploymentManager.findDeployedChannelDefinitionById(channelId);
} catch (FlowableObjectNotFoundException e) {
    ch = deploymentManager.findDeployedLatestChannelDefinitionByKey(channelKey);
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    ch = deploymentManager.findDeployedChannelDefinitionById(id);
} catch (org.flowable.common.engine.api.FlowableObjectNotFoundException e) {
    ch = deploymentManager.findDeployedLatestChannelDefinitionByKey(channelKey);
}

Prevention

When it happens

Trigger: Looking up a channel definition id that was never deployed, was deleted by a prior undeployment, or exists only in another database/engine configuration.

Common situations: Stale channel ids after redeploying under a new id; cross-environment id reuse; lookups racing ahead of the deployment transaction commit; typos in configured channel ids.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java:100

            }
            eventDefinition = resolveEventDefinition(eventDefinition).getEventDefinitionEntity();
        }
        return eventDefinition;
    }
    
    public ChannelDefinitionEntity findDeployedChannelDefinitionById(String channelDefinitionId) {
        if (channelDefinitionId == null) {
            throw new FlowableException("Invalid channel definition id : null");
        }

        // first try the cache
        ChannelDefinitionCacheEntry cacheEntry = channelDefinitionCache.get(channelDefinitionId);
        ChannelDefinitionEntity channelDefinition = cacheEntry != null ? cacheEntry.getChannelDefinitionEntity() : null;

        if (channelDefinition == null) {
            channelDefinition = engineConfig.getChannelDefinitionEntityManager().findById(channelDefinitionId);
            if (channelDefinition == null) {
                throw new FlowableObjectNotFoundException("no deployed channel definition found with id '" + channelDefinitionId + "'");
            }
            channelDefinition = resolveChannelDefinition(channelDefinition).getChannelDefinitionEntity();
        }
        return channelDefinition;
    }

    public EventDefinitionEntity findDeployedLatestEventDefinitionByKey(String eventDefinitionKey) {
        EventDefinitionEntity eventDefinition = eventDefinitionEntityManager.findLatestEventDefinitionByKey(eventDefinitionKey);

        if (eventDefinition == null) {
            throw new FlowableObjectNotFoundException("no event definitions deployed with key '" + eventDefinitionKey + "'");
        }
        eventDefinition = resolveEventDefinition(eventDefinition).getEventDefinitionEntity();
        return eventDefinition;
    }
    
    public ChannelDefinitionEntity findDeployedLatestChannelDefinitionByKey(String channelDefinitionKey) {
        ChannelDefinitionEntity channelDefinition = channelDefinitionEntityManager.findLatestChannelDefinitionByKey(channelDefinitionKey);

View on GitHub (pinned to d6d39ce1c6)