flowable/flowable-engine · error · FlowableEventJsonException
The channel xml key detection value was not found for the ch
Error message
The channel xml key detection value was not found for the channel model with key ${key}. One of fixedValue, xmlPathExpression, delegateExpression should be set. What it means
Thrown when an 'xml' inbound channel has a ChannelEventKeyDetection object, but fixedValue, xmlXPathExpression, and delegateExpression are all empty. No mechanism to determine the event key from the XML payload is specified.
Source
Thrown at modules/flowable-event-registry-json-converter/src/main/java/org/flowable/eventregistry/json/converter/InboundChannelModelValidator.java:65
if (StringUtils.isEmpty(channelEventKeyDetection.getFixedValue()) &&
StringUtils.isEmpty(channelEventKeyDetection.getJsonField()) &&
StringUtils.isEmpty(channelEventKeyDetection.getJsonPointerExpression()) &&
StringUtils.isEmpty(channelEventKeyDetection.getDelegateExpression())) {
throw new FlowableEventJsonException(
"The channel json key detection value was not found for the channel model with key " + inboundChannelModel.getKey()
+ ". One of fixedValue, jsonField, jsonPointerExpression, delegateExpression should be set.");
}
} else if ("xml".equalsIgnoreCase(deserializerType)) {
if (channelEventKeyDetection == null) {
throw new FlowableEventJsonException("A channel key detection value is required for the channel model with key " + inboundChannelModel.getKey());
}
if (StringUtils.isEmpty(channelEventKeyDetection.getFixedValue()) &&
StringUtils.isEmpty(channelEventKeyDetection.getXmlXPathExpression()) &&
StringUtils.isEmpty(channelEventKeyDetection.getDelegateExpression())) {
throw new FlowableEventJsonException(
"The channel xml key detection value was not found for the channel model with key " + inboundChannelModel.getKey()
+ ". One of fixedValue, xmlPathExpression, delegateExpression should be set.");
}
} else if ("expression".equalsIgnoreCase(deserializerType)) {
if (StringUtils.isEmpty(inboundChannelModel.getDeserializerDelegateExpression())) {
throw new FlowableEventJsonException(
"The channel deserializer delegate expression was not set for the channel model with key " + inboundChannelModel);
}
} else if (deserializerType != null) {
throw new FlowableEventJsonException(
"The deserializer type is not supported " + deserializerType + " for the channel model with key " + inboundChannelModel.getKey());
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Populate xmlXPathExpression with a valid XPath expression for the key element
- Set fixedValue for a static key
- Provide delegateExpression referencing a ChannelEventKeyDetection bean
- Remove the channel or switch deserializerType if XML key detection is not needed
Example fix
// before
"channelEventKeyDetection": {
"xmlXPathExpression": ""
}
// after
"channelEventKeyDetection": {
"xmlXPathExpression": "/event/@type"
} Defensive patterns
Strategy: validation
Validate before calling
ChannelEventKeyDetection d = channel.getChannelEventKeyDetection();
if ("xml".equalsIgnoreCase(channel.getDeserializerType()) && d != null
&& isEmpty(d.getFixedValue()) && isEmpty(d.getXmlXPathExpression()) && isEmpty(d.getDelegateExpression())) {
throw new IllegalArgumentException("xml key detection for '" + channel.getKey() + "' has no value");
} Type guard
boolean hasXmlDetectionValue = d -> d != null && (isSet(d.getFixedValue()) || isSet(d.getXmlXPathExpression()) || isSet(d.getDelegateExpression()));
Try / catch
try {
channelValidator.validateChannel(model);
} catch (FlowableEventJsonException e) {
logger.error("XML key detection empty: {}", e.getMessage());
} Prevention
- Populate xmlXPathExpression rather than leaving an empty detection object
- Verify XPath expressions extract the key from representative XML samples
- Add CI checks that reject empty attribute values in channel definitions
When it happens
Trigger: validateDeserializer encounters deserializerType 'xml' with a non-null channelEventKeyDetection whose getFixedValue(), getXmlXPathExpression(), and getDelegateExpression() are all empty.
Common situations: Templates or generated models emitting an empty detection object; users clearing an XPath expression during editing without providing an alternative.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- The channel json key detection value was not found for the c
- EventRegistryEventDefinition on '" + elementId + "' has an e
- There is no correlation parameter with name '{correlationPar
- A channel key detection value is required for the channel mo
- The channel deserializer delegate expression was not set for
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/988202b980f1b10c.
Report an issue: GitHub.