flowable/flowable-engine · error · ELException

error.value.set.rvalue

Error message

error.value.set.rvalue

What it means

AstText represents literal text in an EL expression. It is always read-only (isReadOnly returns true) and setValue always throws ELException because literal text is not an assignable value. The message reuses the rvalue key since text nodes are structurally rvalues.

Solutions

  1. Wrap the expression in ${...} so it parses as an assignable expression: '${myVar}' instead of 'myVar'.
  2. Set variables through the engine API (delegateExecution.setVariable) rather than via EL setValue.
  3. Check ValueExpression.isReadOnly() before calling setValue.

Example fix

// before
factory.createValueExpression("myVar", Object.class).setValue(ctx, 5); // literal text -> ELException
// after
factory.createValueExpression("${myVar}", Object.class).setValue(ctx, 5);
Defensive patterns

Strategy: type-guard

Validate before calling

if (!expr.contains("${") && !expr.contains("#{")) { throw new IllegalArgumentException("Literal text is not settable: " + expr); }

Type guard

boolean isElExpression(String s) { return s != null && (s.contains("${") || s.contains("#{")); }

Try / catch

try { ve.setValue(ctx, value); } catch (ELException e) { log.warn("Attempted to set literal text expression"); }

Prevention

When it happens

Trigger: Calling setValue on a ValueExpression parsed from a literal string (no ${} or #{} delimiters), e.g. ValueExpression for 'hello world'.setValue(...), or flowable:expression attributes containing plain text used as an assignment target.

Common situations: Forgetting the ${...} wrapper so the whole string is treated as literal text; attempting to assign into a static text field in a BPMN form or expression attribute.

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

Appendix: source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/ast/AstText.java:59

	
	@Override
	public boolean isMethodInvocation() {
		return false;
	}

	@Override
	public Class<?> getType(Bindings bindings, ELContext context) {
		return null;
	}

	@Override
	public boolean isReadOnly(Bindings bindings, ELContext context) {
		return true;
	}

	@Override
	public void setValue(Bindings bindings, ELContext context, Object value) {
		throw new ELException(LocalMessages.get("error.value.set.rvalue", getStructuralId(bindings)));
	}

	@Override
	public ValueReference getValueReference(Bindings bindings, ELContext context) {
		return null;
	}
	
	@Override 
	public Object eval(Bindings bindings, ELContext context) {
		return value;
	}

	@Override
	public MethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes) {
		return null;
	}

	@Override

View on GitHub (pinned to d6d39ce1c6)