flowable/flowable-engine · error · FlowableException
Message dispatcher is disabled, cannot dispatch
Error message
Message dispatcher is disabled, cannot dispatch ${event} What it means
DispatchEventCommand requires an enabled event dispatcher: if the engine's FlowableEventDispatcher is null or disabled (isEnableEventDispatcher() false), the event cannot be delivered and this FlowableException is thrown instead of silently dropping the event.
Solutions
- Enable the event dispatcher in configuration: setEnableEventDispatcher(true) (or event registry equivalent) on ProcessEngineConfiguration.
- Verify configuration at startup — processEngineConfiguration.getEventDispatcher() != null && isEnabled().
- If events are intentionally unused, remove or guard the dispatch calls instead of expecting silent no-ops.
- Check the deployed config file/Spring beans for a conflicting event-dispatcher=false property.
Example fix
// before ProcessEngineConfigurationImpl cfg = ...; // event dispatcher disabled cfg.setEnableEventDispatcher(false); runtimeService.dispatchEvent(event); // throws // after cfg.setEnableEventDispatcher(true); runtimeService.dispatchEvent(event);
Defensive patterns
Strategy: validation
Validate before calling
ProcessEngineConfigurationImpl cfg = ...;
if (cfg.getEventDispatcher() == null || !cfg.getEventDispatcher().isEnabled()) {
throw new IllegalStateException("Event dispatcher must be enabled to dispatch events");
} Try / catch
try { rs.dispatchEvent(event); } catch (FlowableException e) { log.warn("Dispatcher disabled, event dropped: {}", event); } Prevention
- Enable the event dispatcher in engine configuration
- Check dispatcher status once at startup before registering event-producing flows
- Remove dispatch calls in configs where events are intentionally disabled
When it happens
Trigger: Calling runtimeService.dispatchEvent(event) when eventDispatcher is null or isEnabled() is false — e.g. the engine config didn't enable the event registry/dispatcher, or the deployed configuration created a dispatcher-less engine.
Common situations: Lightweight/embedded engine configs where event dispatch was disabled for performance; tests using minimal config; event listeners expected but useEventDispatcher/enableEventDispatcher never set true; Spring config missing the eventRegistry initializer.
Related errors
- event is null
- No formEngine '' defined process engine configuration
- No formEngine '' defined process engine configuration
- A channel key detection value is required for the channel…
- A datasource is required for initializing the engine
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5977d5c10c13067f.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/DispatchEventCommand.java:48
protected FlowableEvent event;
public DispatchEventCommand(FlowableEvent event) {
this.event = event;
}
@Override
public Void execute(CommandContext commandContext) {
if (event == null) {
throw new FlowableIllegalArgumentException("event is null");
}
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
FlowableEventDispatcher eventDispatcher = processEngineConfiguration.getEventDispatcher();
if (eventDispatcher != null && eventDispatcher.isEnabled()) {
eventDispatcher.dispatchEvent(event, processEngineConfiguration.getEngineCfgKey());
} else {
throw new FlowableException("Message dispatcher is disabled, cannot dispatch " + event);
}
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)