Notes From The Road: 2019 Year In Review

Notes From The Road: 2019 Year In Review

2019 was a very challenging year. Nevertheless, it was another great year both on a personal and professional level, if last year I described as a family year this one it was a consolidation year.

  • If last year I moved my family to a bigger house, this year we made all the necessary modifications to the home of our dreams;
  • If my team at DevScope grew at the end of 2018, 2019 was a year of consolidation, and we hope it will continue to grow during this year in terms of business but full of challenging and great projects worldwide. We are doing a fantastic job;
  • My Porto Airbnb host house is running smoothly, with good reviews from our guests. Nevertheless, there is always space for improvement.
  • And who knows me knows that one of my passions is to enjoy a glass of good wine, so I’m delighted to have my first wine cellar draft (it will be improved in the future)
  • But with all of these renovations, it was also a year
    that I had to dedicated more time to the family – something that was delightful!
  • And I got married…

My Blog is growing every year…

So, once again, I struggle to have free time, but when you love what you do, you will always find a way to do it. So, in the end, I was able to:

  • Publish 43 new posts on my blog; it was indeed the year I publish fewer blog posts since I started my blog, but to be honest, I compensate in other aspects!
    • More than 431,000 visits to my blog – that’s an average of 1,181 visits per day!
      • That is almost double of last year. And the best year ever.
    • Coming from 207 countries across the world in the past year.
      • 13 new locations compare to the previous year
    • And the countries that most visited my blog still are the United States, followed by India, the United Kingdom, and Canada

Not bad if we compare to previous years:

  • 2018: 246,381 visits, 194 countries, 70 new posts
  • 2017: 210,000 visits, 167 countries, 63 new posts (migrate to a new blog)
  • 2016: 318,576 visits, 190 countries, 50
    new posts
  • 2015: 350,000 visits, 184 countries, 79 new
    posts
  • 2014: 310,000 visits, 183 countries, 52
    new posts
  • 2013: 200,000 visits, 176 countries, 79
    new posts
  • 2012: 170,000 visits, 171 countries, 102
    new posts
  • 2011: 91,000 visits, 61 new posts

I want to say thanks to all my readers. I appreciate all the visits to my
blog, and thanks for your support.

Attractions in 2019

These are the top 10 posts that got the most views in 2019:

  1. A fish out of water: Saving changes is not permitted. The changes that you have made require the following tables to be dropped and re-created with 82,876 views
  2. BizTalk Assessment: .NET Runtime Optimization Service causing high CPU usage with 36,387 views
  3. SQL Server Management Studio (SSMS): The Visual Studio component cache is out of date. Please restart Visual Studio with 18,915 views
  4. The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security with 15,125 views
  5. Microsoft Integration (Azure and much more) Stencils Pack v3.0.0 for Visio with 14,048 views
  6. SQL Server detected a logical consistency-based I/O error: incorrect pageid in BizTalkMsgBoxDb database with 12,965 views
  7. New Office365 icons are now included in Microsoft Integration (Azure and much more) Stencils Pack v3.1.1 for Visio with 8,255 views
  8. Microsoft Flow: How to pass the SQL data table results in a Markdown-formatted table into an Email notification or Approval Requests with 6,852 views
  9. TypeLoadException: Could not load type ‘type name’ from assembly ‘assembly name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=…’ with 6,078 views
  10. BizTalk Server 2020… is coming at the end of CY 2019 with 5,905 views

And these are some of my favorite post
that I enjoyed writing in 2019:

Open Source Contributions…

