flowable/flowable-engine · error · FlowableException
Cannot change fixed value with
Error message
Cannot change fixed value with
What it means
FixedValue is a read-only EL value expression wrapper (e.g. used for a literal in a variable mapping). Its setValue() is intentionally unimplemented: assigning to a fixed value is not a supported operation, so it always throws this FlowableException naming the VariableContainer that attempted the write.
Source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/el/FixedValue.java:41
* @author Frederik Heremans
*/
public class FixedValue implements Expression {
private static final long serialVersionUID = 1L;
private Object value;
public FixedValue(Object value) {
this.value = value;
}
@Override
public Object getValue(VariableContainer variableContainer) {
return value;
}
@Override
public void setValue(Object value, VariableContainer variableContainer) {
throw new FlowableException("Cannot change fixed value with " + variableContainer);
}
@Override
public String getExpressionText() {
return value.toString();
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Use a writable expression (a variable reference like ${myVar}) instead of a literal FixedValue where assignment happens
- Guard writes: only call setValue on expressions that are actually variable references
- Fix the BPMN XML so the literal appears only on the source/read side of a mapping
- If you own the code, remove the setValue call or wrap FixedValue in a read-only check via isReadOnly() before writing
Example fix
// before
expression.setValue(newValue, variableContainer); // throws
// after
if (!expression.isReadOnly(variableContainer)) {
expression.setValue(newValue, variableContainer);
} Defensive patterns
Strategy: type-guard
Validate before calling
// before writing through an expression
if (expression instanceof FixedValue) {
throw new IllegalArgumentException("Cannot assign to a fixed/literal expression");
}
// or check writability first
boolean writable = !expression.isReadOnly(variableContainer); Type guard
boolean isWritable = (expr instanceof FixedValue) == false;
if (!isWritable) { /* skip write or fail fast */ } Try / catch
try {
expression.setValue(newValue, variableContainer);
} catch (FlowableException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Cannot change fixed value")) {
logger.warn("Attempted write to a fixed value expression; ignoring");
} else {
throw e;
}
} Prevention
- Never put literal expressions (${'...'} or constants) in writable/out-mapping slots in BPMN XML
- Check isReadOnly before calling setValue on any ValueExpression
- Use variable references for anything the engine needs to write back
When it happens
Trigger: Expression language or Flowable's variable-scope code attempts to write through a ValueExpression backed by FixedValue, e.g. ${'literal'} used as a writable expression in an activity field, task variable mapping, or delegate code calling setValue() on it.
Common situations: Misconfigured process XML where a literal expression is placed in a destination/writable slot (task assignee write-back, out-mapping); delegate code unconditionally calling expression.setValue(...) without checking writability; copy-pasted setValue boilerplate on a constant.
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
- error.value.set.rvalue
- Cannot write property: ${property}
- Setting variable is not supported for read only delegate exe
- Setting transient variable is not supported for read only de
- Setting localized name is not supported for read only delega
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5515afef31a90d75.
Report an issue: GitHub.