{"record":{"id":"52cdcb68ea43a47b","repo":"flowable/flowable-engine","slug":"jsonpointer-expression-did-not-detect-event-ten","errorCode":null,"errorMessage":"JsonPointer expression {} did not detect event tenant","messagePattern":"JsonPointer expression (.+?) did not detect event tenant","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/tenantdetector/JsonPointerBasedInboundEventTenantDetector.java","lineNumber":43,"sourceCode":" */\npublic class JsonPointerBasedInboundEventTenantDetector implements InboundEventTenantDetector<JsonNode> {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(JsonPointerBasedInboundEventTenantDetector.class);\n\n    protected String jsonPointerExpression;\n    protected JsonPointer jsonPointer;\n\n    public JsonPointerBasedInboundEventTenantDetector(String jsonPointerExpression) {\n        this.jsonPointerExpression = jsonPointerExpression;\n        this.jsonPointer = JsonPointer.compile(jsonPointerExpression);\n    }\n\n    @Override\n    public String detectTenantId(JsonNode payload) {\n        JsonNode result = payload.at(jsonPointer);\n\n        if (result == null || result.isMissingNode() || result.isNull()) {\n            LOGGER.warn(\"JsonPointer expression {} did not detect event tenant\", jsonPointer);\n            return null;\n        }\n\n        if (result.isString()) {\n            return result.asString();\n        }\n\n        return null;\n    }\n\n    public String getJsonPointerExpression() {\n        return jsonPointerExpression;\n    }\n    public void setJsonPointerExpression(String jsonPointerExpression) {\n        this.jsonPointerExpression = jsonPointerExpression;\n    }\n}\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/tenantdetector/JsonPointerBasedInboundEventTenantDetector.java#L25-L61","documentation":"WARN logged by JsonPointerBasedInboundEventTenantDetector when the configured JSON Pointer for tenant detection resolves to null, a missing node, or JSON null in the payload. detectTenantId returns null so the event cannot be assigned a tenant from its content. The event processing continues, but tenant resolution silently fails.","triggerScenarios":"detectTenantId(payload) runs on an inbound event; the jsonPointer configured in the event model's tenant detection points to a field that is absent, null, or renamed in the incoming JSON.","commonSituations":"Multi-tenant setups where the producer omits the tenant field; expression mismatch with actual payload nesting; producer schema change dropping tenantId; wrong pointer syntax (must start with '/').","solutions":["Log the incoming payload and confirm where the tenant value actually lives","Correct the jsonPointer in the tenant detection config of the event definition","Ensure producers include the tenant field on every event","Handle a null tenant by configuring a default tenant or falling back to channel-level tenant resolution"],"exampleFix":"// before\n\"tenantDetection\": { \"jsonPointerExpression\": \"/tenant\" }\n// after (payload is { \"meta\": { \"tenantId\": \"acme\" } })\n\"tenantDetection\": { \"jsonPointerExpression\": \"/meta/tenantId\" }","handlingStrategy":"validation","validationCode":"JsonNode sample = new ObjectMapper().readTree(sampleJson);\nJsonNode tenant = sample.at(\"/meta/tenantId\");\nif (tenant.isMissingNode() || tenant.isNull()) {\n    throw new IllegalArgumentException(\"tenant jsonPointer does not match payload\");\n}","typeGuard":"static boolean hasTenant(JsonNode payload, String pointer) {\n    JsonNode n = payload.at(pointer);\n    return n != null && !n.isMissingNode() && !n.isNull() && !n.asText().isEmpty();\n}","tryCatchPattern":null,"preventionTips":["Ensure producers always include the tenant field","Test tenant detection with payloads from every producer version","Configure a fallback/default tenant in the channel when detection returns null","Use consistent tenant field naming across services"],"tags":["json-pointer","tenant","event-registry"],"backgroundTag":"unexpected-response-shape","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"}