I told earlier that this was the year I wrote fewer
blog posts in my blog. On the other hand, this was the year I published more
open source contributions like code samples, tools, and resources. Here is the
current list of all my contributions:

  • Migrate all the code samples that existed in Microsoft Code Gallery that shut down to a GitHub repository: BizTalk Server Learning Path that includes nothing less than 46 code samples that will help you understand and improve different skill in BizTalk Server.
  • Microsoft Integration, Azure, Power Platform, Office 365 and much more Stencils Pack continues to be updated with new releases. The last time I counted already includes nearly 2150 shapes that will help you visually represent Integration architectures (On-premise, Cloud or Hybrid scenarios) and Cloud solutions diagrams.
  • BizTalk Scheduled Task Adapter repo includes an in-process receive adapter that executes a prescribed task on a daily, weekly or monthly schedule.
  • And the creation of a public repository for Microsoft BizTalk Server open source community extensions: code samples, BizTalk Artifacts (components), adapters, tools and so on: BizTalk Server Open Source Community that at the moment already includes 5 tools and 3 resources:
    • BizTalk Port Multiplier Tool is a simple tool that aims to simplify this process by allowing you to easily “clone or duplicate” an existing port (Receive Port or Send Port).
    • BizTalk Filter Finder Tool is a simple tool that aims to simplify the process for better understand and maintain solutions based on content-based routing and context-based routing with or without orchestrations involved.
    • BizTalk Pipeline Components Extensions Utility Pack is a set of custom pipeline components (libraries) with several custom pipeline components that can be used in received and sent pipelines, which will provide an extension of BizTalk out-of-the-box pipeline capabilities.
    • BizTalk Mapper Extensions UtilityPack is a set of libraries with several useful functoids to include and use it in a map, which will provide an extension of BizTalk Mapper capabilities.
    • BizTalk MapperExtensions Functoid Wizard is a Custom Functoid Project Wizard for Visual Studio. It allows you to create a new Functoids project for BizTalk Server without having to create manually the project.
    • SSO Application Configuration tool that provides the ability to add and manage applications, add and manage key-value pairs in the SSO database, as well as import and export configuration applications so that they can be deployed to different environments.

Other contributions…

And of course, several other publications outside my
blog.

A year of speaking engagements…

However, that not all! I still was
able to deliver 9 sessions:

  • XLVIII Porto.Data Community Meeting | January 30, 2019
    | How we use Microsoft Flow and PowerApps: Real cases scenarios
  • Integration Use Group | February 4, 2019 | The
    NoS-addin – your (free) BizTalk Dev buddy!
  • Integration Down Under | February 14, 2019 | How we
    are using Microsoft Integration features and related Azure technologies to
    improve our processes
  • Global Integration Bootcamp 2019 Madrid | May 30, 2019
    | Real case implementations using Azure Logic Apps and/or Microsoft Flows
  • Global Azure Bootcamp 2019 Lisbon | April 27, 2019 |
    How we are using Logic Apps (and/or Microsoft Flow): Real cases scenarios
  • INTEGRATE 2019 UK London | June 3-5, 2019 | BizTalk
    Server Fast & Loud Part II
  • INTEGRATE 2019 USA – Redmond | June 24-26, 2019 |
    BizTalk Server Fast & Loud Part II
  • PBIPT #7 | July 2, 2019 | Power BI Service, Flow,
    PowerApps and all together!
  • DevScope CSI | October 4, 2019 | Diagnosis – How are
    your Flow’s: Best Practices, Tips and Tricks

And several workshops and
training course during 2019:

  • Developing Business Process and Integration Solutions
    Using Microsoft BizTalk Server 2016 training  course
  • BizTalk Server 2016: Developer and Administration
    (OAM) training course
  • Get started with Microsoft PowerApps and Flow training
    course
  • Microsoft Integration Workshop London | October 28-29

For all of you…

Once again, thanks for following me, for reading my blog, and I promise that I will continue to share my knowledge during 2020.

The post Notes From The Road: 2019 Year In Review appeared first on SANDRO PEREIRA BIZTALK BLOG.

Merry Christmas & Happy New Year 2019

Merry Christmas & Happy New Year 2019

Christmas is about spending time with family and friends. It’s about creating happy memories that will last a lifetime, and it is, without a doubt, my favorite holiday season.

And once again, my sincere wishes for a Merry Christmas and a Happy New Year to all my readers, friends, coworkers (amazing guys at DevScope), Microsoft BizTalk Community, all the Portuguese Communities, my MVP “family” and of course to my beautiful family.

Thanks in advance for all the support and encouragement given throughout another year. It was, once again, an incredible year for me, on both a personal and professional level, and hope that the next will be a year filled with new challenges, I promise that I will continue to share knowledge hoping that they can help someone.

May this festive season sparkle and shine, may all of your wishes and dreams come true, and may the new year be made of great happiness. Merry Christmas to you and your entire family and a happy new year!

The post Merry Christmas & Happy New Year 2019 appeared first on SANDRO PEREIRA BIZTALK BLOG.

Christmas Gift: BizTalk Server 2016: End-to-end scenario – Receiving Messages through the HTTP Adapter whitepaper

Christmas Gift: BizTalk Server 2016: End-to-end scenario – Receiving Messages through the HTTP Adapter whitepaper

