Wednesday, 8 October 2025

Fetch Property & Set Property

 def myProperty = message.getProperty("MyProperty")

 It retrieves a custom property (often set earlier in a flow or message processing pipeline) with the name "MyProperty" from the message object. 

 It accesses a property attached to the message. 

 Properties can be metadata like headers, variables, or values set during previous steps in a flow.
 These are not part of the body (i.e., the payload or content) of the message.


message.setProperty("NewProperty", "PropertyValue")

 Stores flow-level variables used during message processing. 

 Helps with internal logic like decision-making or transformations. 

 Does not affect headers or body, keeping the payload and metadata clean. 

No comments:

Post a Comment