flowable/flowable-engine · error · UnsupportedOperationException
Outbound processor should never call this
Error message
Outbound processor should never call this
What it means
The two-argument sendEvent(Object, Map) on KafkaOperationsOutboundEventChannelAdapter is an unsupported legacy/alternate entry point: outbound event processors must use sendEvent(Object) (which builds headers internally), so calling the header-map overload always throws UnsupportedOperationException. This is a programming-contract violation, not a runtime condition.
Solutions
- Call the single-argument sendEvent(Object rawEvent) overload instead.
- Route headers through the event payload/InboundChannelModel or the channel's header definitions rather than a header map.
- Fix the custom processor to implement the correct OutboundEventChannelAdapter interface used by Flowable.
- Update test harnesses to invoke the supported method.
Example fix
// before adapter.sendEvent(event, headerMap); // after adapter.sendEvent(event);
Defensive patterns
Strategy: type-guard
Validate before calling
if (adapter instanceof KafkaOperationsOutboundEventChannelAdapter) {
// only call sendEvent(Object); the (Object, Map) overload is unsupported
} Try / catch
try {
adapter.sendEvent(event, headerMap);
} catch (UnsupportedOperationException e) {
if ("Outbound processor should never call this".equals(e.getMessage())) {
adapter.sendEvent(event);
} else { throw e; }
} Prevention
- Use the single-argument sendEvent(Object) for outbound Kafka adapters
- Route headers via channel header definitions, not a header map
- Fix custom processors to invoke the supported ChannelAdapter API
When it happens
Trigger: Calling adapter.sendEvent(event, headerMap) directly, or configuring a custom outbound event processor/adapter that invokes the wrong overload.
Common situations: Custom FlowableEventRegistryEventProcessor implementations written against the wrong ChannelAdapter interface; test code invoking the adapter manually with a header map.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Function Delegate has more than one function method
- Function has more than one local name
- Operation is not supported
- At least one of topics, topicPartitions or topicPattern…
- Behavior is not supported for a case task for
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c2f42bf248a82c94.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/kafka/KafkaOperationsOutboundEventChannelAdapter.java:85
ProducerRecord<Object, Object> producerRecord = new ProducerRecord<>(topic, partition, key, rawEvent, headers);
kafkaOperations.send(producerRecord).get();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new FlowableException("Sending the event was interrupted", e);
} catch (ExecutionException e) {
if (e.getCause() instanceof RuntimeException) {
throw (RuntimeException) e.getCause();
} else {
throw new FlowableException("failed to send event", e.getCause());
}
}
}
@Override
public void sendEvent(Object rawEvent, Map<String, Object> headerMap) {
throw new UnsupportedOperationException("Outbound processor should never call this");
}
}
View on GitHub (pinned to d6d39ce1c6)