And you thought there was no Santa Claus? I couldn’t
take this opportunity and this time of year to once again give back to the
community what they have also done for me: grow up together in several aspects.

So, this year with the fantastic help as always of BizTalk360 team, my partner in many adventures during these years and the sponsor of my blog, we end up writing, revising and editing in a short period (5 days) another BizTalk Server whitepaper to be completed before Christmas: BizTalk Server 2016: End-to-end scenario – Receiving Messages through the HTTP Adapter whitepaper.

BizTalk Server 2016: End-to-end scenario – Receiving Messages through the HTTP Adapter whitepaper

The role of an adapter is to enable communications
between BizTalk Server and external systems and trading partners. Users
configure adapters by creating send ports and receive locations that define the
properties for given instances of the adapter. Most adapters support both send
and receive operations, whereas other adapters support communication in only
one direction.

The HTTP Adapter is one of the adapters that support
two-way communications, but unlike other adapters, this adapter has two
characteristics that define it:

  • The HTTP
    “Receive” Adapter that is responsible for delivering messages to BizTalk is, in
    fact, a DLL that runs inside Internet Information Services (IIS)
  • And for that
    reason, it must be configured in IIS – it is not there out-of-the-box.

In this whitepaper, we will describe the step-by-step process of installing and configuring the HTTP Adapter in order to receive messages.

Some of you may think that the HTTP adapter is deprecated,
but that is not true. The only adapters that were deprecated were the old SAP
adapter (removed) and the SOAP and SQL adapter (that still are present in the
Administration Console). The HTTP adapter is a classic but is not deprecated
and is still very used today.

The idea for
this whitepaper was partly out of a real need and at a customer request.
Because it is a strange adapter with a peculiar configuration unlike any other
adapter in BizTalk Server, when I was giving a training course, the attendees
struggle to understand and put it working correctly. By coincidence, a week
later, I needed to put this adapter working at another client.  As a result of that request and that client’s
need, I end up creating this step-by-step guide on how to install and configure
the HTTP adapter to receive messages through HTTP requests. I think this is a
good whitepaper about a classic adapter in BizTalk Server.

I hope you like
it and marry Christmas!

Where I can download it

You can download the whitepaper here:

You can also find, download and enjoy several other
free whitepapers of my own here:

The post Christmas Gift: BizTalk Server 2016: End-to-end scenario – Receiving Messages through the HTTP Adapter whitepaper appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Filter Finder Tool for BizTalk Server 2013 R2

BizTalk Filter Finder Tool for BizTalk Server 2013 R2

Recently my team and I developed and released several tools that extend the out-of-box capabilities of BizTalk Server 2016 for developer and administration teams to be more productive, saving times in some simple but time-consuming tasks that should d supposed to be. One of these tools was BizTalk Filter Finder Tool.

Because many clients still are using BizTalk Server 2013 R2, and because I had received some requests from the community, I will be releasing these tools for BizTalk Server 2013 R2 also. And today, we will stat with the BizTalk Filter Finder Tool.

BizTalk Filter Finder Tool

BizTalk Filter Finder Tool is a simple tool that aims to simplify the process for better understand and maintain solutions based on content-based routing. By allowing you to have a quick overview of all the artifacts, send ports or orchestrations that have filters associated.

BizTalk Filter Finder Tool

This tool will extend default BizTalk Server capabilities transforming this tedious and sometimes complicate analyze a little simple, easy, and fast.

It way not be a fantastic tool; it may not be beautiful, but for me is a timesaver tool.

Credits also to my team member at DevScope, Pedro Almeida that collaborated with me in the development of this tool.

Download

You can download BizTalk Filter Finder Tool from:
BizTalk Filter Finder ToolBizTalk Filter Finder Tool
GitHub

The post BizTalk Filter Finder Tool for BizTalk Server 2013 R2 appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Port Multiplier Tool for BizTalk Server 2013 R2

BizTalk Port Multiplier Tool for BizTalk Server 2013 R2

Recently my team and I developed and released several tools that extend the out-of-box capabilities of BizTalk Server 2016 for developer and administration teams to be more productive, saving times in some simple but time-consuming tasks that should d supposed to be. One of these tools was BizTalk Port Multiplier Tool.

Because many clients still are using BizTalk Server 2013 R2, and because I had received some requests from the community, I will be releasing these tools for BizTalk Server 2013 R2 also. And today, we will stat with the BizTalk Port Multiplier Tool.

BizTalk Port Multiplier Tool

