This blog post will cover the HTTP Retry process using a Groovy script and Looping process call combination. Sometimes, we get a temporary time out error on the HTTP endpoint. To tackle this, we can use this mechanism to do a http retry for a specific interval / specific number of times. Overall iFlow Design: Set Properties in Content modifier: For the Groovy script to work, we need to declare the below properties. Looping Process Call: HTTP Retry Groovy Script: If the HTTP Response code is greater than or equal to 400, the script will retry depending on the retry_interval and retry_limit properties. ------------------------------------------------------------------------------------------------------------- import com.sap.gateway.ip.core.customdev.util.Message; import java.util.HashMap; def Message processData(Message message) { def map = message.getHeaders(); def httpStatusCode = map.get("CamelHttpResponseCode") as In...
Message Header: This is transferred as part of Message Headers. If using an HTTP-based receiver adapter, these parameters are converted to HTTP headers and transferred as such to the receiver. Content Modifier helps to manipulate the Headers transmitted to the Receiver system. ----------------------------------------------------------------------------------------------------------------------------- Note: If the message header exceeds a certain value, the receiver may not be able to accept the inbound call (this applies to all HTTP-based receiver adapters). The limiting value depends on the characteristics of the receiver system, but typically ranges between 4 and 16 KB. To overcome this issue, you can use a subsequent Content Modifier step to delete all headers that are not supposed to be part of the outbound message. ----------------------------------------------------------------------------------------------------------------------------- Exchange Property: Its like a Data Co...
Requirement is to extract the repeated XML node with Static parent node. Step 1 - Here, I am passing input in the Content modifier itself. Sample Input: <Root> <Employee> <Name>Akshay</Name> <ID>1</ID> </Employee> <Employee> <Name>Sudeep</Name> <ID>2</ID> </Employee> <Employee> <Name>Advik</Name> <ID>3</ID> </Employee> <Employee> <Name>Hirva</Name> <ID>4</ID> </Employee> </Root> ----------------------------------------------------------------------------------------------------------------------------- Step 2 : Declare Property variables to hold the output. Name_Concat string-join(/Root/Employee/Name, ",") ID_Concat string-join(/Root/Employee/ID, ",") Below is the config. of the message body tab of the content modifier: -------------------------------------------------- ...
Comments
Post a Comment