Version: 17.01
Supported Since: 17.01
Current Payload Extractor processing element can be used to extract the payload from a message and assign the extracted payload to a given scope variable of the message context.
In the following use case, the requirement is to receive a message with JSON payload from a HTTP ingress connector, transform the JSON payload to XML and pass the message to a custom processing element that will require both the original JSON payload and the transformed XML payload for its custom process and finally deliver the message to backend service via HTTP egress processor.
The challenge is to transform the JSON payload to XML while keeping the original payload in the message context.
In this flow a Current Payload Extractor processing elements is configured to extract the received JSON payload and
assign the extracted value to the scope variable PAYLOAD
and pass the message context to the next processing
element for custom processing.
Next |
The processing element will assign the extracted payload and add the specified scope variable to the message context and it will be forwarded to this out port. |
On Exception |
The message context will be sent to this outport if any exception occurred while extracting the payload from the message |