{"record":{"id":"3a70bd88f6309754","repo":"flowable/flowable-engine","slug":"the-channel-json-key-detection-value-was-not-found","errorCode":null,"errorMessage":"The channel json key detection value was not found for the channel model with key ${key}. One of fixedValue, jsonField, jsonPointerExpression, delegateExpression should be set.","messagePattern":"The channel json key detection value was not found for the channel model with key (.+?)\\. One of fixedValue, jsonField, jsonPointerExpression, 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":52,"sourceCode":"        if (StringUtils.isEmpty(inboundChannelModel.getPipelineDelegateExpression())) {\n            // Deserializer is only needed if there is no pipeline delegate expression\n            validateDeserializer(inboundChannelModel);\n        }\n    }\n\n    protected void validateDeserializer(InboundChannelModel inboundChannelModel) {\n        String deserializerType = inboundChannelModel.getDeserializerType();\n        ChannelEventKeyDetection channelEventKeyDetection = inboundChannelModel.getChannelEventKeyDetection();\n        if (\"json\".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.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)) {","sourceCodeStart":34,"sourceCodeEnd":70,"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#L34-L70","documentation":"Thrown when a 'json' inbound channel has a ChannelEventKeyDetection object but every detection mechanism (fixedValue, jsonField, jsonPointerExpression, delegateExpression) is empty. The detection element exists but does not specify any way to determine the event key.","triggerScenarios":"validateDeserializer runs on a channel with deserializerType 'json' and channelEventKeyDetection present, but all four of getFixedValue(), getJsonField(), getJsonPointerExpression(), and getDelegateExpression() return empty/null strings.","commonSituations":"Copying a channel template with an empty channelEventKeyDetection object; serialization tooling emitting an empty key-detection block; hand-edits blanking out the detection values.","solutions":["Set one of fixedValue, jsonField, jsonPointerExpression, or delegateExpression inside channelEventKeyDetection","Use jsonField with the payload field name holding the event key (most common fix)","Use jsonPointerExpression for nested keys, e.g. /header/eventType","Use delegateExpression to reference a custom ChannelEventKeyDetection bean"],"exampleFix":"// before\n\"channelEventKeyDetection\": {}\n// after\n\"channelEventKeyDetection\": {\n  \"jsonField\": \"eventType\"\n}","handlingStrategy":"validation","validationCode":"ChannelEventKeyDetection d = channel.getChannelEventKeyDetection();\nif (\"json\".equalsIgnoreCase(channel.getDeserializerType()) && d != null\n    && isEmpty(d.getFixedValue()) && isEmpty(d.getJsonField())\n    && isEmpty(d.getJsonPointerExpression()) && isEmpty(d.getDelegateExpression())) {\n    throw new IllegalArgumentException(\"channel '\" + channel.getKey() + \"' key detection has no value\");\n}","typeGuard":"boolean hasDetectionValue = d -> d != null && (isSet(d.getFixedValue()) || isSet(d.getJsonField()) || isSet(d.getJsonPointerExpression()) || isSet(d.getDelegateExpression()));","tryCatchPattern":"try {\n    channelValidator.validateChannel(model);\n} catch (FlowableEventJsonException e) {\n    logger.error(\"Key detection present but empty: {}\", e.getMessage());\n}","preventionTips":["Never commit channel definitions with an empty channelEventKeyDetection object","Prefer jsonField for flat payloads; use jsonPointerExpression for nested ones","Lint channel JSON files in CI for empty detection objects"],"tags":["flowable","event-registry","validation","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"}