BizTalk Port Multiplier Tool is a simple tool that aims to simplify the port “cloning” process by allowing you to quickly “clone or duplicate” any existing port: Receive Port or Send Port.

  • Send Ports are quite easy to archive, you only need to give a different name to the port, and you can clone it;
Devscope BizTalk Port Multiplier tool Send Ports
  • Receive Ports are tricky because they may contain several Receive Locations and each URI needs to be unique;
Devscope BizTalk Port Multiplier tool

This tool will extend default BizTalk Server capabilities transforming the tedious and sometimes complicate port creation based on an existing one a little simple and easy allowing you to:

  • Create a new Receive Port based on an existing one;
    • It will also export the binding file from that new Receive Port;
  • Create a new Send Port based on an existing one;
    • It will also export the binding file from that new Send Port;
  • Generate different binding files for each environment

Why do I need to “clone” a Receive Port?

Sometimes you also need to create a receive port with similar configurations of an existing one, also changing only a few settings or simple the URI, and instead of manually recreating, you can have 90% of the process done automatically.

Sometimes it is practical, occasionally, or in some scenarios, it may not work, but in most cases, it will. So it is a best-effort operation and not an exact clone because they may have several Receive Locations, and each Address/URI needs to be unique. So, you then need to go to each receive location and reconfigure them.

Credits

Credits also to my team member at DevScope, Pedro Almeida that collaborated in the development of this tool.

Download

You can download BizTalk Port Multiplier Tool from:
BizTalk Port Multiplier ToolBizTalk Port Multiplier Tool
GitHub

The post BizTalk Port Multiplier Tool for BizTalk Server 2013 R2 appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Bindings Exporter Tool for BizTalk Server 2013 R2

BizTalk Bindings Exporter Tool for BizTalk Server 2013 R2

Recently my team and I developed and released several tools that extend the out-of-box capabilities of BizTalk Server 2016 for developer and administration teams to be more productive, saving times in some simple but time-consuming tasks that should d supposed to be. One of these tools was BizTalk Bindings Exporter Tool.

Because many clients still are using BizTalk Server 2013 R2, and because I had received some requests from the community, I will be releasing these tools for BizTalk Server 2013 R2 also. And today, we will stat with the BizTalk Bindings Exporter Tool

BizTalk Bindings Exporter Tool

BizTalk Binding Exporter Tool is a simple tool that will suppress the absence of advanced binding file generation capabilities in the BizTalk Server Administration Console, allowing you to generate and export a binding file from BizTalk Applications in an intuitive and easy way.

Exporting a BizTalk Server Application binding is, at first sight, a quick and straightforward task that can be done using the BizTalk Server Administration Console:

  • Click Start, click All Programs, click Microsoft BizTalk Server 20xx, and then click BizTalk Server Administration
  • In the console tree, expand BizTalk Server Administration, expand the BizTalk Group, and then expand Applications
  • Right-click the application whose bindings you want to export, point to Export, and then click Bindings…
  • On the Export Bindings page, in Export to file, type the absolute path of the .xml file to which to export the bindings
  • Ensure that Export all bindings from the current application option is selected, and then click OK

But even in simple tasks, we may encounter challenges that require us to perform some monotonous and boring manual operations that consume some of our precious time and are always subject to failures. Because out-of-the-box BizTalk Administration Console doesn’t allow you to:

  • Export a Binding file of a specif Receive Port or list of Receive Ports;
  • Export a Binding file of a specif Send Port or list of Send Ports;
  • Export a Binding file of a specif Assembly or list of Assemblies;

And these are just a few scenarios. You can only fully Export the binding files of an entire application, which will lead you to sometimes extensive and fallible manual work to clean the binding files.

Usually, the binding exportation starts in development. Still, we also need to generate the same bindings for other environments like production, and for that, we usually need to open the binding file and replace/fix the differences for each different environment… which usually is a tedious operation. What we need to replace is mainly:

  • the URI’s: it should be fixed, but it is not mandatory. If you know what you are doing, you can fix them directly on the environment after you import the Binding.
  • the host instances: not mandatory, if you have the same host and host instances names across all your different environments (as best practices will tell you to do).
  • the NT Group Name associated in the Services (Orchestrations): according to securities best practices you shouldn’t use the same BizTalk Groups in different environments, so in this case, if you follow these best practices, you need to change these parameters in your binding file.

Normally, everyone changes the URI’s but neglecting the other parameters may be causing problems during the Binding import.

