Contact Us 1-800-596-4880

Transformers Configuration Reference

This page provides details on configuring the standard transformers. Note that many transports and modules provide their own transformers as well.

Transformer

A reference to a transformer defined elsewhere.

Attributes of <transformer…​>

Name Description

ref

The name of the transformer to use.

Type: string
Required: yes
Default: none

No Child Elements of <transformer…​>

Auto Transformer

A transformer that uses the transform discovery mechanism to convert the message payload. This transformer works much better when transforming custom object types rather than Java types, because there is less chance for ambiguity.

Attributes of <auto-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <auto-transformer…​>

Custom Transformer

A user-implemented transformer.

Attributes of <custom-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

class

An implementation of the Transformer interface.

Type: class name
Required: yes
Default: none

Child Elements of <custom-transformer…​>

Name Cardinality Description

spring:property

0..*

Spring-style property element for custom configuration.

Message Properties Transformer

A transformer that can add, delete or rename message properties.

Attributes of <message-properties-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

overwrite

If false, a property is not added if the message already contains a property with that name.

Type: boolean
Required: no
Default: true

scope

Property scope to/from which properties are added/removed. The scope determines the lifespan of the properties. Default scope is outbound.

Type: enumeration
Required: no
Default: outbound

Child Elements of <message-properties-transformer…​>

Name Cardinality Description

delete-message-property

0..*

Delete message properties matching a regular expression or wildcard.

add-message-property

0..*

Add a message property.

rename-message-property

0..*

Rename a message property.

add-message-properties

0..1

Add a set of message properties.

Base64 Encoder Transformer

A transformer that base64 encodes a string or byte array message.

Attributes of <base64-encoder-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <base64-encoder-transformer…​>

Base64 Decoder Transformer

A transformer that base64 decodes a message to give an array of bytes.

Attributes of <base64-decoder-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <base64-decoder-transformer…​>

XML Entity Decoder Transformer

A transformer that decodes a string containing XML entities.

Attributes of <xml-entity-decoder-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <xml-entity-decoder-transformer…​>

Gzip Compress Transformer

A transformer that compresses a byte array using gzip.

Attributes of <gzip-compress-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <gzip-compress-transformer…​>

Gzip Uncompress Transformer

A transformer that uncompresses a byte array using gzip.

Attributes of <gzip-uncompress-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <gzip-uncompress-transformer…​>

Byte Array to Hex String Transformer

A transformer that converts a byte array to a string of hexadecimal digits.

Attributes of <byte-array-to-hex-string-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <byte-array-to-hex-string-transformer…​>

Hex String to Byte Array Transformer

A transformer that converts a string of hexadecimal digits to a byte array.

Attributes of <hex-string-to-byte-array-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <hex-string-to-byte-array-transformer…​>

Byte Array to Object Transformer

A transformer that converts a byte array to an object (either deserializing or converting to a string).

Attributes of <byte-array-to-object-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <byte-array-to-object-transformer…​>

Object to Byte Array Transformer

A transformer that serializes all objects except strings (which are converted using getBytes()).

Attributes of <object-to-byte-array-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <object-to-byte-array-transformer…​>

Object to String Transformer

A transformer that gives a human-readable description of various types (useful for debugging).

Attributes of <object-to-string-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <object-to-string-transformer…​>

Byte Array to Serializable Transformer

A transformer that converts a byte array to an object (deserializing the object).

Attributes of <byte-array-to-serializable-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <byte-array-to-serializable-transformer…​>

Serializable to Byte Array Transformer

A transformer that converts an object to a byte array (serializing the object).

Attributes of <serializable-to-byte-array-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <serializable-to-byte-array-transformer…​>

Byte Array to String Transformer

A transformer that converts a byte array to a string.

Attributes of <byte-array-to-string-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <byte-array-to-string-transformer…​>

String to Byte Array Transformer

A transformer that converts a string to a byte array.

Attributes of <string-to-byte-array-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

No Child Elements of <string-to-byte-array-transformer…​>

Append String Transformer

A transformer that appends a string to a string payload.

Attributes of <append-string-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

message

The string to append.

Type: string
Required: yes
Default: none

No Child Elements of <append-string-transformer…​>

Encrypt Transformer

A transformer that encrypts a message.

Attributes of <encrypt-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

strategy-ref

The name of the encryption strategy to use. This should be configured using the password-encryption-strategy element, inside a security-manager element at the top level.

Type: string
Required: no
Default: none

No Child Elements of <encrypt-transformer…​>

Decrypt Transformer

A transformer that decrypts a message.

Attributes of <decrypt-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

Type: boolean
Required: no
Default: none

encoding

String encoding used for transformer output.

Type: string
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

strategy-ref

The name of the encryption strategy to use. This should be configured using the password-encryption-strategy element, inside a security-manager element at the top level.

Type: string
Required: no
Default: none

No Child Elements of <decrypt-transformer…​>

Expression Transformer

A transformer that evaluates one or more expressions on the current message. Each expression equates to a parameter in the return message. The return message for two or more expressions is an Object[].

Attributes of <expression-transformer…​>

Name Description

name

Identifies the transformer so that other elements can reference it. Required if the transformer is defined at the global level.

Type: name (no spaces)
Required: no
Default: none

returnClass

The class of the message generated by the transformer. This is used if transformers are auto-selected and to validate that the transformer returns the correct type. Note that if you need to specify an array type you need postfix the class name with '[]'. For example, if you want return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

Type: string
Required: no
Default: none

ignoreBadInput

Many transformers only accept certain classes. Such transformers are never called with inappropriate input (whatever the value of this attribute). If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. If true, the next transformer is called. If false the chain ends, keeping the result generated up to that point.

encoding

String encoding used for transformer output.

Type: boolean
Required: no
Default: none

mimeType

The MIME type, for example, text/plain or application/json.

Type: string
Required: no
Default: none

returnSourceIfNull

If all expressions return null on this transformer, this flag will cause the source payload to be returned without modification.

Type: boolean
Required: no
Default: none

evaluator

The expression evaluator to use. Expression evaluators must be registered with the ExpressionEvaluatorManager before they can be used. Using the custom evaluator allows you to define your own evaluator with the 'custom-evaluator' attribute. Note that some evaluators such as xpath, groovy, and bean are loaded from other Mule modules (XML and Scripting, respectively). These modules must be on your classpath before the evaluator can be used.

Type: standardExpressionEvaluators
Required: no
Default: none

expression

The expression to evaluate. The syntax of this attribute changes depending on the evaluator being used.

Type: string
Required: no
Default: none

custom-evaluator

The name of the custom evaluator to use. This attribute is only used when the 'evaluator' attribute is set to "custom". You can plug in your own expression evaluators by registering them with the ExpressionEvaluatorManager.

Type: name (no spaces)
Required: no
Default: none

Child Elements of <expression-transformer…​>

Name Cardinality Description

return-argument

0..1

If all expressions return null or NullPayload on this transformer, this flag will cause the source payload to be returned without modification.