{"record":{"id":"c025f221144bca16","repo":"flowable/flowable-engine","slug":"historic-detail-detailid-does-not-have-a","errorCode":null,"errorMessage":"Historic detail '\" + detailId + \"' does not have a variable value.","messagePattern":"Historic detail '\" \\+ detailId \\+ \"' does not have a variable value\\.","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"warning","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricDetailDataResource.java","lineNumber":104,"sourceCode":"            throw new FlowableException(\"Unexpected exception getting variable data\", ioe);\n        }\n    }\n\n    public RestVariable getVariableFromRequest(boolean includeBinary, String detailId) {\n        Object value = null;\n        HistoricVariableUpdate variableUpdate = null;\n        HistoricDetail detailObject = historyService.createHistoricDetailQuery().id(detailId).singleResult();\n        if (detailObject instanceof HistoricVariableUpdate) {\n            variableUpdate = (HistoricVariableUpdate) detailObject;\n            value = variableUpdate.getValue();\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessHistoryDetailById(detailObject);\n        }\n\n        if (value == null) {\n            throw new FlowableObjectNotFoundException(\"Historic detail '\" + detailId + \"' does not have a variable value.\", VariableInstanceEntity.class);\n        } else {\n            return restResponseFactory.createRestVariable(variableUpdate.getVariableName(), value, null, detailId, RestResponseFactory.VARIABLE_HISTORY_DETAIL, includeBinary);\n        }\n    }\n}\n","sourceCodeStart":86,"sourceCodeEnd":110,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricDetailDataResource.java#L86-L110","documentation":"A historic detail record was found but its associated variable value is null — the detail exists yet carries no variable payload (e.g. a variable was set to null at that point in history). Flowable throws FlowableObjectNotFoundException naming the detailId so clients know there is nothing to return.","triggerScenarios":"GET /history/historic-detail/{detailId} (via the variable/variable-data endpoints) where the HistoricVariableUpdate's value is null because the variable was assigned null in the process.","commonSituations":"Variables explicitly set to null during process execution; querying data for a detail created by a null assignment; race between deletion and query in some history levels.","solutions":["Treat this as 'value is null' rather than 'detail not found' — handle it as an empty value in the client","Avoid setting variables to null; remove them instead or use a sentinel value","Catch FlowableObjectNotFoundException and skip/represent null values in history views"],"exampleFix":"// before\nruntimeService.setVariable(executionId, \" approver\", null)\n\n// after\nruntimeService.removeVariable(executionId, \"approver\") // or use a non-null sentinel","handlingStrategy":"fallback","validationCode":"const detail = await getHistoricDetail(detailId);\nif (detail.value == null || detail.value === undefined) {\n  console.warn(`Detail ${detailId} has null variable value`);\n}","typeGuard":"function hasValue(detail) { return detail != null && detail.value !== null && detail.value !== undefined; }","tryCatchPattern":"try { return await getVariable(detailId); } catch (e) { if (e.status === 404) return { value: null, detailId }; throw e; }","preventionTips":["Avoid setting variables to null in processes; remove them instead","Render null-valued history entries as empty in UIs","Check history data before linking detail ids into workflows"],"tags":["rest-api","flowable","history","null-value"],"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"}