flowable/flowable-engine · warning

JsonPointer expression

Error message

JsonPointer expression {} did not detect event key

What it means

This is a WARN log emitted by JsonPointerBasedInboundEventKeyDetector when a JSON Pointer expression applied to the inbound event payload resolves to null, a missing node, or a JSON null. The detector returns null, meaning no event definition key could be extracted from the payload. It is not thrown; it signals the configured jsonPointerExpression did not match any value in the payload.

Solutions

  1. Verify the payload actually contains the field the pointer targets (log the raw payload at DEBUG)
  2. Fix the jsonPointerExpression in the event definition so it matches the real payload path (e.g. /data/type instead of /type)
  3. Ensure the producer includes the key element in every event
  4. Handle a null return from detectEventDefinitionKey by routing to a default/no-key event definition

Example fix

// before (event definition JSON)
"keyDetection": { "jsonPointerExpression": "/order/type" }
// after (payload is { "data": { "order": { "type": "NEW" } } })
"keyDetection": { "jsonPointerExpression": "/data/order/type" }
Defensive patterns

Strategy: validation

Validate before calling

// before registering key detection, probe the pointer against a sample payload
JsonNode sample = new ObjectMapper().readTree(sampleJson);
JsonNode hit = sample.at("/data/order/type");
if (hit.isMissingNode() || hit.isNull()) {
    throw new IllegalArgumentException("jsonPointerExpression does not match sample payload");
}

Type guard

static boolean hasKey(JsonNode payload, String pointer) {
    JsonNode n = payload.at(pointer);
    return n != null && !n.isMissingNode() && !n.isNull();
}

Prevention

When it happens

Trigger: Inbound event registry channel invokes detectEventDefinitionKey(payload); the configured jsonPointerExpression (e.g. /order/type) points at a property that is absent, null, or misspelled in the incoming JSON, or the payload shape differs from what the expression was authored against.

Common situations: Typo in the JSON Pointer expression in the event model definition; producer changed/renamed the payload field; nested arrays/paths where at() returns missing nodes; payload sent without the key element entirely; version drift between event schema versions.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/2e5a62b038fa0c01. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/keydetector/JsonPointerBasedInboundEventKeyDetector.java:47

    private static final Logger LOGGER = LoggerFactory.getLogger(JsonPointerBasedInboundEventKeyDetector.class);

    protected ObjectMapper objectMapper;

    protected String jsonPointerValue;
    protected JsonPointer jsonPointerExpression;

    public JsonPointerBasedInboundEventKeyDetector(String jsonPointerExpression, ObjectMapper objectMapper) {
        this.jsonPointerValue = jsonPointerExpression;
        this.jsonPointerExpression = JsonPointer.compile(jsonPointerExpression);
        this.objectMapper = objectMapper;
    }

    @Override
    public String detectEventDefinitionKey(JsonNode payload) {
        JsonNode result = payload.at(jsonPointerExpression);

        if (result == null || result.isMissingNode() || result.isNull()) {
            LOGGER.warn("JsonPointer expression {} did not detect event key", jsonPointerExpression);
            return null;
        }

        if (result.isString()) {
            return result.asString();
        }

        return null;
    }
    
    public String getJsonPointerValue() {
        return jsonPointerValue;
    }
}

View on GitHub (pinned to d6d39ce1c6)