Once again, this tool will extend default BizTalk Server capabilities transforming the tedious and sometimes complicate binding generation a little simple and easy.

DevScope BizTalk Bindings Exporter Tool

You just need to specify the connection string to the BizTalk Management database (BizTalkMgmtDb)

DevScope BizTalk Bindings Exporter Tool

And this tool allows you to generate and export binding files with the following capabilities:

  • Export binding(s) file(s) for an entire Application or a list of Applications;
  • Export binding(s) file(s) from a specify Assembly or list of Assemblies;
  • Export binding(s) file(s) from a Receive Port or list of Receive Ports;
  • Export binding(s) file(s) from a Send Port or list of Send Ports;
  • Or Generate different binding files for each environment if you create an Excel File with the mapping for each environment ;

Credits also to my team member at DevScope, Pedro Almeida that collaborated in the development of this tool.

Download

You can download BizTalk Bindings Exporter Tool from:
BizTalk Bindings Exporter ToolBizTalk Bindings Exporter Tool
GitHub

The post BizTalk Bindings Exporter Tool for BizTalk Server 2013 R2 appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Pipeline Components Extensions Utility Pack: SQL Server Polling Debatch Message By Grouping Filter Pipeline Component

BizTalk Pipeline Components Extensions Utility Pack: SQL Server Polling Debatch Message By Grouping Filter Pipeline Component

The BizTalk Pipeline Components Extensions Utility Pack community project for BizTalk Server 2016, once again, got a new update! It now has a new component that you can use in your custom BizTalk Server pipelines: SQL Server Polling Debatch Message By Grouping Filter Pipeline Component.

Debatching messages, which are received from WCF-SQL Adapter, is quite a simple task to do. You need to:

  • Specify that the message has an envelope by setting the Envelope property to Yes

  • Specify the Body XPath property

  • And finally, set the Max Occurs property to 1

Next, the default XMLReceive pipeline will do the rest. However, what happens if you want to extend and customize this behavior? In my case, let’s imagine I have the following row samples:

SeqId

Name

MsgIdentifier

Role

Company

1

Sandro Pereira

0000001

Team Lead

DevScope

2

Pedro Almeida

0000001

Senior Developer

DevScope

3

Rui Romano

0000002

Team Lead

DevScope

4

João Sousa

0000003

Team Lead

DevScope

5

Joana Barbosa

0000002

BI Architect

DevScope

We will poll all the data from the SQL Database (not all, but let’s say the first 20 lines), and we want to split or debatch the incoming message based on the value of the MsgIdentifier property. So, after passing the receive pipeline, we will get, based on the previous example, 3 different messages:

table

The main question is: How do we handle scenarios where debatching is done based on business logic?

The answer is that we don’t have anything out-of-the-box that allows us to do these kinds of tasks. Most of you will think about debatching these kinds of messages inside an orchestration.

However, the best way for us to achieve this goal is to develop a custom Disassemble pipeline component.

SQL Server Polling Debatch Message By Grouping Filter Pipeline Component

The reason for choosing the Disassemble stage is simple; it is here that normally the process of breaking up a large interchange message into smaller messages happens, by removing the Envelopes, which is often called “debatching”. So, this should indeed be the place for us to create our custom Disassemble pipeline component.

The SQL Server Polling Debatch Message By Grouping Filter pipeline component is a custom disassemble pipeline component that can be used to debatch incoming messages from the WCF-SQL adapter, by filtering from a specific element of the message. It will provide the following capabilities:

  • It allows you to define the grouping element
    • This will be an integer that will define the position of the element inside the message after the source code

Note: This custom pipeline component can be used with other LOB adapters but it was never tested before.


