Skip to content

Promoting adapter properties

cyberbyber edited this page Apr 3, 2018 · 1 revision

Promoting properties for the original adapter

In certain scenarios some integration solutions might have logic which depends on certain adapter properties to be present in an inbound message's context. Obviously by mocking the original BizTalk adapter type in a receive location in order to allow the testing of the solution such logic will fail. TransMock addresses this by exposing a property on the mock adapter called PromotedProperties. This property allows for defining the values for the properties that are usually promoted by the original inbound adapter thus making it possible for any logic depending on such properties to succeed. The syntax for the PromotedProperties adapter property is very simple - it is of the kind of key-value pair separated by semicolon:

{{ <Adapter property name 1>=; <Adapter property name 2>=;... }}

The syntax for the original adapter property names is simplified and consists of the adapter name, and the property name separated by a dot. For the File adapter and the property ReceivedFileName for instance it would look like this:

{{ FILE.ReceivedFileName=FileName1.xml }}

Currently, as per release 1.2, the following adapters and their correspoding properties are supported:

|| Adapter || Property name || | File | FILE.ReceivedFileName | FTP | FTP.ReceivedFileName | POP3 | POP3.From | POP3 | POP3.Subject | POP3 | POP3.To | POP3 | POP3.Cc | POP3 | POP3.ReplyTo | MQSeries | MQMD.ApplIdentityData | MQSeries | MQMD.ApplOriginData | MQSeries | MQMD.CorrelId | MQSeries | MQMD.Encoding | MQSeries | MQMD.Expiry | MQSeries | MQMD.Format | MQSeries | MQMD.GroupID | MQSeries | MQMD.MsgId | MQSeries | MQMD.MsgSeqNumber | MQSeries | MQMD.MsgType | MQSeries | MQMD.Offset | MQSeries | MQMD.OriginalLength | MSMQ | MSMQ.AppSpecific | MSMQ | MSMQ.CertificateThumbPrint | MSMQ | MSMQ.CorrelationId | MSMQ | MSMQ.Label | MSMQ | MSMQ.Priority

It is the Mockifier which is actually setting the value of the PromotedProperties adapter property. In order to set the desired property values for the original adapter you have to define the PromotedProperties tag under the Mock tag for the corresponding receive location. For example if you are mocking a file adapter, here is how the Mock tag should look like:

{{

}}

The Mockifier would then parse it and assign the value with the correct syntax to the PromotedProperties property of the mock adapter.

Clone this wiki locally