flowable/flowable-engine · warning · UnsupportedOperationException
Not supported to get process instance id
Error message
Not supported to get process instance id
What it means
This is an UnsupportedOperationException from an anonymous VariableInstance implementation inside BatchDeleteProcessConfig that is backed only by a JSON node used to extract variable values for query population. Process-instance/execution identity is meaningless for this adapter, so the getters explicitly reject calls rather than returning misleading nulls.
Solutions
- Do not call getProcessInstanceId/getExecutionId on the JSON-backed variable adapter; only getName() and getValue() are supported
- Use the real VariableInstance entity from the runtime/variable service when you need execution context
- Construct a full variable instance implementation if your integration needs execution ids
Example fix
// before String pid = jsonBackedVariableInstance.getProcessInstanceId(); // throws // after String pid = realVariableInstanceEntity.getProcessInstanceId();
Defensive patterns
Strategy: type-guard
Validate before calling
if (vi instanceof JsonBackedVariableInstance) {
throw new IllegalStateException("Adapter has no execution context; use the real VariableInstance");
} Type guard
boolean hasExecutionContext(VariableInstance vi) {
return !(isJsonBackedAdapter(vi));
} Try / catch
try {
pid = vi.getProcessInstanceId();
} catch (UnsupportedOperationException e) {
pid = null; // JSON-backed adapter carries no execution identity
} Prevention
- Only read name/value from the JSON-backed adapter
- Obtain execution identity from the actual VariableInstance entity via the variable service
- Do not reuse internal BatchDeleteProcessConfig adapters in custom code
When it happens
Trigger: Calling getProcessInstanceId() (or getExecutionId()) on the variable-instance adapter produced while deserializing batch-query variable values — only possible if internal code or custom code paths treat the JSON-backed adapter as a real runtime VariableInstance.
Common situations: Custom extensions or copy-pasted internals reusing BatchDeleteProcessConfig's JSON variable adapter for purposes beyond query population; engine version upgrades exposing the adapter through new call paths.
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
- Empty object, no variables can be set
- No execution active, no variables can be created
- No execution active, no variables can be created
- No execution active, no variables can be removed
- No execution active, no variables can be set
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d7304d149f4202ec.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/delete/BatchDeleteProcessConfig.java:472
return resultNode.toString();
}
protected static class VariableValueJsonNodeValueFields implements ValueFields {
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");
}
@OverrideView on GitHub (pinned to d6d39ce1c6)