Search
Calendar
May 2025
S M T W T F S
« Apr    
 123
45678910
11121314151617
18192021222324
25262728293031
Archives

PostHeaderIcon How to access global variables in Mule 3?

Case

In Mule 2.2.1, getting the global variables was allowed. Therefore, such a block worked:

 <add-message-property key="jonathanProperty"
 value="#1" />

In Mule 3, this is no more possible. Therefore, how to access -former- global variables within a Mule 3 config file?

Fix

Access the global variables owing to their scope, such as Invocation, Inbound, Outbound, Session, thanks to the methods MuleMessage.get<Scope>Property(), eg:

<add-message-property key="jonathanProperty"
 value="#1" />

Leave a Reply