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
The job collection endpoint GET /management/jobs supports filtering to timer jobs (timersOnly) or message jobs (messagesOnly). Requesting both filters is contradictory — a job query cannot be timers-only and messages-only at once — so FlowableIllegalArgumentException is thrown.
Solutions
- Send only one of timersOnly or messagesOnly per request.
- If you need both timer and message jobs, make two requests without either filter or issue two filtered calls and merge results.
- Strip mutually exclusive parameters in client code before issuing the request.
Example fix
// before GET /management/jobs?timersOnly=true&messagesOnly=true // after GET /management/jobs?timersOnly=true
Defensive patterns
Strategy: validation
Validate before calling
if (params.timersOnly != null && params.messagesOnly != null) throw new Error('timersOnly and messagesOnly are mutually exclusive'); Try / catch
try { ... } catch (e) { if (e.status === 400 && /timersOnly/.test(e.message)) fixFiltersAndRetry(); else throw e; } Prevention
- Represent job type filter as a single enum ('timers'|'messages'|'all') in client code.
- Do not forward all query params blindly; whitelist one-of filters.
When it happens
Trigger: GET /management/jobs?timersOnly=true&messagesOnly=true — both request parameters present (regardless of their boolean values).
Common situations: Generic search UI forwarding all active filter checkboxes as parameters; proxy/gateway merging query params from multiple sources; copy-pasted URLs accumulating parameters.
Understand the failure class
Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.
Related errors
- Only one of 'orderAscendingColumn' or…
- Only one of 'timersOnly' or 'messagesOnly' can be provided.
- Could not find a dead letter job(s) with id(s)
- Could not find a history job with id ''.
- Could not find a job with id ''.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c71fb6882cce32d2.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/TimerJobCollectionResource.java:129
}
if (allRequestParams.containsKey("elementId")) {
query.elementId(allRequestParams.get("elementId"));
}
if (allRequestParams.containsKey("handlerType")) {
query.handlerType(allRequestParams.get("handlerType"));
}
if (allRequestParams.containsKey("handlerTypes")) {
query.handlerTypes(Arrays.asList(allRequestParams.get("handlerTypes").split(",")));
}
if (allRequestParams.containsKey("elementName")) {
query.elementName(allRequestParams.get("elementName"));
}
if (allRequestParams.containsKey("executable")) {
query.executable();
}
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)