{"record":{"id":"25a2131cefadcdb8","repo":"flowable/flowable-engine","slug":"only-one-of-orderascendingcolumn-or-orderdescen","errorCode":null,"errorMessage":"Only one of 'orderAscendingColumn' or 'orderDescendingColumn' can be supplied.","messagePattern":"Only one of 'orderAscendingColumn' or 'orderDescendingColumn' can be supplied\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/TableDataResource.java","lineNumber":86,"sourceCode":"            @ApiResponse(code = 200, message = \"Indicates the table exists and the table row data is returned\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested table does not exist.\")\n    })\n    @GetMapping(value = \"/management/tables/{tableName}/data\", produces = \"application/json\")\n    public DataResponse<List<Map<String, Object>>> getTableData(@ApiParam(name = \"tableName\") @PathVariable String tableName, @ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams) {\n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessTableInfo();\n        }\n        \n        // Check if table exists before continuing\n        if (managementService.getTableMetaData(tableName) == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a table with name '\" + tableName + \"'.\", String.class);\n        }\n\n        String orderAsc = allRequestParams.get(\"orderAscendingColumn\");\n        String orderDesc = allRequestParams.get(\"orderDescendingColumn\");\n\n        if (orderAsc != null && orderDesc != null) {\n            throw new FlowableIllegalArgumentException(\"Only one of 'orderAscendingColumn' or 'orderDescendingColumn' can be supplied.\");\n        }\n\n        Integer start = null;\n        if (allRequestParams.containsKey(\"start\")) {\n            start = Integer.valueOf(allRequestParams.get(\"start\"));\n        }\n\n        if (start == null) {\n            start = 0;\n        }\n\n        Integer size = null;\n        if (allRequestParams.containsKey(\"size\")) {\n            size = Integer.valueOf(allRequestParams.get(\"size\"));\n        }\n\n        if (size == null) {\n            size = DEFAULT_RESULT_SIZE;","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/TableDataResource.java#L68-L104","documentation":"GET /management/tables/{tableName} accepts optional sorting parameters orderAscendingColumn and orderDescendingColumn. Supplying both is ambiguous, so a FlowableIllegalArgumentException is thrown. The endpoint only supports one sort direction per request.","triggerScenarios":"GET /management/tables/ACT_RU_TASK?orderAscendingColumn=ID_&orderDescendingColumn=NAME_ — both parameters present in the same request.","commonSituations":"Client code builds the query string dynamically and appends both parameters; a UI with two sort dropdowns sending both values instead of clearing one.","solutions":["Remove one of the two parameters from the request, keeping only the column you want to sort by.","In client code, mutually exclude the parameters before building the URL.","Handle HTTP 400 from this endpoint and retry with a single sort parameter."],"exampleFix":"// before\nparams = 'orderAscendingColumn=ID_&orderDescendingColumn=NAME_';\n// after\nparams = 'orderAscendingColumn=ID_';","handlingStrategy":"validation","validationCode":"if (orderAsc && orderDesc) throw new Error('Supply only one of orderAscendingColumn/orderDescendingColumn');","typeGuard":null,"tryCatchPattern":"try { ... } catch (e) { if (e.status === 400) retryWithSingleSort(); else throw e; }","preventionTips":["Model sorting as a single {column, direction} object in client code so both-direction params are impossible.","Clear the opposite sort parameter when the user changes sort direction in the UI."],"tags":["rest-api","invalid-argument","sorting","query-parameters"],"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-18T11:17:12.947Z"}