April 2005 - Posts

BTS 2004 Flat File Issues

There are lot of inherent nittygrittys and hack that you need to know when you have Flatfiles with Records and the root node both being ended by CRLF's

I did look around quite a bit before I finally came across this link

Flat file Schema Tutorial 1

Flat file Schema Tutorial 2

and Oh ! to prevent empty nodes from not occuting you need to set Suppres Empty Nodes property to TRUE

Choosing between Distinguished vs. Promoted Properties

In Biztalk you can promote a property as either distinguished or promoted properties. Choosing what to use is tricky

Distinguished fields

In general use Distinguished fields if you want to just use them in Orchestration

Summary

- No restriction on field length

- No participation in Routing

- No seperate property Schema

- Not accesible by std pipeline components
( workaround exists in cutom pipeline components “http://schemas.microsoft.com/BizTalk/2003/btsDistinguishedFields” namespace using XPath on their name

Promoted Properties

These are generally used with Routing

Summary

- Used in publish and subscribe in the Msgbox

- Field Restictions ( 255)

- Seperate Property schema

- Restricted in the XSD types support compared to distinguished properties

ThumbRule

Use Distinguish properties as they are lightweight unless you need them for any special stuff like Routing ,Tracking ,Correlation or custom pipeline behaviour

Biztalk 2004 Naming Conventions

I have been looking around for a good Set of Biztalk naming conventions and I came acros this from Scott .

Biztalk 2004 Naming Conventions

Completed with discarded messages - Zombies

You have got this error from biztalk "Completed with discarded messages" and are wondering what that means you could be potentially seeing what in BTS buzz world is called a Zombie . A Zombie is usually a valid message or a response that is left without a subscription to process at that point in time . Though this one liner definition is quite crude explanation . If you are dealing with scenarios like Sequential convoys and batching you are likely to witness this especially when you have large amount of transactions and when your system is operating near to high load conditions ( that is when I have witnessed it the most, though there are scenarios for encountering zombies even under little or No load ) .


If you really want to learn more about Zombies read this Blog from Biztalk Core Engine Team


Now If your solution involves a while loop surrounding a listen with one branch having a receive and the other having a delay shape followed by some expression shape that sets the loop counter and controls the loop termination .You would more than likely see this scenario as delay could be triggered and the message could be delivered after.

Now the condition for delay and time out is we don't want to wait for a message forever . So we timeout after an interval (Tn) but this (Tn) is non-deterministic and is usually set to a small number.


For an app that we had increasing the delay from 10 Secs to 2 minutes( chosen at random)
did away with Zombie occurrences . I would also suggest decreasing the default retry of 5 minutes to a lesser value if you are in a aggregated scenario where you are collecting one message at a time. 2 minute looks like a large interval to wait for one message but keep in mind that this delay is not arithmetic and does not occur for each listen . Most often the message is already there to be consumed and this delay happens ONLY when there is no message to consume. In a stressed Biztalk box our scenario which is an EOD movement had given us a liberty of waiting an extra couple of minutes.



Another solution that works is after the loop is over to have another loop with the same correlation set(following) to drain these instances for a certain amount of time ( DRAINING ). You can do this before or after you send out the final message . in the latter case you can send these drained ones as a second message or log them as errors .

Also a WMI event is generated for a Zombie occurrence , I haven't hit across the details of the same .

Middleware Mantra - Contract First

When you are designing large middleware integeration efforts , it is quite easy to get into code first integerate later but From classic COM to Biztalk integeration it is always Contract First. Be it an IDL or a Schema . This is generally considered the best way to approch service design. The approach is to design schemas first then generate code from that.

More on Contract First approach ..
http://www.thinktecture.com/


http://www.iona.com/blogs/vinoski


Meanwhile I heard MS is planning to drop support for IDL . Remeber those good old COM days where you could cleanly differntiate the interface from the implementation
Sign the pettition to save IDL here

Biztalk 2004 Naming Conventions

I have been looking around for a good Set of Biztalk naming conventions and I came acros this from Scott .

Biztalk 2004 Naming Conventions

Unconstructed Message even when Constucted

Ok you get this

use of unconstructed message "Message Name" .

1) This means what the error message says you are using an unconstucted message in a send shape without creating it

2) You have indeed constucted the message - Biztalk still complains . Do you have parallel actions in your orchestration . Is it possible that you are using the message whihc was consturcted in a parallel shape and being used outside it. Now Aren't you glad Biztalk complained !