flowable/flowable-engine · error · FlowableObjectNotFoundException
The variable does not have a binary data stream.
Error message
The variable does not have a binary data stream.
What it means
FlowableObjectNotFoundException thrown by getVariableData when the requested variable exists but is not a binary/serializable type, so no binary data stream can be produced. Only byte-array and serializable variables have downloadable binary content via this endpoint.
Source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/ExecutionVariableDataResource.java:79
try {
byte[] result = null;
Execution execution = getExecutionFromRequestWithoutAccessCheck(executionId);
RestVariable variable = getVariableFromRequest(execution, variableName, scope, true);
if (RestResponseFactory.BYTE_ARRAY_VARIABLE_TYPE.equals(variable.getType())) {
result = (byte[]) variable.getValue();
response.setContentType("application/octet-stream");
} else if (RestResponseFactory.SERIALIZABLE_VARIABLE_TYPE.equals(variable.getType())) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutputStream outputStream = new ObjectOutputStream(buffer);
outputStream.writeObject(variable.getValue());
outputStream.close();
result = buffer.toByteArray();
response.setContentType("application/x-java-serialized-object");
} else {
throw new FlowableObjectNotFoundException("The variable does not have a binary data stream.", null);
}
return result;
} catch (IOException ioe) {
throw new FlowableException("Error getting variable " + variableName, ioe);
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Fetch the variable normally (GET .../variables/{variableName}) and read its value instead of the /data endpoint
- Check the variable's type first (via the variables listing) and only call /data for binary or serializable types
- Store the value as a byte array or serializable variable if binary retrieval is required
- Handle the 404-style FlowableObjectNotFoundException response and fall back to the regular variable endpoint
Example fix
// before GET /runtime/executions/123/variables/status/data // after GET /runtime/executions/123/variables/status
Defensive patterns
Strategy: try-catch
Validate before calling
const vars = await getExecutionVariables(id); const v = vars.find(v => v.name === variableName); const hasBinary = v && (v.type === "binary" || v.type === "serializable"); if (!hasBinary) return await getPlainVariable(id, variableName);
Type guard
function hasBinaryStream(v) { return v != null && (v.type === "binary" || v.type === "serializable"); } Try / catch
try { return await fetchVariableData(id, name); }
catch (e) { if (e.status === 404) return await fetchPlainVariable(id, name); throw e; } Prevention
- Only call the /data endpoint for binary or serializable variables
- Check variable type via the variables listing first
- Use the plain variable endpoint for primitives
When it happens
Trigger: GET /runtime/executions/{executionId}/variables/{variableName}/data where the variable's type is a plain primitive (string, integer, boolean, date, etc.) rather than a binary or serializable variable.
Common situations: Clients assuming all variables have a binary data endpoint, requesting /data for a variable stored as a JSON string, scripts that fetch all variables' data uniformly without checking variable type first.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- The variable does not have a binary data stream.
- Variable '${restVariable.getName()}' has unsupported type: '
- Invalid variable scope: '${scope}'
- The variable does not have a binary data stream.
- Unexpected exception getting variable data
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/76c2daeb7c23d285.
Report an issue: GitHub.