flowable/flowable-engine · error · FlowableIllegalArgumentException
Only one of 'timersOnly' or 'messagesOnly' can be provided.
Error message
Only one of 'timersOnly' or 'messagesOnly' can be provided.
What it means
JobCollectionResource.getJobs rejects requests that include both 'timersOnly' and 'messagesOnly' parameters with FlowableIllegalArgumentException, since a JobQuery cannot be filtered for both job kinds simultaneously.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobCollectionResource.java:141
query.subScopeId(allRequestParams.get("planItemInstanceId"));
query.scopeType(ScopeTypes.CMMN);
}
if (allRequestParams.containsKey("caseDefinitionId")) {
query.caseDefinitionId(allRequestParams.get("caseDefinitionId"));
}
if (allRequestParams.containsKey("scopeDefinitionId")) {
query.scopeDefinitionId(allRequestParams.get("scopeDefinitionId"));
query.scopeType(ScopeTypes.CMMN);
}
if (allRequestParams.containsKey("elementId")) {
query.elementId(allRequestParams.get("elementId"));
}
if (allRequestParams.containsKey("elementName")) {
query.elementName(allRequestParams.get("elementName"));
}
if (allRequestParams.containsKey("timersOnly")) {
if (allRequestParams.containsKey("messagesOnly")) {
throw new FlowableIllegalArgumentException("Only one of 'timersOnly' or 'messagesOnly' can be provided.");
}
if (Boolean.parseBoolean(allRequestParams.get("timersOnly"))) {
query.timers();
}
}
if (allRequestParams.containsKey("messagesOnly") && Boolean.parseBoolean(allRequestParams.get("messagesOnly"))) {
query.messages();
}
if (allRequestParams.containsKey("dueBefore")) {
query.duedateLowerThan(RequestUtil.getDate(allRequestParams, "dueBefore"));
}
if (allRequestParams.containsKey("dueAfter")) {
query.duedateHigherThan(RequestUtil.getDate(allRequestParams, "dueAfter"));
}
if (allRequestParams.containsKey("withException") && Boolean.parseBoolean(allRequestParams.get("withException"))) {
query.withException();
}
if (allRequestParams.containsKey("exceptionMessage")) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass at most one of timersOnly or messagesOnly.
- Query twice (once per flag) and merge results if both job types are needed.
- Drop both flags to fetch all jobs and filter client-side.
Example fix
// before
params.put("timersOnly", "true"); params.put("messagesOnly", "true");
// after
params.put("timersOnly", "true"); Defensive patterns
Strategy: validation
Validate before calling
if (params.has("timersOnly") && params.has("messagesOnly")) throw new Error("timersOnly and messagesOnly are mutually exclusive"); Prevention
- Keep a single jobKind option in client code that maps to at most one flag.
- Validate request parameters in your API wrapper before sending.
- Query separately and merge for both kinds.
When it happens
Trigger: GET /cmmn-management/jobs?timersOnly=true&messagesOnly=true — both parameters present in one request.
Common situations: Front-end job dashboards appending every known filter; client SDKs with boolean flags that are both set true; combined query strings copied between endpoints.
Related errors
- Unsupported variable query operation:
- Only one of 'timersOnly' or 'messagesOnly' can be provided.
- Only one of 'timersOnly' or 'messagesOnly' can be provided.
- Variable value is missing for variable: ${name}
- Value-only query (without a variable-name) is only supported
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d0dbbffdb62bc7dd.
Report an issue: GitHub.