flowable/flowable-engine · error · FlowableIllegalArgumentException
Job id is null
Error message
Job id is null
What it means
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.
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java:109
public CmmnManagementServiceImpl(CmmnEngineConfiguration engineConfiguration) {
super(engineConfiguration);
}
@Override
public Map<String, Long> getTableCounts() {
return commandExecutor.execute(new GetTableCountCmd(EngineConfigurationConstants.KEY_CMMN_ENGINE_CONFIG));
}
@Override
public Collection<String> getTableNames() {
return commandExecutor.execute(new GetTableNamesCmd());
}
@Override
public void executeJob(String jobId) {
if (jobId == null) {
throw new FlowableIllegalArgumentException("Job id is null");
}
try {
commandExecutor.execute(new ExecuteJobCmd(jobId, configuration.getJobServiceConfiguration()));
} catch (RuntimeException e) {
if (e instanceof FlowableException) {
throw e;
} else {
throw new FlowableException("Job " + jobId + " failed", e);
}
}
}
@Override
public void executeHistoryJob(String historyJobId) {
commandExecutor.execute(new ExecuteHistoryJobCmd(historyJobId, configuration.getJobServiceConfiguration()));
}
View on GitHub (pinned to d6d39ce1c6)
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
Example fix
// before
cmmnManagementService.executeJob(jobId);
// after
if (jobId != null) {
cmmnManagementService.executeJob(jobId);
} Defensive patterns
Strategy: validation
Validate before calling
if (jobId == null || jobId.isEmpty()) throw new IllegalArgumentException("jobId required"); Try / catch
try { managementService.executeJob(jobId); } catch (FlowableIllegalArgumentException e) { /* null id */ } Prevention
- 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
When it happens
Trigger: Calling CmmnManagementService.executeJob(null).
Common situations: 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.
Related errors
- Job {jobId} parent is not CMMN case
- The command is null
- The config is null
- variableName is null
- category is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/49e9072588630781.
Report an issue: GitHub.