flowable/flowable-engine · error · UnsupportedOperationException

Not supported to set get cached value

Error message

Not supported to set get cached value

What it means

The inner entity of BatchDeleteProcessConfig implements getCachedValue() by throwing UnsupportedOperationException with the message 'Not supported to set get cached value'. This configuration object is not cached in the entity cache, so reading the cached value is unsupported by design. Any call to getCachedValue on this instance throws.

Solutions

  1. Do not call getCachedValue on the batch-delete configuration entity.
  2. Exclude non-cacheable entities from cache operations by checking their type first.
  3. Use a real persistent variable entity (e.g. VariableInstanceEntity) if cached value semantics are required.

Example fix

// before
Object cached = entity.getCachedValue();
// after
Object cached = (entity instanceof VariableInstanceEntity)
    ? ((VariableInstanceEntity) entity).getCachedValue()
    : null;
Defensive patterns

Strategy: validation

Validate before calling

Object cached = (entity instanceof VariableInstanceEntity)
    ? ((VariableInstanceEntity) entity).getCachedValue()
    : null;

Type guard

boolean cacheable = (entity instanceof VariableInstanceEntity);

Prevention

When it happens

Trigger: Calling getCachedValue() on the inner variable/entity instance in BatchDeleteProcessConfig (BatchDeleteProcessConfig.java:560), typically via cache-machinery that reads the cached object of every entity, or generic value-copying code.

Common situations: Entity cache flushing/lookup paths processing the batch-delete config as if it were a cached variable entity; serialization or diff utilities that read cached values from all entities.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/868be6d3fb4091cf. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java:560

        @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)