flowable/flowable-engine · error · FlowableObjectNotFoundException

no deployed event definition found with id

Error message

no deployed event definition found with id '${eventDefinitionId}'

What it means

After checking cache and database, findDeployedEventDefinitionById throws FlowableObjectNotFoundException when no event definition exists with the given id. The id format was valid and non-null, but nothing is deployed under it.

Solutions

  1. Verify the event definition id exists: check ACT_DE_EVENT_DEFINITION (or Flowable event-registry tables) for the id
  2. Redeploy the event definition if it was deleted or never deployed
  3. Point the engine configuration at the correct database where the definition is deployed
  4. Catch FlowableObjectNotFoundException if the id is optional in your flow

Example fix

// before
def = deploymentManager.findDeployedEventDefinitionById(definitionId);
// after
try {
    def = deploymentManager.findDeployedEventDefinitionById(definitionId);
} catch (FlowableObjectNotFoundException e) {
    def = deploymentManager.findDeployedLatestEventDefinitionByKey(keyFromRequest); // fallback by key
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    def = deploymentManager.findDeployedEventDefinitionById(id);
} catch (org.flowable.common.engine.api.FlowableObjectNotFoundException e) {
    // handle missing definition: fallback by key or fail with context
    def = null;
}

Prevention

When it happens

Trigger: Calling findDeployedEventDefinitionById with an id that was never deployed, an id from a different engine/database, or an id from a deployment that was deleted or not yet committed.

Common situations: Stale references in configuration after redeployment; cross-environment lookups (test id used in prod); querying before the deployment transaction commits; typo in the definition id.

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/d71f6223c336376f. Report an issue: GitHub.

Appendix: source

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

    public void deploy(EventDeploymentEntity deployment) {
        for (Deployer deployer : deployers) {
            deployer.deploy(deployment);
        }
    }

    public EventDefinitionEntity findDeployedEventDefinitionById(String eventDefinitionId) {
        if (eventDefinitionId == null) {
            throw new FlowableException("Invalid event definition id : null");
        }

        // first try the cache
        EventDefinitionCacheEntry cacheEntry = eventDefinitionCache.get(eventDefinitionId);
        EventDefinitionEntity eventDefinition = cacheEntry != null ? cacheEntry.getEventDefinitionEntity() : null;

        if (eventDefinition == null) {
            eventDefinition = engineConfig.getEventDefinitionEntityManager().findById(eventDefinitionId);
            if (eventDefinition == null) {
                throw new FlowableObjectNotFoundException("no deployed event definition found with id '" + eventDefinitionId + "'");
            }
            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) {

View on GitHub (pinned to d6d39ce1c6)