Unfortunately, some good BizTalk Server resources have disappeared over these years, and they are no longer available. A lot of these resources are custom adapters. So today, I’m happy to bring back alive an “old” new adapter that, as far I remember, was initially published by 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.
I never faced this requirement on my projects, but I understand the need, and several community members have already reached out to me regarding this requirement.
As Nino mentioned in his blog post, sometimes there is a need to integrate systems that send empty files (zero bytes). He found that need in many big infrastructures that use this method to warn the destination system that the transmission is ended. For example, during AS400 file transmission, where these files are usually called tap files. I know other samples where a system places a file in a shared folder every day. Regardless of this file is empty or contains data, it has to be processed.
The default BizTalk Server FILE Adapter file cannot process these types of files. It grabs and deletes the file from the source folder, but it doesn’t trigger any associated process. 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.
To resolve this “issue” that, in fact, is a behaviour by design according to Microsoft I decided to take the approach explained by Nino in his blog post and make use of:
And recreate and redesign that adapter with some improvements and rebrand it as: BizTalk Server FILE-Z Adapter. This adapter can be used as a Receive Adapter or as a Send Adapter.
Well, first of all, because it meant to mean File-Zero, but in reality, because I was a huge fan of Dragon Ball Z 🙂
If you want to install the BizTalk Server FILE-Z Adapter, you need to:
This will register the adapter to run under 32-bit host instances. To make it available also for 64-bits, you need to:
Now you just need to add this adapter to the BizTalk Server Administration Console:
THIS ADAPTER IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.
You can download the BizTalk Server FILE-Z Adapter from GitHub here: FILE-Z Adapter