{"record":{"id":"1bb8a81397d328f4","repo":"flowable/flowable-engine","slug":"no-channel-definition-found-for-key-for-parent-1bb8a8","errorCode":null,"errorMessage":"No channel definition found for key '' for parent deployment id '' and for tenant identifier ","messagePattern":"No channel definition found for key '' for parent deployment id '' and for tenant identifier ","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/GetChannelModelCmd.java","lineNumber":139,"sourceCode":"                channelDefinitionEntity = channelDefinitionEntityManager.findChannelDefinitionByDeploymentAndKeyAndTenantId(\n                                eventDeployments.get(0).getId(), channelDefinitionKey, tenantId);\n            }\n            \n            if (channelDefinitionEntity == null) {\n                channelDefinitionEntity = channelDefinitionEntityManager.findLatestChannelDefinitionByKeyAndTenantId(channelDefinitionKey, tenantId);\n            }\n            \n            if (channelDefinitionEntity == null && eventEngineConfiguration.isFallbackToDefaultTenant()) {\n                String defaultTenant = eventEngineConfiguration.getDefaultTenantProvider().getDefaultTenant(tenantId, ScopeTypes.EVENT_REGISTRY, channelDefinitionKey);\n                if (StringUtils.isNotEmpty(defaultTenant)) {\n                    channelDefinitionEntity = channelDefinitionEntityManager.findLatestChannelDefinitionByKeyAndTenantId(channelDefinitionKey, defaultTenant);\n                } else {\n                    channelDefinitionEntity = channelDefinitionEntityManager.findLatestChannelDefinitionByKey(channelDefinitionKey);\n                }\n            }\n            \n            if (channelDefinitionEntity == null) {\n                throw new FlowableObjectNotFoundException(\"No channel definition found for key '\" + channelDefinitionKey +\n                        \" for parent deployment id '\" + parentDeploymentId + \"' and for tenant identifier \" + tenantId, ChannelDefinitionEntity.class);\n            }\n\n        } else {\n            throw new FlowableObjectNotFoundException(\"channelDefinitionKey and channelDefinitionId are null\");\n        }\n\n        ChannelDefinitionCacheEntry channelDefinitionCacheEntry = deploymentManager.resolveChannelDefinition(channelDefinitionEntity);\n        return channelDefinitionCacheEntry.getChannelModel();\n    }\n}\n","sourceCodeStart":121,"sourceCodeEnd":151,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/GetChannelModelCmd.java#L121-L151","documentation":"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.","triggerScenarios":"getChannelModel with channelDefinitionKey + parentDeploymentId + tenantId where every lookup path (parent deployment query, latest by key+tenant) returns null.","commonSituations":"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.","solutions":["Confirm the channel definition exists under that exact parent deployment AND tenantId by querying ChannelDefinitionQuery with both filters","Remove the parentDeploymentId or tenantId filter to locate the definition, then align deployment/tenant values","Redeploy the channel XML with the correct tenantId into the expected deployment","If the key/id are both null this branch won't fire — check the else branch error about both ids null"],"exampleFix":"// before\ngetChannelModel(\"invoice-channel\", parentDepId, \"tenant-B\"); // deployed as tenant-A\n// after\nChannelDefinitionEntity cd = lookup(\"invoice-channel\", parentDepId, \"tenant-A\"); // matching tenant\ngetChannelModel(\"invoice-channel\", parentDepId, \"tenant-A\");","handlingStrategy":"validation","validationCode":"if (repositoryService.createChannelDefinitionQuery()\n        .channelDefinitionKey(key)\n        .singleResult() == null) {\n    throw new IllegalStateException(\"channel \" + key + \" never deployed; check key/tenant/deployment filters\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    return repositoryService.getChannelModel(null, key, tenantId, parentDeploymentId);\n} catch (FlowableObjectNotFoundException e) {\n    LOGGER.error(\"no channel {} for parent {} and tenant {}\", key, parentDeploymentId, tenantId);\n    // retry without the narrowest filter to diagnose which one excludes it\n    return repositoryService.getChannelModel(null, key, tenantId, null);\n}","preventionTips":["When combining key+tenant+parentDeployment filters, verify each filter individually first","Deploy and look up with the same tenantId and parent deployment lineage","Reduce filter specificity when diagnosing: drop parentDeploymentId, then tenantId"],"tags":["flowable","not-found","channel","tenant","deployment"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}