replace transport header

Replace Transport Header

Version: 17.07

Supported Since: 17.01

What is a Replace Transport Header?

Replace Transport Header processing element can be used to replace an exiting transport header of a message. To replace a transport header it is possible either to define a specific value or to extract the value from a scope variable of message context.

In order to use this processing element, you must first select the Transport Header Manipulation dependency from the processor list when you are creating an empty Ultra project. If you have already created a project, you can add this dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Processors list, select the Transport Header Manipulation dependency.

replace header outports

Out Ports

Next

The processing element will replace the specified transport header to the message 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 replacing the transport header.

Parameters

Transport Header Name

Name of the transport header to be replaced.

Use Variable

Defines how the replacing value for the transport header should be extracted, ie: whether to extract the replacing transport header value from a scope variable of the message context.

Value

Depending on the Use Variable value, the definition of this parameter varies.

If Use Variable is marked then the value for this property should be the name of the scope variable. Otherwise this parameter should be the exact value to be replaced as the transport header value.

Header Variable Type

This parameter should define the type of the transport header value that is going to be replaced.

Propagate Variable Search

Whether to propagate variable search to parent. This property is only relevant when value for the header is to be extracted from a scope variable.

Sample Use Case

In the following use case, the requirement is to read a message with an XML payload from a JMS queue, validate the payload against an XSD, perform some custom processing based on the result of the validation and finally deliver the message to another JMS queue.

The challenge is to make the custom processing element aware of whether the XSD validation is successful or not.

flow replace transport header

In this flow a Add Transport Header processing elements has been added at the beginning of the flow noting the validation is successful by setting the VALIDATION_SUCCESS transport header true. Then at the error outport of the XSD validation processing element, that is if the XSD validation has been failed for the XML payload, the value of the VALIDATION_SUCCESS transport header will be changed to false.

Then custom processing element can look at the value of this transport header and determine whether the XSD validation has been successful or not.

In this topic
In this topic
Contact Us