BizTalk Server Void Adapter

BizTalk Server Void Adapter

We usually see two implementation cases when dealing with unwanted or obsolete messages:

  • They get suspended on BizTalk Server – not that common, at least in the long run. We may see this earlier when these types of messages are encountered.
  • or a common way to solve these situations is to create a send port to filter these types of messages and send them to a support folder in BizTalk Server hard drive or a shared location.

Of course, this last option should be considered as a backup plan that can work as intended if you have good control and clean best practices like creating a scheduling task that cleans these messages from the hard drive from time to time. Otherwise, your hard drive becomes full at some point, and more critical issues will arise.

BizTalk Server Void Adapter

The BizTalk Server Void adapter is a simple way to easily discard all unwanted messages from your BizTalk Server environments instead of getting suspended or sent to a hard drive support folder.

This custom send adapter for BizTalk Server discards outgoing messages – sends messages to nowhere – into the void! Without the need for external jobs (like scheduling tasks) or added cleaning concerns.

How to install it?

If you want to install the BizTalk Server FILE-RADITZ Adapter, you need to:

  • Access the BizTalk Server Void Adapter GitHub page and download the content of the folder executables.
  • Place the folder BizTalkVoidAdapter on any location on your BizTalk Server box. I will recommend to put it in:
    • C:Program Files (x86)
    • Note: if you put in any other path you need to modify the VoidAdapter.reg file
  • Access the folder and double-click on the VoidAdapter.reg file

This will register the adapter to run under 32-bit host instances. To make it available also for 64-bits, you need to:

  • Click Start
  • Type %windir%SysWoW64cmd.exe in the search box and press enter
  • Run the same adapter registry (.reg) file from this command prompt

Now you just need to add this adapter to the BizTalk Server Administration Console:

  • Open BizTalk Administration Console by pressing the Windows key to switch to the Start menu, type BizTalk Server Administration or BizTalk, click the BizTalk Server Administration option from the Search window.
  • In the console left tree, expand BizTalk Server Administration > BizTalk Group > Platform Settings and then Adapters.
  • In the Adapter Properties
    • In the Name box, type a descriptive name for this adapter.
      • Void
    • In the Adapter combo box, select the adapter from the drop-down that you want to add.
      • Void
    • In the Description box, type a description for the adapter (this is optional).
      • The BizTalk Server Void adapter is a simple way to easily discard all unwanted messages from your BizTalk Server environments instead of getting suspended or sent to a hard drive support folder.
  • Click OK to complete the process of adding the adapter.

Note: If you want to use the Event Viewer to track/log the discarded messages you should first create the Log Name and Log Source. This way the tracking data will not be registered in the Application Log but instead in a custom log. To do that you can use the PowerShell provided on the runtime folder: mngt-Create-Event-Source.ps1.

Where can you use it?

This version available on GitHub is currently compiled on .NET 4.6 and optimized for BizTalk Server 2020. Nevertheless, you can take this code and compile it in other versions of .NET and BizTalk Server. It will be 100% compatible.

One of the first adapters made with this concept was created by Tomas Restrepo back in 2004 called BizTalk 2004 Null Send Adapter but you can also find similar ones like WCF-NULLAdapter.

Download

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

You can download the BizTalk Server Void Adapter from GitHub here:

The post BizTalk Server Void Adapter appeared first on SANDRO PEREIRA BIZTALK BLOG.

FILE-RADITZ Adapter: File adapter that ignores empty (zero bytes) files

FILE-RADITZ Adapter: File adapter that ignores empty (zero bytes) files

Recently I developed a custom file adapter called FILE-Z adapter that I blogged on the BizTalk360 blog. This is an adapter created from the original idea of my dear friend Nino Crudele. It is a custom File adapter capable of reading empty files.

You can see his original blog post here: BizTalk and zero byte file. And you can download the FILE-Z adapter here: FILE-Z adapter GitHub page.

But while I was searching about this adapter, I found an interesting blog post from Yan (Pamela) Yang where she described a different scenario. Some systems can create empty files without locking them. Then, they grab the files again and write some data to them. However, this behavior may cause problems with the default BizTalk Server FILE adapter. For example, the adapter may grab the file AFTER the system creates the empty file, but BEFORE the system attempts to write to it, causing integration issues. Or, in other cases, we may not want to pick up that empty files.

You may also know that the native FILE adapter released with BizTalk grabs and deletes all zero-byte (empty) files without triggering any associated processes. Instead, it logs a warning or error saying that:

The FILE receive adapter deleted the empty file “dir:<folder><file-name>” without performing any processing.

This behavior, according to Microsoft, is by design. Though you can argue that it is not consistent how different adapters treat empty files, e.g., FTP adapter can transfer empty files with no problem.

