Expressions

Overview

Many processors can be configured to look up values using the Spring Expression Language (SpEL). Expression support is typically enabled for processor properties that need to be resolved dynamically at runtime by selecting values from the current message or other values available in the message processing context. Any property that expects an expression will always be explicitly documented to that effect.

Expression Context

The expression will be executed in a context where data is available through some top level properties. They are usually executed in the standard expression context as documented below. Sometimes they are executed in an expanded context where additional properties are available. In those cases, the processor documentation will contain more details about the extended context.

Standard Expression Context

Most processor property expressions are executed in a standard context containing the following properties:

Path Type Description

envelope.payload

Any

The payload of the message. Typically, a JSON compliant map whose values can be accessed using dot notation for map entries (e.g., envelope.payload.myEntry.mySubEntry) and indexing for lists (e.g., envelope.payload.myList[0]).

envelope.messageId

String

The unique identifier of the message exchange. Generated by the server.

envelope.originalMessageId

String

The original identifier of the message exchange from when it was initially created. This might differ from the current ID if the message has passed through a processor that generates new exchanges, such as the split processor.

envelope.stash

Map<String, Any>

The message exchange stash.

envelope.flowId

String

The ID of the flow the message is currently being processed in.

envelope.ownerId

String

The ID of the organization that owns the flow.

exchangePropertiesMap

Map<String, String>

A map of the message’s exchange properties.

Troubleshooting

If you need to hardcode a string value for your expression, just surround the string with single quotes. For example: 'my hardcoded string'. This creates a string constant expression.