{"record":{"id":"cd2415d94c77ac92","repo":"flowable/flowable-engine","slug":"appdefinitionid-is-null-cd2415","errorCode":null,"errorMessage":"appDefinitionId is null","messagePattern":"appDefinitionId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/GetAppModelCmd.java","lineNumber":37,"sourceCode":"import org.flowable.common.engine.api.FlowableIllegalArgumentException;\nimport org.flowable.common.engine.impl.interceptor.Command;\nimport org.flowable.common.engine.impl.interceptor.CommandContext;\n\n/**\n * @author Tijs Rademakers\n */\npublic class GetAppModelCmd implements Command<AppModel> {\n\n    protected String appDefinitionId;\n\n    public GetAppModelCmd(String appDefinitionId) {\n        this.appDefinitionId = appDefinitionId;\n    }\n\n    @Override\n    public AppModel execute(CommandContext commandContext) {\n        if (appDefinitionId == null) {\n            throw new FlowableIllegalArgumentException(\"appDefinitionId is null\");\n        }\n        \n        AppDeploymentManager deploymentManager = CommandContextUtil.getAppEngineConfiguration(commandContext).getDeploymentManager();\n        AppDefinition appDefinition = deploymentManager.findDeployedAppDefinitionById(appDefinitionId);\n        if (appDefinition != null) {\n            return deploymentManager.resolveAppDefinition(appDefinition).getAppModel();\n        }\n        return null;\n    }\n}","sourceCodeStart":19,"sourceCodeEnd":47,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/GetAppModelCmd.java#L19-L47","documentation":"Null-argument guard at the top of the GetAppModelCmd command execution: the appDefinitionId passed to the constructor was null, so the command refuses to look up the app model before touching the persistence layer. The caller (typically AppRepositoryService.getAppModel) forwarded a null id.","triggerScenarios":"Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/GetAppModelCmd.java:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the id returned by an app definition query","Null-check the argument in the calling service before constructing the command"],"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"}