{"record":{"id":"49e9072588630781","repo":"flowable/flowable-engine","slug":"job-id-is-null","errorCode":null,"errorMessage":"Job id is null","messagePattern":"Job id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java","lineNumber":109,"sourceCode":"\n    public CmmnManagementServiceImpl(CmmnEngineConfiguration engineConfiguration) {\n        super(engineConfiguration);\n    }\n\n    @Override\n    public Map<String, Long> getTableCounts() {\n        return commandExecutor.execute(new GetTableCountCmd(EngineConfigurationConstants.KEY_CMMN_ENGINE_CONFIG));\n    }\n\n    @Override\n    public Collection<String> getTableNames() {\n        return commandExecutor.execute(new GetTableNamesCmd());\n    }\n    \n    @Override\n    public void executeJob(String jobId) {\n        if (jobId == null) {\n            throw new FlowableIllegalArgumentException(\"Job id is null\");\n        }\n\n        try {\n            commandExecutor.execute(new ExecuteJobCmd(jobId, configuration.getJobServiceConfiguration()));\n        } catch (RuntimeException e) {\n            if (e instanceof FlowableException) {\n                throw e;\n            } else {\n                throw new FlowableException(\"Job \" + jobId + \" failed\", e);\n            }\n        }\n    }\n    \n    @Override\n    public void executeHistoryJob(String historyJobId) {\n        commandExecutor.execute(new ExecuteHistoryJobCmd(historyJobId, configuration.getJobServiceConfiguration()));\n    }\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java#L91-L127","documentation":"Argument validation in CmmnManagementServiceImpl.executeJob: the jobId parameter is null, so the command cannot be built. Flowable throws FlowableIllegalArgumentException immediately before touching the command executor.","triggerScenarios":"Calling CmmnManagementService.executeJob(null).","commonSituations":"Job id fetched from a query/DTO that returned no match; forgetting to check a Map.get or entity getter that returned null; refactoring that dropped a null check on an optional job id.","solutions":["Ensure a non-null jobId is passed; look up the id from the Job entity first","Guard the call site with a null check or Objects.requireNonNull before invoking executeJob","If the id comes from external input, validate it is a non-empty string"],"exampleFix":"// before\ncmmnManagementService.executeJob(jobId);\n// after\nif (jobId != null) {\n    cmmnManagementService.executeJob(jobId);\n}","handlingStrategy":"validation","validationCode":"if (jobId == null || jobId.isEmpty()) throw new IllegalArgumentException(\"jobId required\");","typeGuard":null,"tryCatchPattern":"try { managementService.executeJob(jobId); } catch (FlowableIllegalArgumentException e) { /* null id */ }","preventionTips":["Fetch job ids via JobQuery and only pass resolved, non-null ids","Use Objects.requireNonNull at call boundaries","Don't pass untrusted/optional string ids without checks"],"tags":["java","null-check","job","validation"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}