EDUCAÇÃO E TECNOLOGIA

SAP Integration Suite- Deep dive into Content Modifier

Content Modifier is very essential and useful step of Cloud Integration which every developers has already tried.In below blog I will try to cover some of the uses cases which is very helpfull for beginners to understand how we can leverage this usefull step.

As most of you already aware of the fact that Cloud Integration leverages Apache Camel then what concept does Content Modifier represents,lets try to understand some basic characterstics of Content Modifier.

Camel Exchange:

Camel Exchange represents an abstraction for an exchange of messages which involves a input message and its corresponding output or an exception message.

Exchange ID: A unique ID that identifies the exchange.

MEP( Message Exchange Pattern ): Represents pattern of the exchange.

  • InOnly when a route handles a one-way message, where the sender doesn’t wait for a reply from the receiver.
    This represents asynchronous message handling where sender doesnt expect Response.
  • InOut is when a route handles a request-response message. The sender expects a reply from the route, which will be stored as an out-message in the exchange.
    This represents synchronous message handling where sender expect Response ( part of out-message ).

Exception: If an error occurs during message processing, the reason for the error is stored in the Exception field of the exchange.

Properties: A form of temporary storage where process steps can store data.Data stored in property in exist till exchange Exist.

Attachment: Attachment to In-Message or Out-Message which is optional

Content Modifier:

As shown in the above section there are 4 parts to Content Modifier on high level i.e. General,Headers ,Properties and Body.Lets deep dive into each sections to see what are the different possibilities or brief use cases we can leverage this step.

       1. General:

Always try to enter some meaning full name that helps you to identify high level action you are going to perform using that Content Modifier.For example SetParamters,RestrctureData,ReadVariable.Also valid name here will help you to easily identify the step details in trace.

        2. Message Header:

Headers are important aspect of Message which will get propagated to reciever system or target system

These headers values can be set with values coming from different input data.

Action can have 2 possible values either Create or Delete. Create will add headers to message and delete will remove the headers from message .Most of the developers use create headers to use it across thier integration process and forget to delete those when its not necessary.Its always important to reset those headers when not required and follow the blog to understand how to do it.

Name of the header that is used to refer the values across integration process.These values can be called using camel expression ${header.<HEADER NAME>}

This field refers different type of values can be assigned to this headers.

      1. Constant: Any constant value that will be carried across integration process.
      2. Expression:Values can be called using camel simple expressions like ${header.<HEADER_NAME>} ,${property.<PROPERTY_NAME>.Refer the blog to know more about Camel Simple Expressions.
      3. Global Variable: We can use Write Variables step type to create a variable at a certain point within the message processing sequence. To consume the Global variable ( with the scope of tenant ) we can set type as Global Variable and set it to header or property in Content Modifier.
      4. Header: Pass value from other header to newly created header.
      5. Local Variable:We can use Write Variables step type to create a variable at a certain point within the message processing sequence. To consume the Local variable ( with the scope of integration flow ) we can set type as Local Variable and set it to header or property in Content Modifier.
      6. Number Range:While sending out a document in case of EDI processing, a unique interchange number must be added to each document. In order to add such an interchange number we can use the Number Range Object. To consume Number Ranges  we can set type asNumber Ranges and set it to header or property in Content Modifier.
      7. Property:Pass value from other property to newly created header.
      8. XPath: Set the value of XPath to header.Refer to know different XPath functions supported.
    • Data Type: The Data Type column is used only for the types XPath and Expression. The data type can belong to any Java class.Refer to know more about supported datatypes.
    • Value: Value of the property
    • Default:If you have selected Local Variable or Global Variable as Type, the value specified as Default will be assigned to the header value if the variable is not found at runtime.

3. Exchange Property:

Properties are important aspect of Message which will not get propagated to reciever system or target system.Boundary condition for properties is integration flow.

4.Meessage Body