<set-payload
value=""
doc:name="Set payload"
doc:id="vnjpqo" />
Set Payload (<set-payload/>)
Sets or updates the payload of the message.
The payload can be a literal string or a DataWeave expression. Use the set-payload
component only for simple expressions or transformations.
For complex scenarios, use the Transform Message Component.
Component XML
This component supports the following XML structure:
Set Payload (<set-payload/>
) attributes are configurable through the UI and XML.
Attribute Name | Attribute XML | Description |
---|---|---|
Set payload (default) |
|
Editable name for the component to display in the canvas. |
N/A |
|
Automatically generated identifier for the component. |
Value |
|
A literal string or DataWeave expression that defines how to set the payload, for example, |
N/A |
|
A |
Encoding |
|
Encoding of the payload that this component outputs. |
Mime type |
|
MIME type of the payload that this component outputs. For more information, see Using Reader and Writer Properties. |
Parameters |
N/A |
Appends a key-value pair for a reader property to the value of the |
The |
Examples
The following examples show how to set the payload using a static value or a DataWeave expression.