{"record":{"id":"a847fc592253d3c4","repo":"flowable/flowable-engine","slug":"no-app-definition-found-for-id","errorCode":null,"errorMessage":"No app definition found for id = ''","messagePattern":"No app definition found for id = ''","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SetAppDefinitionCategoryCmd.java","lineNumber":48,"sourceCode":"    protected String appDefinitionId;\n    protected String category;\n\n    public SetAppDefinitionCategoryCmd(String appDefinitionId, String category) {\n        this.appDefinitionId = appDefinitionId;\n        this.category = category;\n    }\n\n    @Override\n    public Void execute(CommandContext commandContext) {\n\n        if (appDefinitionId == null) {\n            throw new FlowableIllegalArgumentException(\"App definition id is null\");\n        }\n\n        AppDefinitionEntity appDefinition = CommandContextUtil.getAppDefinitionEntityManager(commandContext).findById(appDefinitionId);\n\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"No app definition found for id = '\" + appDefinitionId + \"'\", AppDefinition.class);\n        }\n\n        // Update category\n        appDefinition.setCategory(category);\n\n        // Remove app definition from cache, it will be refetch later\n        DeploymentCache<AppDefinitionCacheEntry> appDefinitionCache = CommandContextUtil.getAppEngineConfiguration(commandContext).getAppDefinitionCache();\n        if (appDefinitionCache != null) {\n            appDefinitionCache.remove(appDefinitionId);\n        }\n\n        return null;\n    }\n\n}\n","sourceCodeStart":30,"sourceCodeEnd":64,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SetAppDefinitionCategoryCmd.java#L30-L64","documentation":"Lookup miss while setting an app definition category: the appDefinitionId passed its null check, but the app definition manager cannot find a matching AppDefinitionEntity, so there is nothing to update.","triggerScenarios":"Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SetAppDefinitionCategoryCmd.java:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the id via an app definition query first","Treat as 404 in REST callers and surface the unknown id to the client"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}