ESB Toolkit: ESB Dispatcher Disassemble Pipeline Component

One of my favorite aspects of BizTalk is that there is always something new to learn. I have seen the ESB Dispatcher Disassemble component and I know it can be used to debatch an XML file and execute an itinerary. What I did not know is that it can be used to route a single message to multiple recipients. All you need to do is add a resolver for each destination endpoint to the routing service in the itinerary. The ESB Dispatcher Disassemble will generate one message for each configured resolver.

The one downside is that using this component can limit your options for selecting an itinerary. Since this is a disassemble stage component and it executes the itinerary, you need to select your itinerary in the decode stage. This means that none of the message context properties will be promoted and will not be available to the context resolver or the BRE resolver. If you can live with the limitations or are willing to build a custom decode stage component to assist with selecting the itinerary, the ESB Dispatcher Disassemble component is a relatively simple way to route a message to multiple destination endpoints using the ESB Toolkit.

2014 Favorite Books

I am a little late with my favorite books list for 2014, but better late than never. Right? Unfortunately I did not get to read as many books as would have liked this past year. Last Year I mentioned I wanted to get into Big Data but that did not happen as planned. Instead I spent my reading time learning about APIs and distributed systems. As always, none of the links below are affiliate links. I link directly to the publisher for ebooks and to Amazon for paper books as that is where I make my own purchases.

Favorite Books 2014

  • RESTful Web APIs - This is the first book I have read on REST APIs that provided practical advice on building services using hypermedia.
  • Designing Evolvable Web APIs with ASP.NET - Similar to the previous title, this book provides lots of practical advice for building hypermedia APIs using the ASP.NET Web API framework.
  • Understanding Computation - I have not read anything on the theory of computation or language design since I was in school. I really enjoy this book as it provides a nice introduction and review of those two topics and presents them in a way that does not require a computer science degree to understand.
  • Lean from the Trenches - This book was all about practical advice on using Lean principles to manage software projects. I really like the way the author uses retrospectives on a real project as the examples to show what works and what does not.

The list is a little short this year. I hope to get back into my normal reading groove for 2015.

Install ESB Portal Database on a Named Instance

On my current project I had a requirement to install the ESB Toolkit exception portal database on a named instance of SQL Server. This particular client was sharing a single physical server among multiple database applications for their development environment. Some of these applications, like BizTalk, make changes to the SQL Server configuration settings that are optimal for normal database operation. To isolate these applications they created a named instance for each application that required special configuration settings.

There are plenty of guides for installing and configuring the ESB exception portal out there already so I will not replicate those instructions here. If you need a guide, I am a fan of Configure BizTalk ESB Toolkit 2.2 Management Portal. Installing the portal on a named instance is not complicated but I have not seen it documented. It was not obvious to me until I read through the batch and PowerShell installation scripts.

When you run the Management_Install.cmd batch script, add an argument to the end that specifies the name of the SQL Server instance you wwould like use for the portal database. So if you have a server named devsql with an instance named bts the command would look like this:

.\Management_Install.cmd devsql\bts

The user running the script will need to have permission to create new databases in the named instance. Assuming the prerequisites and security have been configured correctly the script should install the portal database to the specified SQL Server instance.

If you would rather run the PowerShell script directly, the SQL instance name is the second argument to the script. The first argument to the PowerShell script is the IIS website ID for the ESB web services. Using the same values as before, the command would look like this:

.\Management_Install.ps1 1 devsql\bts

2013 Favorite Books

I enjoyed writing up a post about my favorite books at the end of last year so I thought it would be fun to do it again. Maybe I will turn this into an annual event. This year I managed to read 21 books and 14 research papers. Note these are not affiliate links and I will get absolutely nothing if you click on them.

Favorite Books 2013

  • SOA with REST - This book does a great job of mapping the REST architectural style to SOA patterns. It demonstrates how to build SOA solutions using REST for the implementation.
  • Building Hypermedia APIs with HTML 5 and Node - Don’t let the title fool you. This book is full of lots of great information on building APIs with hypermedia. I don’t know (and don’t care) much about Node.js and I didn’t have any trouble following the code samples.
  • SOA Patterns - This book is nice collection of SOA patterns and anti-patterns. I like the fact that the patterns are described in a way that isn’t specific to a single technology stack.
  • Practical Project Initiation - While I am a technologist and not a project manager I still found some great tips on how to start a project off on the right foot.
  • Bad Data Handbook - This is collection of essays on data problems and how to work around them. A couple of the scenarios presented were things I have experienced in my own projects.
  • Dune - This was my fun reading for the year. I read all six of Frank Herbert’s Dune novels. Overall I enjoyed the story though it gets a little preachy towards the end of the series.

For 2014 I hope to get into Big Data and some related subjects like functional programming. I have been taking advantage of the holiday sales to stock up on books to read in the coming year. Until then.

BizTalk 2010 EDI: Configuring ISA11 as Repetition Separator

Had an interesting EDI issue that occurred recently with how BizTalk 2010 parses the value for ISA11. In older EDI versions, 4010 and below I believe, ISA11 was called the “standards identifier” and was always set to “U”. Newer versions of EDI added a new delimiter called the “repetition separator” and repurposed ISA11 to define what this character would be in an interchange.

In the event we were seeing errors like this:

Error: 1 (Miscellaneous error)
    16: Invalid Control Standard Identifier

