{"record":{"id":"7d0325f1790ad0a6","repo":"flowable/flowable-engine","slug":"no-channel-model-set-for-outgoing-eventinstance","errorCode":null,"errorMessage":"No channel model set for outgoing {eventInstance}","messagePattern":"No channel model set for outgoing (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/DefaultOutboundEventProcessor.java","lineNumber":45,"sourceCode":"import org.flowable.eventregistry.model.OutboundChannelModel;\n\n/**\n * @author Joram Barrez\n */\npublic class DefaultOutboundEventProcessor implements OutboundEventProcessor {\n\n    protected EventRepositoryService eventRepositoryService;\n    protected boolean fallbackToDefaultTenant;\n\n    public DefaultOutboundEventProcessor(EventRepositoryService eventRepositoryService, boolean fallbackToDefaultTenant) {\n        this.eventRepositoryService = eventRepositoryService;\n        this.fallbackToDefaultTenant = fallbackToDefaultTenant;\n    }\n    \n    @Override\n    public void sendEvent(EventInstance eventInstance, Collection<ChannelModel> channelModels) {\n        if (channelModels == null || channelModels.isEmpty()) {\n            throw new FlowableException(\"No channel model set for outgoing \" + eventInstance);\n        }\n\n        for (ChannelModel channelModel : channelModels) {\n\n            OutboundChannelModel outboundChannelModel = (OutboundChannelModel) channelModel;\n\n            Map<String, Object> headerMap = new HashMap<>();\n            for (EventPayloadInstance headerInstance : eventInstance.getHeaderInstances()) {\n                headerMap.put(headerInstance.getDefinitionName(), headerInstance.getValue());\n            }\n            \n            OutboundEventProcessingPipeline<?> outboundEventProcessingPipeline = (OutboundEventProcessingPipeline<?>) outboundChannelModel.getOutboundEventProcessingPipeline();\n            Object rawEvent = outboundEventProcessingPipeline.run(eventInstance);\n\n            OutboundEventChannelAdapter outboundEventChannelAdapter = (OutboundEventChannelAdapter<?>) outboundChannelModel.getOutboundEventChannelAdapter();\n            if (outboundEventChannelAdapter == null) {\n                throw new FlowableException(\"Could not find an outbound channel adapter for channel \" + channelModel.getKey());\n            }","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/DefaultOutboundEventProcessor.java#L27-L63","documentation":"DefaultOutboundEventProcessor.sendEvent() throws FlowableException when the collection of channel models to publish the event to is null or empty. An outbound event must be routed through at least one channel; with no channels the library cannot proceed. This is a programming/configuration error rather than a transient failure.","triggerScenarios":"Calling sendEvent(eventInstance, null) or sendEvent(eventInstance, Collections.emptyList()); more practically, event key/binding resolution returning zero channel models for the event instance (no channel model bound to the event, or event key mismatch).","commonSituations":"Deployed event/channel models missing the event-to-channel binding; dispatching an event whose key no channel consumes; custom pipeline code invoking the processor directly with an unfiltered empty collection.","solutions":["Deploy/bind at least one outbound channel model for the event (check the EventRepositoryService channel model deployments and the event's key bindings)","Verify the event instance's key exactly matches the key the channel is bound to","In custom code, guard before calling: only dispatch when channelModels != null && !channelModels.isEmpty(), or log/skip otherwise"],"exampleFix":"// before\noutboundEventProcessor.sendEvent(eventInstance, resolvedChannels);\n// after\nif (resolvedChannels == null || resolvedChannels.isEmpty()) {\n    throw new IllegalStateException(\"No channels bound for event key \" + eventInstance.getEventKey());\n}\noutboundEventProcessor.sendEvent(eventInstance, resolvedChannels);","handlingStrategy":"validation","validationCode":"null","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Validate channel bindings at deployment time"],"tags":["event-registry","channel-model","configuration","routing"],"backgroundTag":"missing-required-config","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"}