{"record":{"id":"d33b5067771af973","repo":"flowable/flowable-engine","slug":"app-definition-id-is-null","errorCode":null,"errorMessage":"App definition id is null","messagePattern":"App definition id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SetAppDefinitionCategoryCmd.java","lineNumber":42,"sourceCode":"\n/**\n * @author Tijs Rademakers\n */\npublic class SetAppDefinitionCategoryCmd implements Command<Void> {\n\n    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;","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SetAppDefinitionCategoryCmd.java#L24-L60","documentation":"Null-argument guard at the start of SetAppDefinitionCategoryCmd.execute: appDefinitionId is null, so updating an app definition's category is refused before any entity manager lookup. The category value itself may legitimately be null; the id may not.","triggerScenarios":"Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SetAppDefinitionCategoryCmd.java:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply the app definition id whose category should change","Null-check the argument in the calling service"],"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"}