{"record":{"id":"f65921204bbba574","repo":"flowable/flowable-engine","slug":"the-channel-json-key-detection-value-was-not-found-f65921","errorCode":null,"errorMessage":"The channel json key detection value was not found for the channel model with key ${channelModel.key}. One of fixedValue, jsonField, jsonPointerExpression or 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 or delegateExpression should be set\\.","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/pipeline/InboundChannelModelProcessor.java","lineNumber":164,"sourceCode":"\n        InboundEventKeyDetector<JsonNode> eventKeyDetector;\n        ChannelEventKeyDetection keyDetection = channelModel.getChannelEventKeyDetection();\n\n        if (keyDetection == null) {\n            throw new FlowableException(\"A channel key detection value is required for inbound channel \" + channelModel.getKey());\n        }\n\n        if (StringUtils.isNotEmpty(keyDetection.getFixedValue())) {\n            eventKeyDetector = new InboundEventStaticKeyDetector<>(keyDetection.getFixedValue());\n        } else if (StringUtils.isNotEmpty(keyDetection.getJsonField())) {\n            eventKeyDetector = new JsonFieldBasedInboundEventKeyDetector(keyDetection.getJsonField());\n        } else if (StringUtils.isNotEmpty(keyDetection.getJsonPointerExpression())) {\n            eventKeyDetector = new JsonPointerBasedInboundEventKeyDetector(keyDetection.getJsonPointerExpression(), objectMapper);\n        } else if (StringUtils.isNotEmpty(keyDetection.getDelegateExpression())) {\n            //noinspection unchecked\n            eventKeyDetector = resolveExpression(keyDetection.getDelegateExpression(), InboundEventKeyDetector.class);\n        } else {\n            throw new FlowableException(\n                \"The channel json key detection value was not found for the channel model with key \" + channelModel.getKey()\n                    + \". One of fixedValue, jsonField, jsonPointerExpression or delegateExpression should be set.\");\n        }\n\n        ChannelEventTenantIdDetection channelEventTenantIdDetection = channelModel.getChannelEventTenantIdDetection();\n        if (channelEventTenantIdDetection != null) {\n            if (StringUtils.isNotEmpty(channelEventTenantIdDetection.getFixedValue())) {\n                eventTenantDetector = new InboundEventStaticTenantDetector<>(channelEventTenantIdDetection.getFixedValue());\n            } else if (StringUtils.isNotEmpty(channelEventTenantIdDetection.getJsonPointerExpression())) {\n                eventTenantDetector = new JsonPointerBasedInboundEventTenantDetector(channelEventTenantIdDetection.getJsonPointerExpression());\n            } else if (StringUtils.isNotEmpty(channelEventTenantIdDetection.getDelegateExpression())) {\n                //noinspection unchecked\n                eventTenantDetector = resolveExpression(channelEventTenantIdDetection.getDelegateExpression(), InboundEventTenantDetector.class);\n            } else {\n                throw new FlowableException(\n                    \"The channel json tenant detection value was not found for the channel model with key \" + channelModel.getKey()\n                        + \". One of fixedValue, jsonPointerExpression, delegateExpression should be set.\");\n            }","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/pipeline/InboundChannelModelProcessor.java#L146-L182","documentation":"Thrown when a JSON inbound channel HAS a ChannelEventKeyDetection, but none of the four supported sources (fixedValue, jsonField, jsonPointerExpression, delegateExpression) is populated. The key-detection block exists but is effectively empty, so no InboundEventKeyDetector can be built.","triggerScenarios":"Registering a JSON inbound channel where channelEventKeyDetection is non-null but all of getFixedValue, getJsonField, getJsonPointerExpression and getDelegateExpression return null/empty strings.","commonSituations":"XML/JSON channel model containing an empty <keyDetection/> element; setting a property name that does not exist (e.g. xpathField on a JSON channel); deserialization dropping the configured values due to wrong attribute names.","solutions":["Populate exactly one of keyDetection.fixedValue, keyDetection.jsonField, keyDetection.jsonPointerExpression, or keyDetection.delegateExpression.","For nested JSON keys prefer setJsonPointerExpression(\"/event/type\").","If reusing a custom detector, set setDelegateExpression(\"${myKeyDetector}\") to an InboundEventKeyDetector<JsonNode> bean.","Validate the channel model JSON against the Flowable channel schema to ensure attribute names match (e.g. 'jsonField' not 'field')."],"exampleFix":"// before\nChannelEventKeyDetection keyDetection = new ChannelEventKeyDetection(); // empty — no field set\nchannelModel.setChannelEventKeyDetection(keyDetection);\n\n// after\nChannelEventKeyDetection keyDetection = new ChannelEventKeyDetection();\nkeyDetection.setJsonPointerExpression(\"/event/type\");\nchannelModel.setChannelEventKeyDetection(keyDetection);","handlingStrategy":"validation","validationCode":"ChannelEventKeyDetection kd = channelModel.getChannelEventKeyDetection();\nif (kd != null && isBlank(kd.getFixedValue()) && isBlank(kd.getJsonField())\n        && isBlank(kd.getJsonPointerExpression()) && isBlank(kd.getDelegateExpression())) {\n    throw new IllegalArgumentException(\"Empty keyDetection on channel \" + channelModel.getKey());\n}","typeGuard":"null","tryCatchPattern":"try {\n    eventRegistry.registerChannelModel(channelModel);\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"json key detection value was not found\")) {\n        logger.error(\"Set fixedValue/jsonField/jsonPointerExpression/delegateExpression on channel {}\", channelModel.getKey());\n    }\n    throw e;\n}","preventionTips":["Set exactly one of the four key detection options; remember jsonField/jsonPointer are JSON-only","Check for empty elements in channel model JSON/XML after hand edits","Add a startup assertion that validates all channel definitions"],"tags":["flowable","event-registry","missing-config","json-channel"],"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-18T11:17:12.947Z"}