Wednesday, 8 October 2025

Fetch Body & Set Body

 def body = message.getBody(String)

 is used to fetch the body (payload) of a message and cast or convert it to a specific type — in this case, a String. 

 message.getBody() — fetches the body (the main content of the message). 

 message.getBody(String) — fetches the body and tries to convert it to a String, if it's not already.


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

 Flow-Specific Data: Stores data used only within the current flow or context. 

 Temporary Storage: Holds intermediate values (e.g., flags, counters) without affecting headers or body.  Internal Logic Use: Useful for conditions, expressions, or scripting during processing. 

No comments:

Post a Comment