Access message properties inside custom pipeline component

Just recently I was looking for some default message properties and how to read and write them inside a custom pipeline component. While searching I stumbled over a great post listing all the default message properties and how to read them.

If you want to access the properties in your custom pipeline component, you have to get the IBaseMessageContext object from the IBaseContext and use the Read method to get a value or the Write method to substitute a value with your own.

For example:

public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)

{

IBaseMessageContext context = pInMsg.Context;

string value = context.Read(property, namespace).ToString();
context.Write(property, namespace, value);

}

To make your life a little easier, here’s the full list of properties:

Receive pipeline properties:

 PropertyNamespace

1

ReceivedFileNamehttp://schemas.microsoft.com/BizTalk/2003/file-properties

2

InboundTransportLocationhttp://schemas.microsoft.com/BizTalk/2003/system-properties

3

InterchangeIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

4

ReceivePortIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

5

ReceivePortNamehttp://schemas.microsoft.com/BizTalk/2003/system-properties

6

WasSolicitResponsehttp://schemas.microsoft.com/BizTalk/2003/system-properties

7

AuthenticationRequiredOnReceivePorthttp://schemas.microsoft.com/BizTalk/2003/system-properties

8

InboundTransportTypehttp://schemas.microsoft.com/BizTalk/2003/system-properties

9

LRPMsgBodyTrackinghttp://schemas.microsoft.com/BizTalk/2003/system-properties

10

MessageExchangePatternhttp://schemas.microsoft.com/BizTalk/2003/system-properties

11

PortNamehttp://schemas.microsoft.com/BizTalk/2003/messagetracking-properties

12

ReceivePipelineIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

13

MessageTypehttp://schemas.microsoft.com/BizTalk/2003/system-properties

14

SchemaStrongNamehttp://schemas.microsoft.com/BizTalk/2003/system-properties

Send pipeling properties:


 PropertyNamespace

1

CopyModehttp://schemas.microsoft.com/BizTalk/2003/file-properties

2

LTPMsgBodyTrackinghttp://schemas.microsoft.com/BizTalk/2003/system-properties

3

ReceivedFileNamehttp://schemas.microsoft.com/BizTalk/2003/file-properties

4

SPIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

5

ActualRetryCounthttp://schemas.microsoft.com/BizTalk/2003/system-properties

6

FileNamehttp://schemas.microsoft.com/BizTalk/2003/file-properties

7

PartyNamehttp://schemas.microsoft.com/BizTalk/2003/messagetracking-properties

8

ReceivePortNamehttp://schemas.microsoft.com/BizTalk/2003/system-properties

9

WasSolicitResponsehttp://schemas.microsoft.com/BizTalk/2003/system-properties

10

AllowCacheOnWritehttp://schemas.microsoft.com/BizTalk/2003/file-properties

11

RetryIntervalhttp://schemas.microsoft.com/BizTalk/2003/system-properties

12

OutboundTransportCLSIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

13

SPNamehttp://schemas.microsoft.com/BizTalk/2003/system-properties

14

InboundTransportLocationhttp://schemas.microsoft.com/BizTalk/2003/system-properties

15

InterchangeIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

16

ReceivePortIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

17

SPTransportIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

18

TransmitPipelineIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

19

AuthenticationRequiredOnReceivePorthttp://schemas.microsoft.com/BizTalk/2003/system-properties

20

InboundTransportTypehttp://schemas.microsoft.com/BizTalk/2003/system-properties

21

LRPMsgBodyTrackinghttp://schemas.microsoft.com/BizTalk/2003/system-properties

22

MessageExchangePatternhttp://schemas.microsoft.com/BizTalk/2003/system-properties

23

OutboundTransportLocationhttp://schemas.microsoft.com/BizTalk/2003/system-properties

24

PortNamehttp://schemas.microsoft.com/BizTalk/2003/messagetracking-properties

25

ReceivePipelineID http://schemas.microsoft.com/BizTalk/2003/system-properties

26

SourcePartyIDhttp://schemas.microsoft.com/BizTalk/2003/system-properties

27

MessageTypehttp://schemas.microsoft.com/BizTalk/2003/system-properties

28

OutboundTransportTypehttp://schemas.microsoft.com/BizTalk/2003/system-properties

29

PartNameshttp://schemas.microsoft.com/BizTalk/2003/messageagent-properties

30

RetryCounthttp://schemas.microsoft.com/BizTalk/2003/system-properties

31

SchemaStrongNamehttp://schemas.microsoft.com/BizTalk/2003/system-properties

BizTalk’s sexy new XSLT mapper

I’ve just watched a clip from Channel9 featuring Eddie Churchill. In the video he demonstrates a prototype of the future BizTalk mapper. The new mapper will contain some very impressive features as I must say. Some of them make the life of the mapper a lot easier, especially when dealing with large maps.

Some of the features which are shown in the video are:

  • Different drawing densities for lines which are in view and which aren’t.
  • Highlighting all lines coming from and going to a functoid when the functoid is selected.
  • Automatic scrolling to elements when line or functoid is selected.
  • Sibling coalesence, which folds unmapped elements so only the mapped elements are visible.
  • Automapping or Intellimapping, which finds the best target or source element to map to based on a very intelligent algorithm.
  • Scrollbar ticks, which identifies where in the document you can find things you’re interested in.

While watching the clip I could only thing of one thing: gimme gimme gimme!!! Unfortunately the new mapper will not be shipped with BizTalk 2006. When the mapper will be shipped is not yet known as this is just a prototype. It’s also highly possible that we see some features in other Microsoft Application before the mapper is even shipped.

I recommend that every BizTalk engineer who hasn’t seen the video yet will watch it right away. You can find the clip here: http://channel9.msdn.com/Showpost.aspx?postid=126990