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...
Requirement is to extract the repeated XML node with Dynamic Parent Nodes. Here, we are passing the below payload directly in Content Modifier - Message Body -------------------------------------------------------------------------------------------------------------------- <message> <header> <messageId>1</messageId> <masterMsgId>33300453700</masterMsgId> <equipment> <serialNumber>API TestSNVin</serialNumber> <make>CAT</make> <model>D100</model> <nickname>API Test Asset</nickname> </equipment> <moduleCode>API TestDeviceSN</moduleCode> <moduleTime>2022-02-16 10:45:14</moduleTime> <recei...
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...
Comments
Post a Comment