Version: 17.07
Supported Since: 17.01
Add Transport Header processing element can be used to add a transport header of given type, with given key and with given value to the message. It is possible either to define a specific value for this transport header 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. |
Next |
The processing element will add the specified transport header to the message and it will be forwarded to this out port |
On Exception |
The message will be sent to this outport if any exception occurred while adding the transport header |
Transport Header Name |
Name of the transport header to be added. |
Use Variable |
Defines how the value for the transport header should be extracted, ie: whether to extract the 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 set as the transport header value. |
Header Variable Type |
This parameter should define the type of the transport header value that is going to be set. |
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. |
In the following use case, the requirement is to receive a message with a SOAP payload from a HTTP ingress connector and validate the payload over a XSD and depending on the result of the validation dispatch the message to one of the two backend systems through a HTTP egress connector
The challenge is to add the custom transport header (UEX_CUSTOM_HEADER) with the boolean value whether the XSD validation has passed or failed.
In this flow, two Add Transport Header processing elements has been added to both "On Successful Validation" outport and "On Failed Validation" outport of the XSD Validator.
The 1st Add Transport Header element (which will receive the message context only if the validation is successful)
adds a transport header with key UEX_CUSTOM_HEADER and with the boolean
value true
to the message context. Similarly, the 2nd Add Transport Header element (which will receive the message context
only if the validation is failed) adds a transport header with key UEX_CUSTOM_HEADER
and with the boolean
value false
> to the message context.
Then custom processing element can look at the value of this header and determine whether the XSD validation has been successful or not.