flowable/flowable-engine · warning · 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 getVariableDataByteArray when a variable's value is neither a byte array nor a serializable object, so there is no binary data stream to return. The REST variable-data endpoint can only stream content for 'binary' and 'serializable' variable types.
Source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseExecutionVariableResource.java:93
try {
byte[] result = null;
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())) {
try (ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutputStream outputStream = new ObjectOutputStream(buffer)) {
outputStream.writeObject(variable.getValue());
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);
}
}
protected RestVariable setBinaryVariable(MultipartHttpServletRequest request, Execution execution, boolean isNew, boolean async) {
// Validate input and set defaults
if (request.getFileMap().size() == 0) {
throw new FlowableIllegalArgumentException("No file content was found in request body.");
}
// Get first file in the map, ignore possible other files
MultipartFile file = request.getFile(request.getFileMap().keySet().iterator().next());
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Check the variable's type first and only request /data for 'binary' or 'serializable' variables
- Fetch the variable's value via the normal variable endpoint instead of the data endpoint
- Catch FlowableObjectNotFoundException and return 404/400 explaining no binary content exists
Example fix
// before
byte[] data = getVariableData(anyVariable); // throws for strings
// after
if ("binary".equals(var.getType()) || "serializable".equals(var.getType())) {
byte[] data = getVariableData(var);
} else {
Object value = var.getValue(); // use plain value
} Defensive patterns
Strategy: type-guard
Validate before calling
RestVariable meta = getVariableMetadata(name);
if (!"binary".equals(meta.getType()) && !"serializable".equals(meta.getType())) {
// fetch plain value via variable endpoint instead
} Type guard
boolean hasDownloadableData(RestVariable v) {
return "binary".equals(v.getType()) || "serializable".equals(v.getType());
} Try / catch
try {
byte[] data = client.getVariableData(id);
} catch (NotFoundException e) {
data = null; // no binary stream for this type
} Prevention
- Only call the /data sub-resource for binary or serializable variables
- Inspect variable type from the variable representation first
- Handle 404 as 'no content' rather than an exceptional state
When it happens
Trigger: Requesting the data/content of a variable whose type is string, integer, date, etc. (any non-binary type) via the variable data resource.
Common situations: Client assumes every variable has downloadable content; requesting /data on a plain string variable; frontend generic variable-download code that ignores the variable type.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- The variable does not have a binary data stream.
- The variable does not have a binary data stream.
- Only string variable values are supported using like, but wa
- Unsupported variable query operation:
- Variable operation is missing for variable:
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/91ff7327bffac0e2.
Report an issue: GitHub.