{"record":{"id":"6b78dc405e8e6d72","repo":"flowable/flowable-engine","slug":"could-not-find-an-app-definition-with-id-appdefi-6b78dc","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/AppDefinitionResourceDataResource.java","lineNumber":64,"sourceCode":"\n    @Autowired\n    protected AppRepositoryService appRepositoryService;\n    \n    @Autowired(required=false)\n    protected AppRestApiInterceptor restApiInterceptor;\n\n    @ApiOperation(value = \"Get an app definition resource content\", nickname = \"getAppDefinitionContent\", tags = { \"App Definitions\" })\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates both app definition and resource have been found and the resource data has been returned.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested app definition was not found or there is no resource with the given id present in the app definition. The status-description contains additional information.\")\n    })\n    @GetMapping(value = \"/app-repository/app-definitions/{appDefinitionId}/resourcedata\", produces = \"application/json\")\n    @ResponseBody\n    public byte[] getAppDefinitionResource(@ApiParam(name = \"appDefinitionId\") @PathVariable String appDefinitionId, HttpServletResponse response) {\n        AppDefinition appDefinition = appRepositoryService.getAppDefinition(appDefinitionId);\n\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find an app definition with id '\" + appDefinitionId);\n        }\n        if (appDefinition.getDeploymentId() == null) {\n            throw new FlowableException(\"No deployment id available\");\n        }\n        if (appDefinition.getResourceName() == null) {\n            throw new FlowableException(\"No resource name available\");\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessAppDefinitionInfoById(appDefinition);\n        }\n\n        // Check if deployment exists\n        AppDeployment deployment = appRepositoryService.createDeploymentQuery().deploymentId(appDefinition.getDeploymentId()).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + appDefinition.getDeploymentId());\n        }\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResourceDataResource.java#L46-L82","documentation":"Thrown by taskNameInIgnoreCase(Collection) when taskNameLikeIgnoreCase is already set on the query. The two filters are both case-insensitive name predicates and cannot coexist; the builder validates this immediately to avoid generating contradictory SQL.","triggerScenarios":"Calling taskNameLikeIgnoreCase(\"repo%\") followed by taskNameInIgnoreCase(...) (or the reverse) on the same HistoricTaskInstanceQuery instance.","commonSituations":"UI/API layers that apply optional case-insensitive filters cumulatively; merging a legacy query (using taskNameLikeIgnoreCase) with new code that switched to taskNameInIgnoreCase.","solutions":["Remove the taskNameLikeIgnoreCase call and keep only taskNameInIgnoreCase.","If pattern semantics are required, expand the pattern to a known set of names and pass that set to taskNameInIgnoreCase.","Refactor filter assembly into a single mutually exclusive name-criterion selection."],"exampleFix":"// before\nquery.taskNameLikeIgnoreCase(\"repo%\");\nquery.taskNameInIgnoreCase(List.of(\"Report A\")); // throws\n\n// after\nquery.taskNameInIgnoreCase(List.of(\"Report A\", \"Report B\"));","handlingStrategy":"validation","validationCode":"if (query.getTaskNameLikeIgnoreCase() != null) {\n    throw new IllegalStateException(\"Choose either taskNameLikeIgnoreCase or taskNameInIgnoreCase\");\n}\nquery.taskNameInIgnoreCase(names);","typeGuard":null,"tryCatchPattern":"try {\n    query.taskNameInIgnoreCase(names);\n} catch (FlowableIllegalArgumentException e) {\n    throw new IllegalStateException(\"Both case-insensitive name filters set on query\", e);\n}","preventionTips":["Pick one case-insensitive name strategy per query and document it","When migrating between filter APIs, remove the old setter calls","Keep query construction centralized to avoid cumulative setter calls"],"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"}