{"record":{"id":"1357460ecb3e6080","repo":"flowable/flowable-engine","slug":"dataobjectname-is-null","errorCode":null,"errorMessage":"dataObjectName is null","messagePattern":"dataObjectName is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectCmd.java","lineNumber":68,"sourceCode":"        this.dataObjectName = dataObjectName;\n        this.isLocal = isLocal;\n    }\n\n    public GetDataObjectCmd(String executionId, String dataObjectName, boolean isLocal, String locale, boolean withLocalizationFallback) {\n        this.executionId = executionId;\n        this.dataObjectName = dataObjectName;\n        this.isLocal = isLocal;\n        this.locale = locale;\n        this.withLocalizationFallback = withLocalizationFallback;\n    }\n\n    @Override\n    public DataObject execute(CommandContext commandContext) {\n        if (executionId == null) {\n            throw new FlowableIllegalArgumentException(\"executionId is null\");\n        }\n        if (dataObjectName == null) {\n            throw new FlowableIllegalArgumentException(\"dataObjectName is null\");\n        }\n\n        ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);\n\n        if (execution == null) {\n            throw new FlowableObjectNotFoundException(\"execution \" + executionId + \" doesn't exist\", Execution.class);\n        }\n\n        DataObject dataObject = null;\n\n        VariableInstance variableEntity = null;\n        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {\n            Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();\n            variableEntity = compatibilityHandler.getExecutionVariableInstance(executionId, dataObjectName, isLocal);\n\n        } else {\n            if (isLocal) {\n                variableEntity = execution.getVariableInstanceLocal(dataObjectName, false);","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectCmd.java#L50-L86","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nruntimeService.getDataObject(executionId, dataObjectName); // null name\n// after\nif (dataObjectName != null && !dataObjectName.isEmpty()) {\n    runtimeService.getDataObject(executionId, dataObjectName);\n}","handlingStrategy":"validation","validationCode":"if (dataObjectName == null || dataObjectName.isEmpty()) throw new IllegalArgumentException(\"dataObjectName required\");\nDataObject d = runtimeService.getDataObject(executionId, dataObjectName);","typeGuard":"boolean hasDataObjectName(String n) { return n != null && !n.trim().isEmpty(); }","tryCatchPattern":null,"preventionTips":["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"],"tags":["flowable","null-argument","data-object"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}