{"record":{"id":"55ebb9a763fc7716","repo":"flowable/flowable-engine","slug":"error-value-set-rvalue","errorCode":"error.value.set.rvalue","errorMessage":"error.value.set.rvalue","messagePattern":"error\\.value\\.set\\.rvalue","errorType":"exception","errorClass":"ELException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/ObjectValueExpression.java","lineNumber":119,"sourceCode":"\t@Override\n\tpublic Class<?> getType(ELContext context) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Answer <code>true</code>.\n\t */\n\t@Override\n\tpublic boolean isReadOnly(ELContext context) {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Throw an exception.\n\t */\n\t@Override\n\tpublic void setValue(ELContext context, Object value) {\n\t\tthrow new ELException(LocalMessages.get(\"error.value.set.rvalue\", \"<object value expression>\"));\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn \"ValueExpression(\" + object + \")\";\n\t}\n\n\t@Override\n\tpublic Class<?> getExpectedType() {\n\t\treturn type;\n\t}\n}\n","sourceCodeStart":101,"sourceCodeEnd":132,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/ObjectValueExpression.java#L101-L132","documentation":"ObjectValueExpression wraps a resolved object, so it is read-only: calling setValue on it always throws an ELException ('error.value.set.rvalue') because an object value expression is a right-value and cannot be assigned through EL.","triggerScenarios":"Calling setValue(context, value) on an ObjectValueExpression instance, typically via a framework that writes through ValueExpressions (e.g. UI component value binding).","commonSituations":"Using a wrapped-object expression where a writable l-value expression is expected; misconfigured component binding that should target a property of a bean instead of the wrapped object itself.","solutions":["Do not call setValue on an ObjectValueExpression; obtain values via getValue(context) only.","If assignment is needed, create a TreeValueExpression targeting a writable property (e.g. '#{bean.property}') instead of wrapping the object.","Review the integration code and route writes to the underlying object/bean directly rather than through EL."],"exampleFix":"// before\nobjectValueExpression.setValue(elContext, newValue); // throws\n// after\nTreeValueExpression expr = new TreeValueExpression(treeStore, context, functions, variables, \"#{bean.property}\", Object.class);\nexpr.setValue(elContext, newValue);","handlingStrategy":"try-catch","validationCode":"if (expr instanceof ObjectValueExpression) {\n    // read-only: do not call setValue\n}","typeGuard":"boolean isWritable(ValueExpression e) { return !(e instanceof ObjectValueExpression); }","tryCatchPattern":"try {\n    expr.setValue(elContext, value);\n} catch (ELException e) {\n    // object value expressions are read-only; write via the bean or a TreeValueExpression instead\n}","preventionTips":["Treat ObjectValueExpression as strictly read-only (getValue only).","Use TreeValueExpression on a writable property for assignments.","In UI/framework bindings, point writes at bean properties, not wrapped objects."],"tags":["el","read-only","immutable","flowable"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}