{"record":{"id":"bcb60cd9a2e6a4ba","repo":"flowable/flowable-engine","slug":"jobid-and-job-is-null-bcb60c","errorCode":null,"errorMessage":"jobId and job is null","messagePattern":"jobId and job is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/MoveTimerToExecutableJobCmd.java","lineNumber":48,"sourceCode":"public class MoveTimerToExecutableJobCmd implements Command<JobEntity>, Serializable {\n\n    private static final long serialVersionUID = 1L;\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(MoveTimerToExecutableJobCmd.class);\n\n    protected String jobId;\n    protected JobServiceConfiguration jobServiceConfiguration;\n\n    public MoveTimerToExecutableJobCmd(String jobId, JobServiceConfiguration jobServiceConfiguration) {\n        this.jobId = jobId;\n        this.jobServiceConfiguration = jobServiceConfiguration;\n    }\n\n    @Override\n    public JobEntity execute(CommandContext commandContext) {\n\n        if (jobId == null) {\n            throw new FlowableIllegalArgumentException(\"jobId and job is null\");\n        }\n\n        TimerJobEntity timerJob = jobServiceConfiguration.getTimerJobEntityManager().findById(jobId);\n\n        if (timerJob == null) {\n            throw new JobNotFoundException(jobId);\n        }\n\n        if (LOGGER.isDebugEnabled()) {\n            LOGGER.debug(\"Executing timer job {}\", timerJob.getId());\n        }\n\n        return jobServiceConfiguration.getJobManager().moveTimerJobToExecutableJob(timerJob);\n    }\n\n    public String getJobId() {\n        return jobId;\n    }","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/MoveTimerToExecutableJobCmd.java#L30-L66","documentation":"MoveTimerToExecutableJobCmd.execute() requires a timer jobId and throws FlowableIllegalArgumentException with message 'jobId and job is null' when it is null. The command promotes a timer job (ACT_RU_TIMER_JOB) to the executable job table; without an id there is nothing to move.","triggerScenarios":"Calling ManagementService.moveTimerToExecutableJob(timerJobId) with a null id, or executing the command directly.","commonSituations":"Timer id taken from a nullable timer-job query result or external scheduler payload; admin consoles submitting empty ids; scripts that do not check for null before moving.","solutions":["Validate the timer job id is non-null before calling moveTimerToExecutableJob.","Skip null-id entries in batch promotion loops with a warning.","Fix the query/payload source that yields the null id."],"exampleFix":"// before\nmanagementService.moveTimerToExecutableJob(timerId);\n// after\nif (timerId != null) {\n    managementService.moveTimerToExecutableJob(timerId);\n}","handlingStrategy":"validation","validationCode":"if (timerJobId == null || timerJobId.isEmpty()) throw new IllegalArgumentException(\"timer jobId required\");","typeGuard":"boolean promotable = timerJob != null && timerJob.getId() != null;","tryCatchPattern":"try { managementService.moveTimerToExecutableJob(timerId); } catch (FlowableIllegalArgumentException e) { log.error(\"Invalid timer id: {}\", e.getMessage()); }","preventionTips":["Validate timer ids from external schedulers before promotion","Guard batch promotion loops against null entries","Keep a single helper for id validation across job management calls"],"tags":["flowable","null-argument","timer-job","illegal-argument"],"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"}