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

  1. Send only one of timersOnly or messagesOnly in the request.
  2. If both job kinds are needed, issue two queries and merge the results client-side.
  3. 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

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/fd58d794c5d6ea12. Report an issue: GitHub.