flowable/flowable-engine · error · FlowableIllegalArgumentException
executionId is null
Error message
executionId is null
What it means
The HandleCaseTaskErrorCmd constructor validates its arguments and throws FlowableIllegalArgumentException("executionId is null") when the execution id is null. This command propagates a business error to a CMMN case task's execution, which is meaningless without an execution reference.
Solutions
- Pass a valid, non-null executionId when constructing HandleCaseTaskErrorCmd.
- Validate/resolve the executionId from the calling context (task -> execution) before building the command.
- Fix the upstream lookup that produced null (e.g. executionEntityManager lookup or task.getExecutionId()).
- Catch FlowableIllegalArgumentException at the service boundary and surface a validation error.
Example fix
// before
managementService.executeCommand(new HandleCaseTaskErrorCmd(taskInfo.getExecutionId(), error));
// after
if (taskInfo.getExecutionId() == null) {
throw new IllegalStateException("Cannot propagate error: executionId missing");
}
managementService.executeCommand(new HandleCaseTaskErrorCmd(taskInfo.getExecutionId(), error)); Defensive patterns
Strategy: validation
Validate before calling
if (executionId == null || executionId.isEmpty()) {
throw new IllegalStateException("Cannot propagate case task error: executionId missing");
} Type guard
boolean hasExecutionId(String id) { return id != null && !id.isEmpty(); } Try / catch
try {
managementService.executeCommand(new HandleCaseTaskErrorCmd(executionId, error));
} catch (FlowableIllegalArgumentException e) {
throw new BadRequestException("Invalid HandleCaseTaskErrorCmd arguments: " + e.getMessage(), e);
} Prevention
- Resolve executionId from the task/plan item immediately before constructing the command
- Validate command inputs in a thin wrapper around managementService.executeCommand
- Log the source of null ids to find the broken lookup path
When it happens
Trigger: Constructing new HandleCaseTaskErrorCmd(null, error) — e.g. when the executionId was resolved from a task/plan item that returned null, or a caller passes an unset variable into the command.
Common situations: Error-handling pipelines where the execution id is looked up dynamically and the lookup failed; wiring the command from a message/DTO whose executionId field was absent; unit tests forgetting to set the id.
Related errors
- activatedBefore is null
- after time is null
- assignee is null
- availableAfter is null
- availableBefore is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/68716602fecc1a5f.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/HandleCaseTaskErrorCmd.java:44
/**
* Handles an uncaught {@link BusinessError} from a child CMMN case instance
* by propagating it as a BPMN error on the parent CaseTask execution.
* The full BusinessError is passed through so that error data (code, message,
* additional data) is preserved for boundary error event variable mapping.
*
* @author Joram Barrez
*/
public class HandleCaseTaskErrorCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected String executionId;
protected BusinessError error;
public HandleCaseTaskErrorCmd(String executionId, BusinessError error) {
if (executionId == null) {
throw new FlowableIllegalArgumentException("executionId is null");
}
if (error == null) {
throw new FlowableIllegalArgumentException("error is null");
}
this.executionId = executionId;
this.error = error;
}
@Override
public Void execute(CommandContext commandContext) {
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
ExecutionEntity execution = (ExecutionEntity) processEngineConfiguration.getExecutionEntityManager().findById(executionId);
if (execution == null) {
throw new FlowableException("No execution could be found for id " + executionId);
}
ErrorPropagation.propagateError(error, execution);
return null;View on GitHub (pinned to d6d39ce1c6)