BizTalk provides some samples and best design patterns which are helpful to create new BizTalk application.
You can get these sample applications in BizTalk development server at below location:
C:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Samples
Bellow are brief description about these design pattern.
Aggregator is the pattern of receiving information (message) from multiple sources and consolidating it into a single message. For an example of this pattern, see Aggregate.odx in Aggregator (BizTalk Server Sample).
Calling Pipelines from an Orchestration
You can call send and receive pipelines from your orchestrations. This allows the reuse of pipelines and helps maintain the decoupling of an orchestration from the pipeline stages. For an example of this pattern, see Aggregate.odx in Aggregator (BizTalk Server Sample). Another example is CMP.odx in Composed Message Processor (BizTalk Server Sample).
Composed Message Processor
In this design pattern we receive file in bach or multiple file at a time then debatch this file into multiple files and also before sending to send port its asseble all files into single file.
Composed Message Processor is the pattern of processing individual items from an aggregated or batched interchange message. For an example of this pattern, see CMP.odx in Composed Message Processor (BizTalk Server Sample).
This pattern is basically used for message transaction on the basis of Message context properties. e.g. on send port filter you can add ReceivePort name contest property (BTS.ReceivePortName) to to send all file which is received from specific Receive Port.
Content-Based Router is the pattern of determining the recipient of a message based on some part of the message content. For an example of this pattern, see CBRSample (BizTalk Server Sample).
Dynamic Router is the pattern of determining the destination address as well as the transport protocol based on the result of message processing. You can use a dynamic send port or a Role Link shape to implement this pattern. For an example of this pattern, see ReceiveSend.odx in SendMail. Another example is SupplierProcess.odx in PartyResolution (BizTalk Server Sample).
BizTalk Server allows you to designate automated handling of messaging failures as an alternative to the default behavior of placing failed messages in the Suspended queue. You can route failed messages to a subscribing port for reporting or processing. For an example of this pattern, see ResubmitLogic.odx in Error Handling (BizTalk Server Samples Folder).
Exception Handling and Compensation
You can use an exception handler and a Throw Exception shape or an Expression shape for exception handling. For example, you can place the following code in the Expression shape to throw the exception:,
excp = new System.Exception(); throw(excp);
You can use a compensation block and a Compensate shape to perform the compensation on the transactions that have been committed. For an example of this pattern, see UpdateContact.odx in Compensation (BizTalk Server Sample). Another example is in Custom Exceptions.
Message Broker is the pattern of determining the destination of a message and still maintaining control over the message flow. For more, seeProcessing in the OrderBroker Orchestration.
The Message Filter pattern selects messages meeting particular criteria for processing. You can implement this pattern by adding the filter expression to an activated Receive shape. For more information, see Using Filters With the Receive Message Shape.
The Message Translator pattern converts a message from one form to another form. You can implement this pattern by using a BizTalk Mapping with a Transform shape in an orchestration. For an example of this pattern, see HelloOrchestration.odx in HelloWorld (BizTalk Server Sample).
The Parallel Convoy pattern enables multiple single items to join together to achieve something that an individual item cannot accomplish by itself. The set of related items can arrive in any order, but BizTalk Server must receive all of them before starting the process. For an example of this pattern, see http://go.microsoft.com/fwlink/?LinkId=56035.
Scatter and Gather
The Scatter and Gather pattern enables messages to be sent to multiple recipients and messages to be received back from each recipient. You can implement this pattern by using the Splitter pattern and the Aggregator pattern. You use the Aggregator pattern to assemble the results from using the Splitter pattern and put them under a Parallel Actions shape. For an example of the Splitter pattern, see SDK sample named Implementing Scatter and Gather Pattern at http://go.microsoft.com/fwlink/?LinkId=65185.
The Sequential Convoy pattern enables multiple single items to join together to achieve something that an individual item cannot accomplish by itself. A sequential convoy is a set of related items that have a predefined order. Although the items do not have to be exactly the same, BizTalk Server must receive the items in a sequential order. For an example of this pattern, see http://go.microsoft.com/fwlink/?LinkId=56035.
The Splitter pattern takes a single message and splits it into multiple messages.
Suspend with Retry
The Suspend with Retry pattern enables the orchestration to suspend a message when there is an error. The suspension occurs within a loop so that the orchestration suspends, asks for intervention, and then retries the operation a fixed number of times.