{"record":{"id":"988202b980f1b10c","repo":"flowable/flowable-engine","slug":"the-channel-xml-key-detection-value-was-not-found","errorCode":null,"errorMessage":"The channel xml key detection value was not found for the channel model with key ${key}. One of fixedValue, xmlPathExpression, delegateExpression should be set.","messagePattern":"The channel xml key detection value was not found for the channel model with key (.+?)\\. One of fixedValue, xmlPathExpression, delegateExpression should be set\\.","errorType":"validation","errorClass":"FlowableEventJsonException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-json-converter/src/main/java/org/flowable/eventregistry/json/converter/InboundChannelModelValidator.java","lineNumber":65,"sourceCode":"\n            if (StringUtils.isEmpty(channelEventKeyDetection.getFixedValue()) &&\n                StringUtils.isEmpty(channelEventKeyDetection.getJsonField()) &&\n                StringUtils.isEmpty(channelEventKeyDetection.getJsonPointerExpression()) &&\n                StringUtils.isEmpty(channelEventKeyDetection.getDelegateExpression())) {\n                throw new FlowableEventJsonException(\n                    \"The channel json key detection value was not found for the channel model with key \" + inboundChannelModel.getKey()\n                        + \". One of fixedValue, jsonField, jsonPointerExpression, delegateExpression should be set.\");\n            }\n\n        } else if (\"xml\".equalsIgnoreCase(deserializerType)) {\n            if (channelEventKeyDetection == null) {\n                throw new FlowableEventJsonException(\"A channel key detection value is required for the channel model with key \" + inboundChannelModel.getKey());\n            }\n\n            if (StringUtils.isEmpty(channelEventKeyDetection.getFixedValue()) &&\n                StringUtils.isEmpty(channelEventKeyDetection.getXmlXPathExpression()) &&\n                StringUtils.isEmpty(channelEventKeyDetection.getDelegateExpression())) {\n                throw new FlowableEventJsonException(\n                    \"The channel xml key detection value was not found for the channel model with key \" + inboundChannelModel.getKey()\n                        + \". One of fixedValue, xmlPathExpression, delegateExpression should be set.\");\n            }\n\n        } else if (\"expression\".equalsIgnoreCase(deserializerType)) {\n            if (StringUtils.isEmpty(inboundChannelModel.getDeserializerDelegateExpression())) {\n                throw new FlowableEventJsonException(\n                    \"The channel deserializer delegate expression was not set for the channel model with key \" + inboundChannelModel);\n            }\n        } else if (deserializerType != null) {\n            throw new FlowableEventJsonException(\n                \"The deserializer type is not supported \" + deserializerType + \" for the channel model with key \" + inboundChannelModel.getKey());\n        }\n    }\n}\n","sourceCodeStart":47,"sourceCodeEnd":81,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-json-converter/src/main/java/org/flowable/eventregistry/json/converter/InboundChannelModelValidator.java#L47-L81","documentation":"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.","triggerScenarios":"validateDeserializer encounters deserializerType 'xml' with a non-null channelEventKeyDetection whose getFixedValue(), getXmlXPathExpression(), and getDelegateExpression() are all empty.","commonSituations":"Templates or generated models emitting an empty detection object; users clearing an XPath expression during editing without providing an alternative.","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"],"exampleFix":"// before\n\"channelEventKeyDetection\": {\n  \"xmlXPathExpression\": \"\"\n}\n// after\n\"channelEventKeyDetection\": {\n  \"xmlXPathExpression\": \"/event/@type\"\n}","handlingStrategy":"validation","validationCode":"ChannelEventKeyDetection d = channel.getChannelEventKeyDetection();\nif (\"xml\".equalsIgnoreCase(channel.getDeserializerType()) && d != null\n    && isEmpty(d.getFixedValue()) && isEmpty(d.getXmlXPathExpression()) && isEmpty(d.getDelegateExpression())) {\n    throw new IllegalArgumentException(\"xml key detection for '\" + channel.getKey() + \"' has no value\");\n}","typeGuard":"boolean hasXmlDetectionValue = d -> d != null && (isSet(d.getFixedValue()) || isSet(d.getXmlXPathExpression()) || isSet(d.getDelegateExpression()));","tryCatchPattern":"try {\n    channelValidator.validateChannel(model);\n} catch (FlowableEventJsonException e) {\n    logger.error(\"XML key detection empty: {}\", e.getMessage());\n}","preventionTips":["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"],"tags":["flowable","event-registry","validation","xml","empty-value"],"backgroundTag":"empty-required-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}