setProperty

Version

Syntax

setProperty:
'$ref': <string>
failOnError: <boolean>
ifAbsent: <boolean>
language: groovy
name: <string>
value: <string>
xmlConfig: {}
setProperty:
  '$ref': <string>
  failOnError: <boolean>
  ifAbsent: <boolean>
  language: groovy
  name: <string>
  value: <string>
  xmlConfig: {}

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
failOnErrorfalsetrueWhen true, aborts processing if expression evaluation fails. When false, logs the error and continues unchanged.false
ifAbsentfalsefalseWhen true, only sets the field if it is not already present in the message.true
languagefalseSpELScripting language used to evaluate the value expression.SpEL | groovy | jsonpath | xpath
namefalse-Name of the header field or exchange property key to set.X-Powered-By
valuefalse-Value to assign, evaluated as a SpEL template expression by default. Use the language attribute to switch to Groovy, JsonPath, or XPath.${method}

Child Structure

ElementCardinalityDescription
xmlConfig0..1XML namespace declarations for XPath expressions in the value.

Can be used in