flowable/flowable-engine · error · UnsupportedOperationException

Not supported to get execution id

Error message

Not supported to get execution id

What it means

BatchDeleteProcessConfig creates a read-only, JSON-backed VariableScope implementation used only as a template for process-instance batch deletion. Most VariableScope accessors are deliberately stubbed with UnsupportedOperationException because they have no meaning during batch delete. Calling getExecutionId() therefore always throws; the library never intends this value to be read in the batch-delete path.

Solutions

  1. Stop calling getExecutionId() on the batch-delete scope; obtain the execution id from the process instance data or the batch part data instead
  2. If execution context is needed, run the logic against a real ExecutionEntity fetched from RuntimeService before the batch is created
  3. Wrap access in try-catch for UnsupportedOperationException only when probing capability of an unknown scope
  4. Subclass/override the scope if you truly need an execution id in a custom delete flow

Example fix

// before
String execId = batchScope.getExecutionId(); // throws
// after
ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(piId).singleResult();
String execId = pi.getId();
Defensive patterns

Strategy: try-catch

Validate before calling

// scope from batch-delete config is read-only; detect it before reading identity fields
boolean safeToRead = !(scope instanceof org.flowable.engine.impl.delete.BatchDeleteProcessConfig.DeleteVariableScope);
// or: never read execution/scope fields on scopes obtained from batch delete configurations

Type guard

boolean isLiveExecutionScope(VariableScope s) {
    return s instanceof DelegateExecution || s instanceof ExecutionEntity;
}

Try / catch

try {
    String execId = scope.getExecutionId();
} catch (UnsupportedOperationException e) {
    // read-only template scope: resolve id from process-instance/batch data instead
}

Prevention

When it happens

Trigger: Any code holding the BatchDeleteProcessConfig template scope and calling getExecutionId() on it — e.g. custom FlowableEventListener, custom batch part handler, or delegated code (expression/bean invoked during delete) that reads the execution id from the scope.

Common situations: Custom batch-delete extensions or listeners that assume the scope is a live execution; copying code that works on a normal DelegateExecution and reusing it against the batch-delete config; Flowable upgrades where a new internal code path starts querying the scope id fields.

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

Appendix: source

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

        protected final JsonNode node;

        public VariableValueJsonNodeValueFields(JsonNode node) {
            this.node = node;
        }

        @Override
        public String getName() {
            return node.path("name").stringValue();
        }

        @Override
        public String getProcessInstanceId() {
            throw new UnsupportedOperationException("Not supported to get process instance id");
        }

        @Override
        public String getExecutionId() {
            throw new UnsupportedOperationException("Not supported to get execution id");
        }

        @Override
        public String getScopeId() {
            throw new UnsupportedOperationException("Not supported to get scope id");
        }

        @Override
        public String getSubScopeId() {
            throw new UnsupportedOperationException("Not supported to get sub scope id");
        }

        @Override
        public String getScopeType() {
            throw new UnsupportedOperationException("Not supported to scope type");
        }

        @Override

View on GitHub (pinned to d6d39ce1c6)