Wednesday, July 04, 2012 5:05 PM Mikael Sand

BizTalk and empty files

There are a lot of things I do not know about BizTalk. The list is getting shorter but here is something I found.

I was trying to verify a flow within a known environment. Everything else seemed to work apart from this one flow. A technician submitted files to a directory and the file was picked up. However it did not show up on any tracking; neither the basic BizTalk tracking nor our BAM-implementation noticed the file.

The files was picked up and I verified that the file was picked up by BizTalk. I could not submit the file myself as I did not have access to the path.

After a while I remembered to check to log on the other BizTalk node in the cluster and then it became clear. A simple warning said: “The FILE receive adapter deleted the empty file "\\Server\Share\testfile.txt" without performing any processing.” I have to admit that I did not know that. It is actually a “know issue

What happens is that the file is picked up but as the technician just submitted files using the old Right-click + New the file is empty. BizTalk does not process empty streams as it were and the file is deleted without any trace in the tracking.

Here’s a tip

In some scenarios you might receive an empty file to start a flow within BizTalk. Perhaps some system is telling BizTalk “That data you’re so interested in is done”. Make sure that file contains some data. Perhaps just a repeat of the file name or the letter “M”.

Filed under: , ,


# re: BizTalk and empty files

Thursday, July 05, 2012 4:29 PM by Dan Rosanova

Good to know Mikael!  I have yet to see this myself, but I am sure I will sooner or later.

# re: BizTalk and empty files

Thursday, July 05, 2012 10:41 PM by Colin Dijkgraaf

I had a similar scenario with an empty file, however it was via an FTP receive location and a flat file pipeline which and the FTP adapter rather than ignoring it like the FILE adapter does try and process it and throws an error (no disassembler stage recognises the document).

Mikael: Good to know!

The client actually wanted the file to process and mapped to an XML document (which basically just had the summary of zero rows) and sent out as normal.

To achieve this I created a BizTalk Decode pipeline component that checked to see if the length of the message was empty, and if it was put a configurable string into the message so that it wasn't empty anymore and could be parsed by the flat file disassembler.

# re: BizTalk and empty files

Tuesday, September 25, 2012 10:59 PM by Tarik


Please can you publish you source code solution, i've the same issue with zero byte file.


Mikael: I am sorry. I do not have any code regarding this issue.