flowable/flowable-engine · error · FlowableIllegalArgumentException
Provided emailLike is null
Error message
Provided emailLike is null
What it means
UserQueryImpl.userEmailLike(String) throws FlowableIllegalArgumentException when the emailLike pattern is null. The method builds a SQL LIKE pattern, and a null pattern is meaningless, so the engine rejects it up front. Supply a pattern such as "%@example.com" or drop the criterion.
Source
Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/UserQueryImpl.java:204
throw new FlowableIllegalArgumentException("Provided display name is null");
}
this.displayNameLikeIgnoreCase = displayNameLikeIgnoreCase.toLowerCase();
return this;
}
@Override
public UserQuery userEmail(String email) {
if (email == null) {
throw new FlowableIllegalArgumentException("Provided email is null");
}
this.email = email;
return this;
}
@Override
public UserQuery userEmailLike(String emailLike) {
if (emailLike == null) {
throw new FlowableIllegalArgumentException("Provided emailLike is null");
}
this.emailLike = emailLike;
return this;
}
@Override
public UserQuery memberOfGroup(String groupId) {
if (groupId == null) {
throw new FlowableIllegalArgumentException("Provided groupId is null");
}
this.groupId = groupId;
return this;
}
@Override
public UserQuery memberOfGroups(List<String> groupIds) {
if (groupIds == null) {
throw new FlowableIllegalArgumentException("Provided groupIds is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null LIKE pattern (e.g. "%" + search + "%") or omit the userEmailLike() call when null.
- Coerce empty input to null at the controller layer and only call userEmailLike() when a search term exists.
Example fix
// before
List<User> users = identityService.createUserQuery().userEmailLike(request.getTerm()).list();
// after
UserQuery q = identityService.createUserQuery();
String term = request.getTerm();
if (term != null && !term.isEmpty()) {
q = q.userEmailLike("%" + term + "%");
}
List<User> users = q.list(); Defensive patterns
Strategy: validation
Validate before calling
if (emailLike != null && !emailLike.isBlank()) { query = query.userEmailLike(emailLike); } Type guard
boolean hasSearchTerm(String s) { return s != null && !s.isBlank(); } Try / catch
try { query.userEmailLike(term); } catch (FlowableIllegalArgumentException e) { log.warn("Null emailLike pattern ignored", e); } Prevention
- Normalize empty search input to 'no filter' before querying
- Build LIKE patterns defensively ('%' + term + '%') only from non-null terms
- Add unit tests covering null/empty search inputs
When it happens
Trigger: Calling identityService.createUserQuery().userEmailLike(null).
Common situations: Building a search screen where the user typed a wildcard search string that is empty/null and the code passes it through unconditionally.
Related errors
- Provided email is null
- Provided groupId is null
- Provided groupIds is null
- appsDefinitionIds is null
- category is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/87fe21a850c18cd6.
Report an issue: GitHub.