flowable/flowable-engine · error · FlowableIllegalArgumentException
dataObjectName is null
Error message
dataObjectName is null
What it means
GetDataObjectCmd requires both an execution id and a data object name. After validating executionId it validates dataObjectName; a null name throws FlowableIllegalArgumentException. The name is the lookup key for the data object within the execution's scope, so it cannot be inferred.
Solutions
- Ensure dataObjectName is a non-null, non-empty string matching a data object defined in the process
- Validate the name at the boundary that constructs the call
- Compare against DataObject definitions in the BPMN model to confirm exact spelling
- If names are optional in your API, guard the call and skip when absent
Example fix
// before
runtimeService.getDataObject(executionId, dataObjectName); // null name
// after
if (dataObjectName != null && !dataObjectName.isEmpty()) {
runtimeService.getDataObject(executionId, dataObjectName);
} Defensive patterns
Strategy: validation
Validate before calling
if (dataObjectName == null || dataObjectName.isEmpty()) throw new IllegalArgumentException("dataObjectName required");
DataObject d = runtimeService.getDataObject(executionId, dataObjectName); Type guard
boolean hasDataObjectName(String n) { return n != null && !n.trim().isEmpty(); } Prevention
- Keep data object names in constants/config with validation on startup
- Verify names against the BPMN model's data object definitions
- Sanitize externally supplied names for null/blank
When it happens
Trigger: Calling runtimeService.getDataObject(executionId, null) or the *Local variants with a null name; names generated dynamically (e.g. from configuration or UI fields) that are empty/unset; passing the wrong parameter into an overloaded call.
Common situations: Configuration key renamed upstream so the lookup variable is null; payload-driven workflows where the data object name field is optional but passed through unchecked.
Related errors
- executionId is null
- executionId is null
- activatedBefore is null
- activity tenant id is null
- after time is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/1357460ecb3e6080.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectCmd.java:68
this.dataObjectName = dataObjectName;
this.isLocal = isLocal;
}
public GetDataObjectCmd(String executionId, String dataObjectName, boolean isLocal, String locale, boolean withLocalizationFallback) {
this.executionId = executionId;
this.dataObjectName = dataObjectName;
this.isLocal = isLocal;
this.locale = locale;
this.withLocalizationFallback = withLocalizationFallback;
}
@Override
public DataObject execute(CommandContext commandContext) {
if (executionId == null) {
throw new FlowableIllegalArgumentException("executionId is null");
}
if (dataObjectName == null) {
throw new FlowableIllegalArgumentException("dataObjectName is null");
}
ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);
if (execution == null) {
throw new FlowableObjectNotFoundException("execution " + executionId + " doesn't exist", Execution.class);
}
DataObject dataObject = null;
VariableInstance variableEntity = null;
if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {
Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();
variableEntity = compatibilityHandler.getExecutionVariableInstance(executionId, dataObjectName, isLocal);
} else {
if (isLocal) {
variableEntity = execution.getVariableInstanceLocal(dataObjectName, false);View on GitHub (pinned to d6d39ce1c6)