{"record":{"id":"d0dbbffdb62bc7dd","repo":"flowable/flowable-engine","slug":"only-one-of-timersonly-or-messagesonly-can-be-d0dbbf","errorCode":null,"errorMessage":"Only one of 'timersOnly' or 'messagesOnly' can be provided.","messagePattern":"Only one of 'timersOnly' or 'messagesOnly' can be provided\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobCollectionResource.java","lineNumber":141,"sourceCode":"            query.subScopeId(allRequestParams.get(\"planItemInstanceId\"));\n            query.scopeType(ScopeTypes.CMMN);\n        }\n        if (allRequestParams.containsKey(\"caseDefinitionId\")) {\n            query.caseDefinitionId(allRequestParams.get(\"caseDefinitionId\"));\n        }\n        if (allRequestParams.containsKey(\"scopeDefinitionId\")) {\n            query.scopeDefinitionId(allRequestParams.get(\"scopeDefinitionId\"));\n            query.scopeType(ScopeTypes.CMMN);\n        }\n        if (allRequestParams.containsKey(\"elementId\")) {\n            query.elementId(allRequestParams.get(\"elementId\"));\n        }\n        if (allRequestParams.containsKey(\"elementName\")) {\n            query.elementName(allRequestParams.get(\"elementName\"));\n        }\n        if (allRequestParams.containsKey(\"timersOnly\")) {\n            if (allRequestParams.containsKey(\"messagesOnly\")) {\n                throw new FlowableIllegalArgumentException(\"Only one of 'timersOnly' or 'messagesOnly' can be provided.\");\n            }\n            if (Boolean.parseBoolean(allRequestParams.get(\"timersOnly\"))) {\n                query.timers();\n            }\n        }\n        if (allRequestParams.containsKey(\"messagesOnly\") && Boolean.parseBoolean(allRequestParams.get(\"messagesOnly\"))) {\n            query.messages();\n        }\n        if (allRequestParams.containsKey(\"dueBefore\")) {\n            query.duedateLowerThan(RequestUtil.getDate(allRequestParams, \"dueBefore\"));\n        }\n        if (allRequestParams.containsKey(\"dueAfter\")) {\n            query.duedateHigherThan(RequestUtil.getDate(allRequestParams, \"dueAfter\"));\n        }\n        if (allRequestParams.containsKey(\"withException\") && Boolean.parseBoolean(allRequestParams.get(\"withException\"))) {\n            query.withException();\n        }\n        if (allRequestParams.containsKey(\"exceptionMessage\")) {","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobCollectionResource.java#L123-L159","documentation":"JobCollectionResource.getJobs rejects requests that include both 'timersOnly' and 'messagesOnly' parameters with FlowableIllegalArgumentException, since a JobQuery cannot be filtered for both job kinds simultaneously.","triggerScenarios":"GET /cmmn-management/jobs?timersOnly=true&messagesOnly=true — both parameters present in one request.","commonSituations":"Front-end job dashboards appending every known filter; client SDKs with boolean flags that are both set true; combined query strings copied between endpoints.","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."],"exampleFix":"// before\nparams.put(\"timersOnly\", \"true\"); params.put(\"messagesOnly\", \"true\");\n// after\nparams.put(\"timersOnly\", \"true\");","handlingStrategy":"validation","validationCode":"if (params.has(\"timersOnly\") && params.has(\"messagesOnly\")) throw new Error(\"timersOnly and messagesOnly are mutually exclusive\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["rest-api","query-parameters","validation"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}