{"record":{"id":"de148bdd5534d6fd","repo":"flowable/flowable-engine","slug":"could-not-find-an-app-definition-with-id-appdefi-de148b","errorCode":null,"errorMessage":"Could not find an app definition with id '<appDefinitionId>'.","messagePattern":"Could not find an app definition with id '<appDefinitionId>'\\.","errorType":"http","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResource.java","lineNumber":90,"sourceCode":"            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);\n            response.setCategory(actionRequest.getCategory());\n            return response;\n        }\n        \n        throw new FlowableIllegalArgumentException(\"Invalid action: '\" + actionRequest.getAction() + \"'.\");\n    }","sourceCodeStart":72,"sourceCodeEnd":108,"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#L72-L108","documentation":"Thrown by taskNameInIgnoreCase(Collection) when the query already has an exact taskName filter set. A historic task query may combine the ignore-case IN list with only one name-matching strategy, and an exact-name equality filter is incompatible with it. This fail-fast check prevents contradictory SQL.","triggerScenarios":"Calling taskName(\"x\") (or historicProcessVariables-style name setters) followed by taskNameInIgnoreCase(...), or the reverse order, on the same HistoricTaskInstanceQuery instance.","commonSituations":"Incremental query building where optional filters from different code paths both get applied; copying a template query that already sets taskName and then adding the IN filter.","solutions":["Remove the taskName(...) call and keep only taskNameInIgnoreCase.","If both an exact match and an IN list are needed, add the exact name to the IN list instead of a separate taskName call.","Make filter-building logic mutually exclusive (if/else) so only one name criterion is applied."],"exampleFix":"// before\nquery.taskName(\"Invoice\");\nquery.taskNameInIgnoreCase(List.of(\"Invoice\", \"Receipt\")); // throws\n\n// after\nquery.taskNameInIgnoreCase(List.of(\"Invoice\", \"Receipt\"));","handlingStrategy":"validation","validationCode":"if (query.getTaskName() != null) {\n    names = new ArrayList<>(names); names.add(query.getTaskName()); // merge instead of mixing\n}\nquery.taskNameInIgnoreCase(names);","typeGuard":null,"tryCatchPattern":"try {\n    query.taskNameInIgnoreCase(names);\n} catch (FlowableIllegalArgumentException e) {\n    throw new IllegalStateException(\"Conflicting name filters on historic task query\", e);\n}","preventionTips":["Apply only one task-name criterion per query object","Fold an exact taskName value into the IN list rather than setting both","Use if/else when assembling optional filters"],"tags":["flowable","query-builder","illegal-argument","mutually-exclusive-filters"],"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-14T05:17:10.506Z"}