flowable/flowable-engine · error · FlowableIllegalArgumentException
deploymentTenantId is null
Error message
deploymentTenantId is null
What it means
Thrown by CmmnDeploymentQueryImpl.deploymentTenantId(null). Tenant filtering requires an explicit tenant id string; null is rejected so the generated query never contains a meaningless tenant predicate.
Solutions
- Pass a non-null tenant id string to deploymentTenantId()
- Skip the call entirely when no tenant filtering is wanted
- Check tenant resolution logic to ensure the id is populated before querying
Example fix
// before
query.deploymentTenantId(tenantId); // may be null
// after
if (tenantId != null) {
query.deploymentTenantId(tenantId);
} Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(tenantId, "deploymentTenantId must not be null"); query.deploymentTenantId(tenantId);
Type guard
boolean hasTenant = tenantId != null && !tenantId.isEmpty();
Try / catch
try {
query.deploymentTenantId(tenantId);
} catch (FlowableIllegalArgumentException e) {
// proceed without tenant filter or report missing tenant context
} Prevention
- Resolve tenant context before building queries
- Skip tenant setter when operating outside a tenant context
- Consider TenantContext/ThreadLocal handling to avoid null tenant ids
When it happens
Trigger: Calling deploymentTenantId(null), usually when multi-tenant context resolution failed or the tenant id was never set on the request/context object.
Common situations: Multi-tenant applications where the tenant id is resolved at runtime; calling this setter from a non-tenant context; forgetting to use deploymentTenantIdLike for pattern matching.
Related errors
- decision tenantId is null
- Provided tenant id is null
- tenantId is null
- after time is null
- bytes array is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/7594c3ef9d5fd5aa.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java:126
throw new FlowableIllegalArgumentException("deploymentCategoryExclude is null");
}
this.categoryNotEquals = deploymentCategoryNotEquals;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentKey(String deploymentKey) {
if (deploymentKey == null) {
throw new FlowableIllegalArgumentException("deploymentKey is null");
}
this.key = deploymentKey;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentTenantId(String tenantId) {
if (tenantId == null) {
throw new FlowableIllegalArgumentException("deploymentTenantId is null");
}
this.tenantId = tenantId;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentTenantIdLike(String tenantIdLike) {
if (tenantIdLike == null) {
throw new FlowableIllegalArgumentException("deploymentTenantIdLike is null");
}
this.tenantIdLike = tenantIdLike;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentWithoutTenantId() {
this.withoutTenantId = true;
return this;View on GitHub (pinned to d6d39ce1c6)