public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
    string originalDataString;

    try
    {
        //fetch original message
        Stream originalMessageStream = inmsg.BodyPart.GetOriginalDataStream();
        byte[] bufferOriginalMessage = new byte[originalMessageStream.Length];
        originalMessageStream.Read(bufferOriginalMessage, 0, Convert.ToInt32(originalMessageStream.Length));
        originalDataString = System.Text.ASCIIEncoding.ASCII.GetString(bufferOriginalMessage);
    }
    catch (Exception ex)
    {
        throw new ApplicationException("Error in reading original message: " + ex.Message);
    }

    XmlDocument originalMessageDoc = new XmlDocument();
    StringBuilder messageString;
    string msgBatchId = string.Empty;

    try
    {
        //load original message
        originalMessageDoc.LoadXml(originalDataString);
                
        //fetch namespace and root element
        string namespaceURI = originalMessageDoc.DocumentElement.NamespaceURI;
        string rootElement = originalMessageDoc.DocumentElement.Name;

        //start batching messages
        messageString = new StringBuilder();
        messageString.Append("<" + rootElement + " xmlns:ns0='" + namespaceURI + "'>");
        string rowId = string.Empty;

        foreach (XmlNode childNode in originalMessageDoc.DocumentElement.ChildNodes)
        {
            messageString.Append("<" + childNode.Name + ">");
            foreach (XmlNode rows in childNode.ChildNodes)
            {
                rowId = rows.ChildNodes[this.GroupingElement].InnerText;

                if (msgBatchId == string.Empty)
                    msgBatchId = rowId;

                if (msgBatchId != rowId)
                {
                    messageString.Append("</" + childNode.Name + ">");
                    messageString.Append("</" + rootElement + ">");

                    //Queue message
                    CreateOutgoingMessage(pc, messageString.ToString(), namespaceURI, rootElement);

                    msgBatchId = rowId;

                    messageString.Remove(0, messageString.Length);
                    messageString.Append("<" + rootElement + " xmlns:ns0='" + namespaceURI + "'>");
                    messageString.Append("<" + childNode.Name + ">");
                    messageString.Append(rows.OuterXml);
                }
                else
                {
                    messageString.Append(rows.OuterXml);
                }
            }
            messageString.Append("</" + childNode.Name + ">");
        }

        messageString.Append("</" + rootElement + ">");

        CreateOutgoingMessage(pc, messageString.ToString(), namespaceURI, rootElement);
    }
    catch (Exception ex)
    {
        throw new ApplicationException("Error in writing outgoing messages: " + ex.Message);
    }
    finally
    {
        messageString = null;
        originalMessageDoc = null;
    }


    // _msgs.Enqueue(inmsg);
}

The source code shown here is just a snippet. To be able to use this, you can download the latest version from the BizTalk Pipeline Components Extensions Utility Pack.

What is BizTalk Pipeline Components Extensions Utility Pack?

The BizTalk Pipeline Components Extensions Utility Pack is a set of custom pipeline components (libraries) with several custom pipeline components that can be used in receive and send pipelines, which will provide an extension of BizTalk out-of-the-box pipeline capabilities.

The project is available on the BizTalk Server Open Source Community repository on GitHub (https://github.com/BizTalkCommunity). Everybody can contribute with new pipeline components that can be used to extend or improve the existing BizTalk Server capabilities.

At the moment, it is only available for BizTalk Server 2016, but it will soon be compiled and available for previous versions of the product.

Where to download it?

You can download BizTalk Pipeline Components Extensions Utility Pack from GitHub here: BizTalk Pipeline Components Extensions Utility Pack.

 

The post BizTalk Pipeline Components Extensions Utility Pack: SQL Server Polling Debatch Message By Grouping Filter Pipeline Component appeared first on BizTalk360.

BizTalk Pipeline Components Extensions Utility Pack: Local Archive Pipeline Component

BizTalk Pipeline Components Extensions Utility Pack: Local Archive Pipeline Component

BizTalk Pipeline Components Extensions Utility Pack community project for BizTalk Server 2016, once again, got a new update and it now has a new component that you can use in your custom BizTalk Server pipelines: Local Archive Pipeline Component.

Local Archive Pipeline
Component

BizTalk Server Local Archive pipeline component it’s a
pipeline component that can be used for archiving incoming/outgoing message
from any adapters. It will provide the following capabilities:

  • It can be used in any stage of a receive pipeline or send pipeline;
  • It can be used in multiple stages of a receive pipeline or send pipeline;
  • It provides an option for you to specify the location path for where you want to save the message: local folder, shared folder, network folder.
  • It can be used from any adapter:
    • If the adapter provides the ReceivedFileName property promoted like the File adapter or FTP adapter the component will take this value in consideration and save the message with the same name;
    • Otherwise, it will use the MessageID, saving the file with the MessageID has its name without extension.
public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
	// 
	// TODO: implement component logic
	// 
	// this way, it's a passthrough pipeline component

	if (this.PerformBackup)
	{
		try
		{
			//Get Message Id
			Guid msgId = inmsg.MessageID;

			//Get Filename by FileAdapter NS
			string fileName = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties").ToString();
			if (string.IsNullOrEmpty(fileName))
			{
				fileName = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/ftp-properties").ToString();
				if (string.IsNullOrEmpty(fileName))
				{
					fileName = msgId.ToString();
				}
			}

			if (!new DirectoryInfo(this.Folder).Exists)
			{
				try
				{
					Directory.CreateDirectory(this.Folder);
				}
				catch
				{
					throw;
				}
			}

			SaveStreamToFile(inmsg.BodyPart.Data, fileName, true);

			inmsg.BodyPart.Data.Position = 0;
		}
		catch
		{
			throw;
		}
	}

	return inmsg;
}

