{"record":{"id":"145cbc8f5f63f42d","repo":"flowable/flowable-engine","slug":"no-action-found-in-request-body","errorCode":null,"errorMessage":"No action found in request body.","messagePattern":"No action found in request body\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResource.java","lineNumber":84,"sourceCode":"        }\n\n        return appRestResponseFactory.createAppDefinitionResponse(appDefinition);\n    }\n    \n    @ApiOperation(value = \"Execute actions for an app definition\", tags = { \"App Definitions\" },\n            notes = \"Execute actions for an app definition (Update category)\")\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates action has been executed for the specified app definition. (category altered)\"),\n            @ApiResponse(code = 400, message = \"Indicates no category was defined in the request body.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested app definition was not found.\")\n    })\n    @PutMapping(value = \"/app-repository/app-definitions/{appDefinitionId}\", produces = \"application/json\")\n    public AppDefinitionResponse executeAppDefinitionAction(\n            @ApiParam(name = \"appDefinitionId\") @PathVariable String appDefinitionId,\n            @ApiParam(required = true) @RequestBody AppDefinitionActionRequest actionRequest) {\n\n        if (actionRequest == null) {\n            throw new FlowableIllegalArgumentException(\"No action found in request body.\");\n        }\n\n        AppDefinition appDefinition = appRepositoryService.getAppDefinition(appDefinitionId);\n\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find an app definition with id '\" + appDefinitionId + \"'.\", AppDefinition.class);\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessAppDefinitionInfoById(appDefinition);\n        }\n\n        if (actionRequest.getCategory() != null) {\n            // Update of category required\n            appRepositoryService.setAppDefinitionCategory(appDefinition.getId(), actionRequest.getCategory());\n\n            // No need to re-fetch the AppDefinition entity, just update category in response\n            AppDefinitionResponse response = appRestResponseFactory.createAppDefinitionResponse(appDefinition);","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResource.java#L66-L102","documentation":"Thrown by taskNameInIgnoreCase(Collection) when any element inside the collection is null. Every name in the IN list must be a concrete string; a null element would corrupt the generated SQL parameters. This is per-element validation of the argument collection.","triggerScenarios":"Calling taskNameInIgnoreCase(Arrays.asList(\"a\", null)) or any list containing a null entry, commonly produced by reading sparse data (e.g., DB rows or JSON arrays with missing values) into a list.","commonSituations":"Populating the name list from external input or another table where some rows lack a name; using a list that was never sanitized after deserialization.","solutions":["Strip null entries before calling: names.stream().filter(Objects::nonNull).collect(toList()).","Validate the collection contents up front and reject the request with a clear message if nulls are present.","Fix the data source so names are always populated (NOT NULL constraint, default values)."],"exampleFix":"// before\nquery.taskNameInIgnoreCase(names); // may contain nulls\n\n// after\nList<String> safe = names.stream().filter(Objects::nonNull).collect(Collectors.toList());\nif (!safe.isEmpty()) {\n    query.taskNameInIgnoreCase(safe);\n}","handlingStrategy":"validation","validationCode":"List<String> safe = names == null ? Collections.emptyList()\n        : names.stream().filter(Objects::nonNull).collect(Collectors.toList());\nif (!safe.isEmpty()) { query.taskNameInIgnoreCase(safe); }","typeGuard":"static boolean allNonNull(Collection<String> c) { return c != null && c.stream().allMatch(Objects::nonNull); }","tryCatchPattern":"try {\n    query.taskNameInIgnoreCase(names);\n} catch (FlowableIllegalArgumentException e) {\n    LOG.warn(\"Null entry in task name list: {}\", e.getMessage());\n    throw new BadRequestException(\"taskNames must not contain nulls\");\n}","preventionTips":["Sanitize collections (filter Objects::nonNull) before passing to query builders","Enforce NOT NULL / required fields at the data source producing the list","Validate request payloads containing name lists before query construction"],"tags":["flowable","query-builder","null-element","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}