flowable/flowable-engine · error · UnsupportedOperationException
Not supported to set bytes
Error message
Not supported to set bytes
What it means
BatchDeleteProcessConfig contains an inner entity class whose setBytes(byte[]) is deliberately implemented to throw UnsupportedOperationException. This configuration object never carries binary variable data, so mutating bytes on it is unsupported by design. Calling any bytes mutation on this entity always throws.
Solutions
- Do not call setBytes on the batch-delete configuration entity; it is unsupported by design.
- Check the entity type before calling setBytes (only real variable entities support byte persistence).
- If binary data must be carried, use a persistent variable entity (e.g. VariableInstanceEntity) instead of this config object.
Example fix
// before
entity.setBytes(newBytes);
// after
if (entity instanceof VariableInstanceEntity) {
((VariableInstanceEntity) entity).setBytes(newBytes);
} Defensive patterns
Strategy: validation
Validate before calling
if (entity instanceof VariableInstanceEntity) {
entity.setBytes(bytes);
} else {
throw new IllegalStateException("setBytes not supported on " + entity.getClass());
} Type guard
boolean supportsBytes = (entity instanceof VariableInstanceEntity);
Prevention
- Treat BatchDeleteProcessConfig's inner entity as a read-only configuration holder.
- Only mutate bytes on persistent variable entities obtained from variable services.
When it happens
Trigger: Calling setBytes(...) on the inner variable/entity instance created inside BatchDeleteProcessConfig (BatchDeleteProcessConfig.java:555), e.g. via generic entity serialization or variable persistence code that iterates all Entity properties.
Common situations: Generic persistence/bulk-update frameworks reflectively calling setBytes on all variable entities; code written against a different entity type being reused with the batch-delete configuration; copy/merge utilities that blanket-copy field values.
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
- Not supported to get bytes
- Not supported to get execution id
- Not supported to get scope id
- Not supported to get sub scope id
- Not supported to get task id
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d182645ca4a0125e.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java:555
if (doubleNode.isNumber()) {
return doubleNode.doubleValue();
}
return null;
}
@Override
public void setDoubleValue(Double doubleValue) {
throw new UnsupportedOperationException("Not supported to set double value");
}
@Override
public byte[] getBytes() {
throw new UnsupportedOperationException("Not supported to get bytes");
}
@Override
public void setBytes(byte[] bytes) {
throw new UnsupportedOperationException("Not supported to set bytes");
}
@Override
public Object getCachedValue() {
throw new UnsupportedOperationException("Not supported to set get cached value");
}
@Override
public void setCachedValue(Object cachedValue) {
throw new UnsupportedOperationException("Not supported to set cached value");
}
}
}
View on GitHub (pinned to d6d39ce1c6)