Error: 2 (Field level error)
        SegmentID: ISA
    Position in TS: 1
    Data Element ID: ISA11
    Position in Segment: 11
    Data Value: ^
    7: Invalid code value

BizTalk should automatically parse this correctly based on the EDI version defined in the schema but in my case it was defaulting to the old behavior even though the version in the schema was 4060. We even tried to setting the UseIsa11AsRepetitionSeparator property on the EDI pipeline to True but BizTalk was still parsing it like a 4010 transaction.

We fixed this using the following steps:

  1. Open the party properties and ensure the Local BizTalk processes messages received by the party or supports sending messages from this party option is checked.
  2. Open the agreement properties and choose the outbound settings tab.
  3. Select the Envelopes option from the tree view on the left.
  4. Under ISA11 usage select the Repetition separator option.
  5. Go back to the party properties and uncheck the Local BizTalk processes messages received by the party or supports sending messages from this party option.
  6. Restart the host instances used to receive EDI transactions to apply the changes.

This is what my Envelopes configuration looks like:

Envelope settings

I do not understand why changing the outbound settings would have any impact on how BizTalk parses an inbound interchange but it works. At some point I will have to see if this is still an issue in BizTalk 2013.

Be Careful When Using the %SourceFileName% Macro

One of my team members ran into a interesting problem when using the %SourceFileName% macro in a send port. In this scenario the client was receiving EDI data in files and they wanted a copy of the original data sent to an archive folder using the original file name. During testing we would occassionally see the following warning messages in the event log:

"The FILE send adapter cannot open file C:\Work\BizTalk\SourceFileNameTest\Out\EDI_X12_864 - Copy.edi for writing.
Details: The file exists."

What was happening is sometimes a single EDI file (interchange) will contain multiple transactions. By default, BizTalk will split the interchange into individual transactions in the EDI pipeline. Since all the transactions came from the same source file, each transaction will contain the same value in the FILE.ReceivedFileName context property. This is the context property that the macro uses to name an output file. When BizTalk would attempt to write the transactions to the archive folder, the first transaction written would succeed and the remaining transactions would trigger the file exists warning.

To work around this behavior you can do one of the following:

  1. Add some sort of unique identifier to the file name. For example instead of using just %SourceFileName% you could combine it with %MessageID% to generate a unique file name for each transaction.

  2. Configure the file adapter to allow appending to an existing file.

  3. Configure the EDI party agreement to preserve the interchange. This would keep all the transactions in a single message. In this case you would need to build additional functionality into your BizTalk application to manually split the interchange.

Viewing Remote CUPS Printers in Fedora 19

Who Moved My Cheese?

I found out the hard way that a number of things changed between Fedora 17 and Fedora 19. One thing in particular is using CUPS and IPP to automatically access remote printers. Due to my ignorance on some of the changes with systemd and firewalld it took me a lot longer than expected to get this working after upgrading to Fedora 19.

At home I have an old laser printer connected to a small server that is shared via CUPS. In the past getting this working from my laptop has been as simple as enabling mDNS and opening the IPP port in the firewall tool. In Fedora 19 this has changed a little bit. mDNS is now enabled by default so that part is easy. This leaves getting CUPS services properly configured and opening the correct ports with firewalld.

Configuring CUPS

In Fedora 19, CUPS services have been split into a handful of separate services. I had to execute the following commands to get CUPS fully working:

sudo /usr/bin/systemctl enable cups.service
sudo /usr/bin/systemctl enable cups-browsed.service

These two commands start the relevant CUPS services. The cups-browsed.service is the new service that finds and registers printers on the network.

Configure Firewalld

Now that the CUPS services are up and running we need to open the IPP client port in the firewall:

sudo /usr/bin/firewall-cmd --permanent --add-service=ipp-client

Once both of these steps have been completed, you should be able to see your remote CUPS printers.

BizTalk Mapping with Multiple Outputs Gotcha

Default Visual Studio XSLT template

This gotcha was something that caused me a fair bit of wasted
time the other day. I was building a map with two destination schemas.
Since the map had some complex looping and grouping requirements I
decided to build the map using a custom XSLT script. (Nowadays I build
almost all my maps using XSLT but that’s a story for another time.) The
map ran perfectly using the Visual Studio map testing tool but when it
was executing in the orchestration I kept getting the following error,
“Output of the transform does not match the expected number of output

After a few hours of hair-pulling frustration and a couple of test
projects I finally figured out the source of the problem. If you use
File -> New -> File -> XSLT File in Visual Studio, by default it sets
the indent attribute on the XSLT output element. For reasons unknown
having the indent turned on causes this strange error to occur. Removing
that attribute caused the error to disappear and the map executes as

Hopefully this will save somebody else some time and hassle.

All Good Things Must Come to an End

The “Distributed Weekly” post this week marks the four year anniversary
of my link blog covering integration and distributed systems. This will
also mark the last “Distributed Weekly” link post. After four years I
have decided it is time to hang it up. At this point there are better
ways to find interesting links out there. There are plenty of computer
algorithms capable of finding topical content faster than I can research
and curate links and they are getting better all the time. (My current
favorite is Prismatic) I have enjoyed curating links over the past
four years but I am ready to move on and use the time for some personal

I will continue to blog here and I am hoping that some of my new
projects will result in more long-form posts.

For those who are interested I will still post links to my Twitter
and Google+ accounts on occasion.

Thanks for reading.

Distributed Weekly 208




Distributed Systems





* Courtesy of Alvin Ashcraft’s Morning Dew.