Receive Location Name Property Promotion Pipeline Component

  • Sandro Pereira
  • Mar 23, 2022
  • 3 min read

I just updated my BizTalk Pipeline Components Extensions Utility Pack project available on GitHub with a new component: Receive Location Name Property Promotion Pipeline Component.

For those who are not familiar, this project is a set of custom pipeline components (libraries) that can be used in received and sent pipelines, extending BizTalk’s out-of-the-box pipeline capabilities.

BizTalk Pipeline Components Extensions Utility Pack

📝 One-Minute Brief

A lightweight BizTalk pipeline component that promotes the Receive Location Name into the message context so you can use it for routing, logging, tracking, or orchestration logic. This component simplifies scenarios where identifying the source receive location is essential but not available out of the box.

Receive Location Name Property Promotion Pipeline Component

Receive Location Name Property Promotion Pipeline Component is a simple pipeline component to promote the Receive Location Name (ReceiveLocationName) property to the context of the message. Several BizTalk Server context properties are not promoted by default, so they are not available for routing. 

One such property is ReceiveLocationName. While the ReceivePortName property is available in the BTS namespace, the ReceiveLocationName property is not promoted. It cannot be used for routing, nor can it be accessed from inside an orchestration.

My team and I kept that behavior to create this project as a proof-of-concept to demonstrate how you can promote properties within the message context.

Create a Property schema

To promote properties to the context of the message, we will need a Property Schema with these properties. In our case, we will add only one property called: ReceiveLocationName.

Property NameDate TypeProperty Schema Base
ReceiveLocationNamexs:stringMessageContextPropertyBase

Note: A MessageContextPropertyBase property means that the XPath may or may not exist. 

MessageContextPropertyBase

Create a Pipeline Component

To actually promote the properties to the context of the message, we need to create a pipeline component to do the trick.

string rlocationname = (string)pInMsg.Context.Read("ReceiveLocationName", "http://schemas.microsoft.com/BizTalk/2003/system-properties");
pInMsg.Context.Promote("ReceiveLocationName", "https://BizTalk.Pipeline.Components.RcvLocationPromotion.PropertySchema", rlocationname);

How to use it

Once you deploy the property schema and a receive pipeline component containing the Receive Location Name Property Promotion Pipeline Component, you can start to apply Content-based routing using the Receive Location Name.

Send Ports Filters

Download

THIS COMPONENT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

You can download the Receive Location Name Property Promotion Pipeline Component from GitHub here:

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

1 thought on “Receive Location Name Property Promotion Pipeline Component”

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top