{"record":{"id":"d740c16178ceeeb6","repo":"flowable/flowable-engine","slug":"executionid-is-null-d740c1","errorCode":null,"errorMessage":"executionId is null","messagePattern":"executionId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectsCmd.java","lineNumber":71,"sourceCode":"        this.executionId = executionId;\n        this.dataObjectNames = dataObjectNames;\n        this.isLocal = isLocal;\n    }\n\n    public GetDataObjectsCmd(String executionId, Collection<String> dataObjectNames, boolean isLocal, String locale, boolean withLocalizationFallback) {\n        this.executionId = executionId;\n        this.dataObjectNames = dataObjectNames;\n        this.isLocal = isLocal;\n        this.locale = locale;\n        this.withLocalizationFallback = withLocalizationFallback;\n    }\n\n    @Override\n    public Map<String, DataObject> execute(CommandContext commandContext) {\n\n        // Verify existence of execution\n        if (executionId == null) {\n            throw new FlowableIllegalArgumentException(\"executionId 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        Map<String, VariableInstance> variables = null;\n\n        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {\n            Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();\n            variables = compatibilityHandler.getExecutionVariableInstances(executionId, dataObjectNames, isLocal);\n\n        } else {\n\n            if (dataObjectNames == null || dataObjectNames.isEmpty()) {\n                // Fetch all","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectsCmd.java#L53-L89","documentation":"GetDataObjectsCmd retrieves all data objects for an execution. It validates executionId first; a null id throws FlowableIllegalArgumentException. Unlike the single-object command, this one has no name argument, so the execution id is the only required input checked up front.","triggerScenarios":"runtimeService.getDataObjects(null) or getDataObjectsLocal(null, ...) ; an execution id variable left uninitialized in batch/read code; generics or helper wrappers passing through null ids.","commonSituations":"Report/listing tools iterating process instances where an entry lacks an execution id; error-prone result mapping from a previous query returning null rows.","solutions":["Validate the execution id before calling getDataObjects","Skip entries with null ids in loops rather than invoking the API","Resolve ids from runtimeService.createExecutionQuery() results only","Fix upstream mapping code that produces null ids"],"exampleFix":"// before\nMap<String, DataObject> all = runtimeService.getDataObjects(executionId); // null\n// after\nif (executionId != null) {\n    Map<String, DataObject> all = runtimeService.getDataObjects(executionId);\n}","handlingStrategy":"validation","validationCode":"if (executionId == null) return Collections.emptyMap();\nMap<String, DataObject> all = runtimeService.getDataObjects(executionId);","typeGuard":"boolean hasExecutionId(String id) { return id != null && !id.isEmpty(); }","tryCatchPattern":null,"preventionTips":["Filter out null ids before iterating lookups","Source ids exclusively from ExecutionQuery results","Fix data mapping that yields null execution ids"],"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"}