flowable/flowable-engine · error · UnsupportedOperationException

Not supported to set double value

Error message

Not supported to set double value

What it means

setDoubleValue(Double) on BatchDeleteProcessConfig's template VariableScope is an intentional unsupported stub; the scope exists solely to serialize variable snapshots for batch deletion and rejects all mutations.

Solutions

  1. Write double variables via runtimeService.setVariable on live instances prior to deletion
  2. Use only the JSON-backed getters on this scope
  3. Catch UnsupportedOperationException when defensively writing to unknown scopes
  4. Implement a custom writable VariableScope if the flow requires mutation

Example fix

// before
batchScope.setDoubleValue(1.5); // throws
// after
runtimeService.setVariable(processInstanceId, "ratio", 1.5);
Defensive patterns

Strategy: try-catch

Validate before calling

if (scope instanceof org.flowable.engine.impl.delete.BatchDeleteProcessConfig.DeleteVariableScope) {
    // unsupported setter; route writes to runtimeService
}

Try / catch

try {
    scope.setDoubleValue(v);
} catch (UnsupportedOperationException e) {
    runtimeService.setVariable(processInstanceId, varName, v);
}

Prevention

When it happens

Trigger: Calling setDoubleValue on the template scope, e.g. from shared numeric-variable update logic run against the delete config.

Common situations: Variable normalization/cleanup routines applied during mass deletion; code paths shared with runtime variable updates; misuse of the delete template as a general scope.

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/ee294989dd81dde9. Report an issue: GitHub.

Appendix: source

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

        }

        @Override
        public void setLongValue(Long longValue) {
            throw new UnsupportedOperationException("Not supported to set long value");
        }

        @Override
        public Double getDoubleValue() {
            JsonNode doubleNode = node.path("doubleValue");
            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

View on GitHub (pinned to d6d39ce1c6)