The File-RADITZ adapter is, kind of, the arch-enemy of the File-Z Adapter. This adapter doesn’t pick up or process empty (zero-byte) files. Instead, it leaves the empty files in the original folder.

I decided to create or recreate this adapter based on Yan Yang scenario just for fun and for mentoring how you can create your custom File adapter by making use of:

  • DotNet File Adapter sample source code that was available on previous versions of the BizTalk Server SDK

This adapter can be used as a Receive Adapter or as a Send Adapter.

Why the name File-RADITZ?

Well, I named the other adapter FILE-Z because it meant to mean File-Zero, but in reality, because I was a massive fan of Dragon Ball Z :). As I mentioned before, this adapter is, kind of, the arch-enemy of the File-Z Adapter. So, making the idea for a better name, I named it based on a memorable Dragon Ball villain: Raditz, that was one of the first enemy encounters in Dragon Ball Z.

How to install it?

If you want to install the BizTalk Server FILE-RADITZ Adapter, you need to:

  • Access the FILE-RADITZ Adapter GitHub page and download the content of the folder executables.
  • Place the folder BizTalkFileRADITZAdapter on any location on your BizTalk Server box. I will recommend to put it in:
    • C:Program Files (x86)
    • Note: if you put in any other path you need to modify the StaticAdapterManagement.reg file
  • Access the folder and double-click on the StaticAdapterManagement.reg file

This will register the adapter to run under 32-bit host instances. To make it available also for 64-bits, you need to:

  • Click Start
  • Type %windir%SysWoW64cmd.exe in the search box and press enter
  • Run the same adapter registry (.reg) file from this command prompt

Now you just need to add this adapter to the BizTalk Server Administration Console:

  • Open BizTalk Administration Console by pressing the Windows key to switch to the Start menu, type BizTalk Server Administration or BizTalk, click the BizTalk Server Administration option from the Search window.
  • In the console left tree, expand BizTalk Server Administration à BizTalk Group à Platform Settings and then Adapters.
  • In the Adapter Properties
    • In the Name box, type a descriptive name for this adapter.
      • FILE-RADITZ
    • In the Adapter combo box, select the adapter from the drop-down that you want to add.
      • FILE-RADITZ
    • In the Description box, type a description for the adapter (this is optional).
      • BizTalk Server File Adapter that is able to process all files except empty (zero byte) files.
  • Click OK to complete the process of adding the adapter.

Where can you use it?

This version available on GitHub is currently compiled on .NET 4.7.2 and optimized for BizTalk Server 2020. Nevertheless, you can take this code and compile it in other versions of .NET and BizTalk Server. It will be 100% compatible.

Download

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

You can download the BizTalk Server FILE-RADITZ Adapter from GitHub here:

The post FILE-RADITZ Adapter: File adapter that ignores empty (zero bytes) files appeared first on SANDRO PEREIRA BIZTALK BLOG.

BizTalk Server Community Extensions Utility Packs GitHub Repository

BizTalk Server Community Extensions Utility Packs GitHub Repository

During the last years I developer and make it available several BizTalk projects like tools, components (functoids, adapters, …) or samples on several platforms like CodePlex, Microsoft MSDN Code Sample or Microsoft TechNet Gallery. And because CodePlex shut down last year, many people were asking me if I will make it available that existing CodePlex projects on GitHub.

Well, I’m happy to announce the BizTalk Server Community Extensions Utility Packs GitHub Repository where I will make it available all my BizTalk Server related community projects or samples.

BizTalk Server Community Extensions Utility Packs GitHub Repository

Initial, my intention was to start to contribute into the Microsoft Integration Repository on GitHub and put everything there but I found out they have several restrictions and that will not be practical or possible… so, I decided to create a repository where everyone can easily contribute and be a central community place for any kind of BizTalk Server Resources:

  • Sample Projects
  • Custom Adapters
  • Custom Pipeline Components
  • Custom Pipelines
  • Schemas
  • Custom Functoids
  • Tools
  • SQL and/or PowerShell Scripts
  • PowerPoints
  • and so on

The main goal is for this repository to be a central public repository for Microsoft BizTalk Server open source community resources.

For now, it has available:

  • BizTalk Mapper Extensions UtilityPack for BizTalk Server 2010, 2013, 2013 R2 and 2016
  • BizTalk Mapper Extensions Functoid Wizard for BizTalk Server 2010
  • Microsoft Message Queuing Testing Tool

Soon, I will be adding more projects and samples and create some documentation regarding the projects available and credits to the authors.

JOIN ME IN THIS INITIATIVE! And add your projects to this common repository.

BizTalk Server Community Extensions Utility Packs GitHub Repository:
BizTalk Server Community Extensions Utility Packs GitHub Repository
GitHub

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.