Message Transforms

MessageTransforms can be used to transform an inbound message before processing, or an outbound message before delivery. The "TransformOn" field of MessageTransform determines when the transformation will occur. If the value is "Enqueue", the transformation will happen once, just prior to enqueuing the message. If the value if "Dequeue", the transformation will occur when message processing or delivery is attempted.

When applying the MessageTransform, all Inbound* and Outbound* fields on MessageTransform will be matched against the fields on the Message. All transforms which match will be applied. (A null in any column is considered as "match all".) If you need to execute multiple matching MessageTransforms in a particular sequence, you can define values for Precedence on MessageTransform to guide the evaluation order.

Transform class must extend com.onenetwork.platform.integ.msg.MessageTransform and implement the transform method.

Note

Throw MessageTransformFailedException from your TransformClass when the message transform fails and the Dequeue grid task should be failed instead of retrying.

Table 16.8. MessageTransform Fields

Field

Description

ValueChainId

Value Chain which owns the MessageTransform. (KEY field)

InboundQueueValueChainId

InboundQueue VC ID to match with the InboundQueue name on Message. (optional KEY field)

InboundQueueEnterpriseName

InboundQueue enterprise name to match with the InboundQueue name on Message. (optional KEY field)

InboundQueueName

InboundQueue name to match with the InboundQueue name on Message. (optional KEY field)

InboundInterface

InboundInterface name to match with the InboundInterface name on Message. (optional KEY field)

InboundInterfaceVersion

InboundInterface name to match with the OutboundInterface name on Message. (optional KEY field)

OutboundQueueValueChainId

OutboundQueue VC ID to match with the OutboundQueue name on Message.(optional KEY field)

OutboundQueueEnterpriseName

OutboundQueue enterprise name to match with the OutboundQueue name on Message. (optional KEY field)

OutboundQueueName

OutboundQueue name to match with the OutboundQueue name on Message. (optional KEY field)

OutboundInterface

OutboundInterface name to match with the OutboundInterface name on Message. (optional KEY field)

OutboundInterfaceVersion

OutboundInterface version to match with the OutboundInterface version on Message. (optional KEY field)

TransformClass

Fully qualified Transformation class name which will perform the actual transformation. Must extend base class com.onenetwork.platform.integ.msg.MessageTransform

TransformOn

TransformOn decide to run this transformation on Enqueue or Dequeue. Possible Values: Enqueue, Dequeue. (KEY field)

Precedence

Determines the order in which the transformation occurs. (optional KEY field)

Config

Any arbitrary configuration to be passed to the MessageTransform. This can be accessed using MessageTransformContext in the transform class