flowable/flowable-engine · warning

JsonPointer expression

Error message

JsonPointer expression {} did not detect event tenant

What it means

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.

Solutions

  1. Log the incoming payload and confirm where the tenant value actually lives
  2. Correct the jsonPointer in the tenant detection config of the event definition
  3. Ensure producers include the tenant field on every event
  4. Handle a null tenant by configuring a default tenant or falling back to channel-level tenant resolution

Example fix

// before
"tenantDetection": { "jsonPointerExpression": "/tenant" }
// after (payload is { "meta": { "tenantId": "acme" } })
"tenantDetection": { "jsonPointerExpression": "/meta/tenantId" }
Defensive patterns

Strategy: validation

Validate before calling

JsonNode sample = new ObjectMapper().readTree(sampleJson);
JsonNode tenant = sample.at("/meta/tenantId");
if (tenant.isMissingNode() || tenant.isNull()) {
    throw new IllegalArgumentException("tenant jsonPointer does not match payload");
}

Type guard

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

Prevention

When it happens

Trigger: 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.

Common situations: 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 '/').

Related errors


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

Appendix: source

Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/tenantdetector/JsonPointerBasedInboundEventTenantDetector.java:43

 */
public class JsonPointerBasedInboundEventTenantDetector implements InboundEventTenantDetector<JsonNode> {

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

    protected String jsonPointerExpression;
    protected JsonPointer jsonPointer;

    public JsonPointerBasedInboundEventTenantDetector(String jsonPointerExpression) {
        this.jsonPointerExpression = jsonPointerExpression;
        this.jsonPointer = JsonPointer.compile(jsonPointerExpression);
    }

    @Override
    public String detectTenantId(JsonNode payload) {
        JsonNode result = payload.at(jsonPointer);

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

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

        return null;
    }

    public String getJsonPointerExpression() {
        return jsonPointerExpression;
    }
    public void setJsonPointerExpression(String jsonPointerExpression) {
        this.jsonPointerExpression = jsonPointerExpression;
    }
}

View on GitHub (pinned to d6d39ce1c6)