flowable/flowable-engine · error · FlowableIllegalArgumentException
form tenantId is null
Error message
form tenantId is null
What it means
ChannelDefinitionQueryImpl.tenantId() throws FlowableIllegalArgumentException with message 'form tenantId is null' when the tenantId argument is null. (The 'form' prefix is a copy-paste artifact from FormDefinitionQueryImpl; the check applies to channel definitions.) A null tenant id is rejected up front because it would produce an invalid equality filter.
Solutions
- Pass a valid non-null tenant id string
- Guard: call tenantId() only when the resolved tenant is non-null
- Use tenantIdLike("%") or omit the filter to query across all tenants
Example fix
// before
query.tenantId(tenantId);
// after
if (tenantId != null) { query.tenantId(tenantId); } Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(tenantId, "tenantId must not be null");
Type guard
null
Try / catch
null
Prevention
- Resolve tenant context once in a shared utility
When it happens
Trigger: Calling tenantId(null) on a ChannelDefinitionQuery, commonly when the tenant id is resolved from an unauthenticated context or a missing tenant header/property.
Common situations: Multi-tenant apps where the current tenant is optional and code passes null unconditionally; TenantContext or request attribute not populated.
Related errors
- activity tenant id is null
- activity tenant id is null
- activity tenant id is null
- Booleans and null cannot be used in 'greater than or equal'…
- Booleans and null cannot be used in 'less than or equal'…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c9191c1409d5a2a5.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/ChannelDefinitionQueryImpl.java:312
throw new FlowableIllegalArgumentException("resourceName is null");
}
this.resourceName = resourceName;
return this;
}
@Override
public ChannelDefinitionQueryImpl channelDefinitionResourceNameLike(String resourceNameLike) {
if (resourceNameLike == null) {
throw new FlowableIllegalArgumentException("resourceNameLike is null");
}
this.resourceNameLike = resourceNameLike;
return this;
}
@Override
public ChannelDefinitionQueryImpl tenantId(String tenantId) {
if (tenantId == null) {
throw new FlowableIllegalArgumentException("form tenantId is null");
}
this.tenantId = tenantId;
return this;
}
@Override
public ChannelDefinitionQueryImpl tenantIdLike(String tenantIdLike) {
if (tenantIdLike == null) {
throw new FlowableIllegalArgumentException("form tenantId is null");
}
this.tenantIdLike = tenantIdLike;
return this;
}
@Override
public ChannelDefinitionQueryImpl withoutTenantId() {
this.withoutTenantId = true;
return this;View on GitHub (pinned to d6d39ce1c6)