STUDIO Visual Editor
Field | Value | Description | XML |
---|---|---|---|
Display Name |
Variable |
Customize to display a unique name for the transformer in your application. |
|
Operation |
Set Variable |
Select to set a new variable on your message (as shown in example screenshot above). |
|
Remove Variable |
Select to delete an existing variable from your message. |
|
|
Name |
String or Mule Expression |
Specify the name for the variable that you are creating or identify the name of the variable that you are removing. If you are removing variables, this field accepts a wildcard "*" character. |
|
Value |
String or Mule Expression |
This field displays only if you are setting a new variable. Specify the value using either a string or a Mule expression. |
|
XML Editor or Standalone
#Set Variable
<set-variable variableName="MyNewVariableName" value="MyNewVariableValue" doc:name="Variable"/>
#Remove Variable
<remove-variable variableName="NameofVariabletoRemove" doc:name="Variable"/>
Element | Description |
---|---|
set-variable |
Set a new variable on your message (as shown in example above). |
remove-variable |
Delete an existing variable from your message. |
Element Attribute | Description |
---|---|
doc:name |
Customize to display a unique name for the transformer in your application. Note: Attribute not required in Mule Standalone configuration. |
variableName |
The name of the variable that you are setting or removing. Can be a string or a Mule expression. Note: If you are using the remove-variable element, you may use a wildcard "" character. For example, a remove-variable transformer with a variable name "http." removes all variables with a name that begins with "http." from the message. |
value |
The value of the variable that you are setting. This attribute is only relevant for the set-variable element. Can be a string or a Mule expression. |