flowable/flowable-engine · error · FlowableObjectNotFoundException

No channel definition found for key '' for parent deployment

Error message

No channel definition found for key '' for parent deployment id '' and for tenant identifier 

What it means

Thrown when resolving a channel definition by key with both a parentDeploymentId and a tenantId, and no matching definition is found in that deployment, its siblings, or as latest for that key/tenant. FlowableObjectNotFoundException naming key, parent deployment id, and tenant.

Source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/GetChannelModelCmd.java:139

                channelDefinitionEntity = channelDefinitionEntityManager.findChannelDefinitionByDeploymentAndKeyAndTenantId(
                                eventDeployments.get(0).getId(), channelDefinitionKey, tenantId);
            }
            
            if (channelDefinitionEntity == null) {
                channelDefinitionEntity = channelDefinitionEntityManager.findLatestChannelDefinitionByKeyAndTenantId(channelDefinitionKey, tenantId);
            }
            
            if (channelDefinitionEntity == null && eventEngineConfiguration.isFallbackToDefaultTenant()) {
                String defaultTenant = eventEngineConfiguration.getDefaultTenantProvider().getDefaultTenant(tenantId, ScopeTypes.EVENT_REGISTRY, channelDefinitionKey);
                if (StringUtils.isNotEmpty(defaultTenant)) {
                    channelDefinitionEntity = channelDefinitionEntityManager.findLatestChannelDefinitionByKeyAndTenantId(channelDefinitionKey, defaultTenant);
                } else {
                    channelDefinitionEntity = channelDefinitionEntityManager.findLatestChannelDefinitionByKey(channelDefinitionKey);
                }
            }
            
            if (channelDefinitionEntity == null) {
                throw new FlowableObjectNotFoundException("No channel definition found for key '" + channelDefinitionKey +
                        " for parent deployment id '" + parentDeploymentId + "' and for tenant identifier " + tenantId, ChannelDefinitionEntity.class);
            }

        } else {
            throw new FlowableObjectNotFoundException("channelDefinitionKey and channelDefinitionId are null");
        }

        ChannelDefinitionCacheEntry channelDefinitionCacheEntry = deploymentManager.resolveChannelDefinition(channelDefinitionEntity);
        return channelDefinitionCacheEntry.getChannelModel();
    }
}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Confirm the channel definition exists under that exact parent deployment AND tenantId by querying ChannelDefinitionQuery with both filters
  2. Remove the parentDeploymentId or tenantId filter to locate the definition, then align deployment/tenant values
  3. Redeploy the channel XML with the correct tenantId into the expected deployment
  4. If the key/id are both null this branch won't fire — check the else branch error about both ids null

Example fix

// before
getChannelModel("invoice-channel", parentDepId, "tenant-B"); // deployed as tenant-A
// after
ChannelDefinitionEntity cd = lookup("invoice-channel", parentDepId, "tenant-A"); // matching tenant
getChannelModel("invoice-channel", parentDepId, "tenant-A");
Defensive patterns

Strategy: validation

Validate before calling

if (repositoryService.createChannelDefinitionQuery()
        .channelDefinitionKey(key)
        .singleResult() == null) {
    throw new IllegalStateException("channel " + key + " never deployed; check key/tenant/deployment filters");
}

Try / catch

try {
    return repositoryService.getChannelModel(null, key, tenantId, parentDeploymentId);
} catch (FlowableObjectNotFoundException e) {
    LOGGER.error("no channel {} for parent {} and tenant {}", key, parentDeploymentId, tenantId);
    // retry without the narrowest filter to diagnose which one excludes it
    return repositoryService.getChannelModel(null, key, tenantId, null);
}

Prevention

When it happens

Trigger: getChannelModel with channelDefinitionKey + parentDeploymentId + tenantId where every lookup path (parent deployment query, latest by key+tenant) returns null.

Common situations: Combining filters from different sources (deployment id from one env, tenant from another); the channel deployed under a different tenant inside that parent deployment; triple-filtering hides an existing definition.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — 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/1bb8a81397d328f4. Report an issue: GitHub.