What is BizTalk Pipeline Components Extensions Utility
Pack?

BizTalk Pipeline Components Extensions Utility Pack is
a set of custom pipeline components (libraries) with several custom pipeline
components that can be used in received and sent pipelines, which will provide
an extension of BizTalk out-of-the-box pipeline capabilities.

The project is
available on the BizTalk Server Open Source Community repository on GitHub (https://github.com/BizTalkCommunity), and everyone can contribute with new
pipeline components that can be extended or improve the existing BizTalk Server
capabilities.

BizTalk Pipeline Components Extensions Utility Pack: Local Archive Pipeline Component

At the moment it is only available for BizTalk Server
2016, but it will soon be compiled and available for previous versions of the
product.

Where to download it?

You can download BizTalk Pipeline Components Extensions Utility Pack from
GitHub here:

BizTalk Pipeline Components Extensions Utility Pack
GitHub

The post BizTalk Pipeline Components Extensions Utility Pack: Local Archive Pipeline Component appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Pipeline Components Extensions Utility Pack: JSON Encoder Pipeline Component

BizTalk Pipeline Components Extensions Utility Pack: JSON Encoder Pipeline Component

At the beginning of this week I ask on twitter what should be the topic of my next blog posts: BizTalk Server and JSON support or Azure Logic Apps. And the majority of the replies was: BizTalk Server and better JSON support.

For that reason, I will respect my reader’s decision and I will be releasing today a new addition to my BizTalk Pipeline Components Extensions Utility Pack community project for BizTalk Server 2016: Custom JSON Encoder Pipeline Component.

You may be asking yourself: this component already exists by default in BizTalk Server 2016, so why we need another?

Yes, Microsoft provides out-of-the-box a JSON Encoder to transform the XML messages into a JSON message and sends it out. But, unfortunately, in some cases, it doesn’t work as you should expect to work and it will fail, in my case with this error:

Reason: Value cannot be null.
Parameter name: key

And in reality what I just want is a simple way, that, I hope, it would work for all scenarios (aka XML messages) in a simple and effective way.

JSON Encoder Pipeline Component

The Custom JSON Encoder is a pipeline component for BizTalk Server which can be used in a Send Pipeline (Encode stage) to encode any XML message into a JSON equivalent in a simple and effective way.

BizTalk Server Custom JSON Encoder pipeline component

Because I would like to have a choice between using the default pipeline component provide by Microsoft, at least the internal behavior, this pipeline component is an extension of the default JSON Encoder pipeline component and fully compatible with it and you will be able from the BizTalk Administration console you will be able to decide if:

  • You want to use
    the behavior of the default JSON Encoder pipeline component provide by
    Microsoft by setting the UseCustomEncoder property to False;
BizTalk Server Custom JSON Encoder pipeline component use custom behavior
  • or use the custom
    behavior to generate the JSON message by setting the UseCustomEncoder property
    to True;

What is BizTalk Pipeline Components
Extensions Utility Pack?

BizTalk Pipeline Components Extensions Utility Pack is a set of custom pipeline
components (libraries) with several custom pipeline components that can be used
in received and sent pipelines, which will provide an extension of BizTalk
out-of-the-box pipeline capabilities.

The project is available on the BizTalk Server Open Source Community repository on GitHub (https://github.com/BizTalkCommunity), and everyone can contribute with new pipeline components that can be extended or improve the existing BizTalk Server capabilities.

BizTalk Pipeline Components Extensions Utility Pack: Unzip File Pipeline Component

At the moment it is only available for BizTalk Server 2016, but it will
soon be compiled and available for previous versions of the product.

Where to download it?

You can download BizTalk Pipeline Components Extensions Utility Pack from
GitHub here:

BizTalk Pipeline Components Extensions Utility Pack
GitHub

The post BizTalk Pipeline Components Extensions Utility Pack: JSON Encoder Pipeline Component appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Filter Finder Tool

BizTalk Filter Finder Tool

Have you ever found yourself in a position where you
needed to understand how a particular BizTalk solution works? And to make
matters worse, the majority of the solution is implemented based on content-based
routing?

Routing Messages in BizTalk
Server

So first, what is this: Content-Based routing?

Don’t get me wrong the definition that I will provide because there are several Message Routing Patterns that you can implement in BizTalk Server. For example, you can implement in BizTalk Server a:

But the reality is that in BizTalk Server:

  • a message is always composed by the message itself and the metadata associated with it;
  • the architecture is based on Publish and Subscribe;

So in his essence, the subscriber will subscribe to
the messages based on Content-Based Routing.

And you may say: yes, but I can route a message without examining is content.

And you are right. The problem is the default
definition of this pattern:

  • As the names
    describe, Content-Based Router examines the message content and routes the
    message onto a different channel based on data contained in the message. For
    example, routing a message based on specif values of specif fields, or based on
    some criteria like existing fields.

However, as I told you before, a message in BizTalk
Server is always composed by the message itself and the metadata
associated with it. And for that reason, you may found other variations or
other names like:

  • Context-Based
    Routing
    : Context-Based Routing is similar to the previous
    one, but instead of analyzing the content of the message, it will analyze the
    metadata of the message. This information, in BizTalk Server, is normally
    created on the receive port by the adapter and pipelines.

    • Remember that I
      can promote messages to the context of the message and route them;
  • Message-Based
    Routing
    : that is normally defined when:

    • a message is
      routed by BizTalk only based on the message type;

      • But this is
        metadata associated in the message, and you need to inspect the message to get
        is type;
    • or in pass-thru
      scenarios when you are just redirecting the message to other systems, i.e.,
      BizTalk is a broker and don’t “touch” or modify the message;

      • But these
        filters are also associated with metadata of the message;

The problem of managing these
solutions

If you have found yourself managing solutions, that
majority is implemented with content-based routing, which is usually associated
with not using orchestrations. You know that is not easy to understand the solution:

  • What ports are subscribing
    to the messages?

    • In which
      conditions?
    • In which application?

But that’s not all. Even worse if you have
orchestrations using filters based on the content/context of the message in the
activation.

This kind of analyze is hard because BizTalk Server
Administration Console doesn’t provide an easy way out-of-the-box for you to
see these subscriptions for example in a central place or in a visual diagram
like:

BizTalk subscriptions diagram prof-of-concept

This picture is actually from BizTalk360 Graphical Message Flow, but it serves well here as prof-of-concept.

The default solution

So the default solution that you have out-of-the-box
with the product is to query the subscription from the BizTalk Server
Administration Console by:

  • In the console
    tree, expand BizTalk Server Administration, and then click the BizTalk group.
  • In the details
    pane, click the New Query tab.
  • In the Query
    Expression group, in the Value column, select Subscriptions from the drop-down
    list box.
BizTalk Administration Console Subscription query

But then you need to go one by one and see what the
filters are.

You can minimize this by filtering more the query
using the following filters:

  • Maximum Matches:
    The number of matches to display.
  • Service Instance
    ID: You can filter subscriptions by service instance ID.
  • Service Name: You
    can filter subscriptions by service name.
  • Subscription
    Type: You can filter subscriptions by Activation Subscription or Instance
    Subscription.

But that will not solve all your problems also. In conclusion, this is a hard and time-consuming task.

And sometimes what I need is just to have a quick
overview of all these filters.

BizTalk Filter Finder Tool

“BizTalk Filter Finder Tool” is a simple tool that
aims to simplify the process for better understand and maintain solutions based
on content-based routing. By allowing you to have a quick overview of all the
artifacts, send ports or orchestrations that have filters associated.

BizTalk Filter Finder Tool

This tool will extend default BizTalk Server
capabilities transforming this tedious and sometimes complicate analyze a
little simple, easy and fast.

It way not be an amazing tool; it may not be beautiful
but for me is a timesaver tool.

Credits also to my team member at DevScope, Pedro Almeida that collaborated with me in the development of this tool.

Download

You can download BizTalk Filter Finder Tool from:
BizTalk Filter Finder ToolBizTalk Filter Finder Tool
GitHub

The post BizTalk Filter Finder Tool appeared first on SANDRO PEREIRA BIZTALK BLOG.