flowable/flowable-engine · warning · FlowableObjectNotFoundException
Historic detail '" + detailId + "' does not have a variable…
Error message
Historic detail '" + detailId + "' does not have a variable value.
What it means
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.
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
Example fix
// before runtimeService.setVariable(executionId, " approver", null) // after runtimeService.removeVariable(executionId, "approver") // or use a non-null sentinel
Defensive patterns
Strategy: fallback
Validate before calling
const detail = await getHistoricDetail(detailId);
if (detail.value == null || detail.value === undefined) {
console.warn(`Detail ${detailId} has null variable value`);
} Type guard
function hasValue(detail) { return detail != null && detail.value !== null && detail.value !== undefined; } Try / catch
try { return await getVariable(detailId); } catch (e) { if (e.status === 404) return { value: null, detailId }; throw e; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Could not find a case instance with id
- Could not find a process instance with id '" +…
- Could not find a task instance with id '" + taskId + "'.
- Historic process instance '" + processInstanceId + "' could…
- Historic task instance '' variable value for couldn't be…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c025f221144bca16.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/history/HistoricDetailDataResource.java:104
throw new FlowableException("Unexpected exception getting variable data", ioe);
}
}
public RestVariable getVariableFromRequest(boolean includeBinary, String detailId) {
Object value = null;
HistoricVariableUpdate variableUpdate = null;
HistoricDetail detailObject = historyService.createHistoricDetailQuery().id(detailId).singleResult();
if (detailObject instanceof HistoricVariableUpdate) {
variableUpdate = (HistoricVariableUpdate) detailObject;
value = variableUpdate.getValue();
}
if (restApiInterceptor != null) {
restApiInterceptor.accessHistoryDetailById(detailObject);
}
if (value == null) {
throw new FlowableObjectNotFoundException("Historic detail '" + detailId + "' does not have a variable value.", VariableInstanceEntity.class);
} else {
return restResponseFactory.createRestVariable(variableUpdate.getVariableName(), value, null, detailId, RestResponseFactory.VARIABLE_HISTORY_DETAIL, includeBinary);
}
}
}
View on GitHub (pinned to d6d39ce1c6)