BizTalk Server Orchestration - Enforcing file processing sequence

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > November 2004 > Enforcing file processing sequence





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Enforcing file processing sequence
Xerox

2004-11-19, 7:46 am

I have read many articles on the convoy patterns: uniform, non-uniform,
parallel etc. but they don't seem to solve a particular scenario I am facing.

I will be receiving messages through a file receive port and then loading
them in to a database. It is important that the files are loaded in order:
not the order that they are received, but the order indicated by an integer
flag that they will contain. E.g. the first file will be numbered 1, then 2
etc. But the order they arrive could be 2 then 1.

What pattern/technique should be used in this scenario? Presumably an
orchestration would check the number of the file against the last number
loaded in the database. If it was the next in sequence it would go ahead and
process it otherwise it would wait before checking again.
Hugo Rodger-Brown

2004-11-19, 7:46 am

The pattern that you are looking to implement is the "Resequencer" - see
http://eaipatterns.com/Resequencer.html

As regards implementing a resequencer in BizTalk - there are a number of
issues? Do you have an known "end condition", when you can be sure that you
have received all of the messages. I'll assume that you do, otherwise you'd
never know when to start updating the database?

One solution is to use the standard sequential convoy pattern, adding each
new message to a larger batch message. Using a relevant xpath expression you
could determine where to add each message within the tree - the
System.Xml.XmlNode class has both InsertBefore and InsertAfter methods that
would allow you to order the messages correctly (You might want to hand this
off to a .NET component rather than trying to do it all inline in an
expression shape.)

You'd then have to reprocess the elements (using a Loop shape) once they're
in the correct order, and send the database updates?

Hugo
http://hugo.rodger-brown.com


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com