| Amit's profileAll about BizTalk Server...PhotosBlogLists | Help |
|
March 21 Flat Files Debatching in BizTalk 2006Flat files are extensively used in BizTalk Projects, In this article I will be talking about some of the scenarios in which Flat files are used
In this example the Flat file which I will be taking is of the following structure:
Case 1 : Message only scenario Input Flat File --> OutPut Flat File Your Flat file contains a number of records each separated by some delimiter character. For this you can have a schema like the one below, created from the “Flat File Schema Wizard” With the “Max Occurrence” properties of Customers Details set to “unbounded” Observation: When this type of schema is used in the dissembler part of the Receive Pipeline, the Flat File is not divided into fragments and a single Xml message is created after the message passes through the receive Pipeline.
So after this
Error Handling If any of the record is not according to Schema, then the same message is also there in its original format at the send Location. No messages suspended.
Case 2 Message Only Scenario Input Flat File --> Output N Flat or N Xml Files or 1 Flat or 1 Xml File In this case the Flat file schema is slightly different and the “CustomersDetails” Record is not set to be “Unbounded”. In this case BizTalk will process the Flat file in a different way. Observation: In this case there will be N messages created (not one as in the Case First). N = Number of records in Flat Files
So after this
Error Handling
If any of the record is not according to Schema, then nothing happens and the record is appended to the Flat File in the second location. No messages suspended. If how ever you look at the xml messages formed after the receive Pipeline, the message is really Scrambled.
For ex.
Case 3 Orchestration Scenario Input Flat File --> Single Records to be consumed by Orchestration In this case we will see the following features with Flat Files
If we want to use individual records in a Orchestration from a Flat File We have to create a Flat File Schema with its Max occurrence set to 1
So if you have N records in a Flat File, then N Orchestrations instances will be created, passing one record to each of the Orchestration instance. Error Handling In this case the benefit is that if any one of the record in the Flat file is not according to the Schema expected, only that message is suspended, and all other messages are received by the Orchestration. Just set the following properties of the Flat file Dissembler
March 15 Integrating BizTalk Server 2006 R2 with WF & WCFWith the release of 3.0 there are some talks on the future of BizTalk server, how we will be integrating BizTalk with new technologies like WF and WCF in 3.0? And so Microsoft is coming up with BizTalk Server 2006 R2. In this article I will be focusing on some of the new features of BTS 2006 R2 which helps us to integrate BizTalk Server R2 with 3.0. These are some good article on When to use "Windows Workflow Foundation" and when to use "BizTalk Server" ? I am putting here a basic example in which BizTalk server is integrated with 3.0 (WF and WCF).
BizTalk Server 2006 R2 & Windows Workflow Foundation (WF) There are various ways in which we can communicate b/w BizTalk Server 2006 R2 and Windows Workflow Foundation.
Exposing WF as a Web Service hosted inside IIS
Hosting WF inside WCF Service
Consuming an Orchestration exposed as WS in WF
Hosting WF inside BizTalk server This option provides the simplest of the option to call WF from BizTalk. First, create any Workflow in Windows Workflow foundation. Don’t forget to strong name the assembly as we have to put it in the GAC (BizTalk picks dll’s from GAC). This WF assembly now needs to be called from a class which will then be used in the BizTalk. In this class just create the Workflow Runtime, create an instance of the WF and start it. So the flow of development will be: WF-à Class--à BizTalk Server Orchestration Also, if you want to pass any parameters to WF from BizTalk, the flow will be like this BizTalk -à Class-à WF As WF is executed in an asynchronous manner, you cannot pass the parameters back to the BizTalk in a synchronous manner, for this what you can have do is, First call the class from the Expression box in BizTalk. When ever the WF will complete, it will dump the information at Ftp, File, MSMQ etc and then have a Receive shape in BizTalk polling at the required location. You will have to consider Correlation and Sequential Convoy for this The following code an extract of the code which is ised in the Class
Exposing WF as a Web Service hosted inside IIS
First create the WF. You will be using some specific activities for exposing your WF as Web Service like WebServiceInput, WebServiceOutput. Publishing the WF as a WS is not that difficult as Microsoft has provided an option to publish. After publishing the WS, you can always use this WS in any application like ASP.NET, Windows Application and off course our BizTalk Orchestration also using SOAP, HTTP adapter.
This option is better as the WF then can be used by many application, and not only BizTalk. Also you can always scale the Web Server architecture.
This option has some advantages over the previous one, as we can take the advantage of Load Balancing Servers for the Web Service also.
BizTalk Server 2006 R2 & Windows Communication Foundation (WCF) Service
Microsoft is doing a lot of work on there WCF framework. They are marketing it as the technology for future.
And BizTalk is also not untouched from WCF. Microsoft is adding the following features in the BizTalk 2006 R2
There are still some issues on integrating BizTalk Server and Windows Workflow Foundation.
BizTalk a Server product is to integrate diverse applications (that’s why there are so many of those adapters coming every release As far as WF is considered, it can be used in small workflows within ASP.NET, Windows applications, and as a sub process to BizTalk workflows. Some good links on when to consider WF and when BTS
|
|
|