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
DeadLetterJobCollectionResource.getJobs rejects simultaneous 'timersOnly' and 'messagesOnly' request parameters, because the underlying DeadLetterJobQuery cannot filter both at once; it throws FlowableIllegalArgumentException.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/DeadLetterJobCollectionResource.java:126
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("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)
Solutions
- Send only one of timersOnly or messagesOnly in the request.
- If both job kinds are needed, issue two queries and merge the results client-side.
- Omit both flags to get all dead letter jobs and filter by type afterwards.
Example fix
// before GET /cmmn-management/deadletter-jobs?timersOnly=true&messagesOnly=true // after GET /cmmn-management/deadletter-jobs?timersOnly=true
Defensive patterns
Strategy: validation
Validate before calling
const flags=["timersOnly","messagesOnly"].filter(f => params.get(f) !== null);
if (flags.length > 1) throw new Error("Send at most one of timersOnly/messagesOnly"); Prevention
- Never append both filter flags in generated query strings.
- Model filters as a mutually exclusive option in client SDKs.
- Filter by type client-side if you need both kinds.
When it happens
Trigger: GET /cmmn-management/deadletter-jobs?timersOnly=true&messagesOnly=true — both filter parameters present in the request.
Common situations: Generic job-listing UIs that always append both flags; copy-pasted query strings combining filters; API clients building parameter maps without mutual-exclusion checks.
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/fd58d794c5d6ea12.
Report an issue: GitHub.