Tuesday 12 March 2024

How many types of targets can be created in transform message? in MuleSoft?108

  How many types of targets can be created in transform message? in MuleSoft

In MuleSoft 4's Transform Message component, you can create two main types of targets to manipulate the message structure:

  1. Payload: This is the default target. Any transformation applied within the Transform component directly modifies the message payload unless explicitly specified otherwise.

  2. Custom Targets: You can define additional targets to transform and store specific parts of the message data. These custom targets can be:

  • Variables: Create new variables to store transformed data using the target attribute within the DataWeave script.

  • Attributes: Modify existing message attributes using the set-attribute element within the Transform component configuration.

Here's a summary:

Target Type


Payload (Default)

Modifications directly affect the message's content.


Create new variables to store transformed data.


Modify existing message attributes.

Additional Points:

  • You can have multiple custom targets within a single Transform component, each targeting a specific variable or attribute.

  • DataWeave expressions within the script determine how the data is transformed and assigned to the desired target (payload, variable, or attribute).

Here are some helpful resources for further understanding:

No comments:

Post a Comment

Note: only a member of this blog may post a comment.