by stephen-w-thomas | Apr 27, 2006 | Stephen's BizTalk and Integration Blog
I just wanted to help get the word out about the BizTalk User Group in Bangalore India. It was set up and ran by MVP Lakshmi Murthy
It looks like she has a lot of great things planned including contests with prizes!
Get more information at the BizTalk User Group India Forum.
by stephen-w-thomas | Apr 18, 2006 | Stephen's BizTalk and Integration Blog
Carlos Medina has created a functoid that can be used to extract context values from a message inside a map!
This is a very common problems and this approach is something I didn’t really consider.
Make sure you check out his post. He has sample code and the solution for download.
by stephen-w-thomas | Apr 3, 2006 | Stephen's BizTalk and Integration Blog
In a past edition of The BizTalker, I talked about how easy it is to use custom XSLT inside the BizTalk Mapper to sort data. Sorting data inside the map can be doing using inline XSLT like this:
<xsl:for-each select=”Record”>
<xsl:sort select=”Id” data-type=”number” order=”ascending”/>
<xsl:element name=”Customers”>
<xsl:element name=”Id”><xsl:value-of select=”Id” /></xsl:element>
</xsl:element>
</xsl:for-each>
Sometimes sorting just is not enough. What if you also needed to group your data and break it up into single messages? This can be done several different ways including using xpath, .net components, or something external to BizTalk all together; with none of them really being ideal.
Another non-ideal way to accomplish grouping and debatching is to use pure BizTalk Messaging! Yes, pure messaging can group and debatch your data. Now, it is a little strange and takes a few hops through the message box, but it is a relatively simple solution to implement in a short amount of time.
So, how does it work?
Pass 1 will apply a map on the Receive Port to sort the data. The Send Port will apply another map to group the data.
The grouping map using two Functoids. One determines if the current record and the past record have the same Id. The second does the grouping.
The code in these Scripting Functoids looks like this:
True / False
string newNode = “”;
string pastValue = “X”;
public string MakeNewNode(string currentValue)
{
if (pastValue != currentValue)
{
pastValue = currentValue;
newNode = “true”;
}
else
newNode = “false”;
return newNode;
}
Grouping
<xsl:template name=”GroupByID”>
<xsl:param name=”param1″/>
<xsl:param name=”param2″/>
<xsl:if test=”$param1=’true'”>
<xsl:element name=”Group”>
<xsl:for-each select=”//Customers[Id=$param2]”>
<xsl:element name=”Customer”>
<xsl:element name=”Id”><xsl:value-of select=”Id”/></xsl:element>
<xsl:element name=”Name”><xsl:value-of select=”Name”/></xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:if>
</xsl:template>
Pass 2 will apply an envelope to split the data inside the Receive Port and publish single messages to the message box.
Download the Sorting, Grouping, & Debatching Sample Code.
See the ReadMe.txt for set up information. Also note that I needed two projects for this solution. That is because the envelope schema needs to be in a separate project due to the way pipelines read the schema collections.
by stephen-w-thomas | Mar 27, 2006 | Stephen's BizTalk and Integration Blog
It’s a great day in world of BizTalk!
BizTalk Server 2006 is now available for download on the MSDN Subscribers Download site!
Also available are the SWIFT, RosettaNet, HL7, and HIPPA Accelerators as well as the Enterprise Application Adapters.
by stephen-w-thomas | Mar 21, 2006 | Downloads
This tool can help with importing and exporting policies and vocabularies in BizTalk Server 2004. This tool supports the use of a configuration file to limit what is imported and exported. This should also work for BizTalk 2006.
Get more information from the original blog post on this topic: http://www.biztalkgurus.com/blogs/biztalk/archive/2006/03/21/BizTalk-Server-2004-Rules-Engine-Deployment-Tool.aspx
by stephen-w-thomas | Mar 20, 2006 | Stephen's BizTalk and Integration Blog
Find yourself running the Rules Engine Deployment Wizard over and over again to export and import policies and vocabularies? Looking for a simple push button approach to move a full configuration from one server to another? My simple Rules Engine Deployment Tool will help with these common tasks.
This tool will do the following:
- Export all your policies and vocabularies
- Export your most recent policies with dependant vocabularies
- Export policies based on a configuration file with dependant vocabularies
- Import all policies and vocabularies in the Import folder
- Import polices and vocabularies based on a configuration file
Download: BizTalk Rules Engine Deployment Tool
How to use this tool:
Simply extract to your C drive, build, and run it. Vocabularies that reference other vocabularies are not really supported. That is, you will have to name the files so that the most referenced vocabulary is imported first or use a configuration file. Also note that the process is not transactional. So, if something fails the import will stop in the middle. I have included some sample policies, vocabularies, and a configuration file so you can see how to use them.
The main purpose of this tool is to move one full set of rules from one server to another server although using the configuration file you can do just about anything you like.
I have not tested this with BizTalk 2006, but I would guess it would work.
by stephen-w-thomas | Mar 14, 2006 | Downloads
This sample shows how to modify a BizTalk Web Service to submit Xml Documents into BizTalk and route them using direct binding. The key to routing the message submitted by the Web Service is to make sure the Receive Port uses the Xml Disassembler pipeline.
This sample will work with BizTalk 2006 and BizTalk 2006 R2.
Get more information from the original blog post on this topic: http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2006/03/14/how-to-use-soap-to-submitt-xml-documents-into-biztalk-server.aspx and http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2006/03/14/working-with-untyped-web-services-in-biztalk-server.aspx
by stephen-w-thomas | Mar 13, 2006 | Stephen's BizTalk and Integration Blog
Creating an Untyped Web Service will allow you to easily submit Xml Documents into BizTalk through the web service. Make sure you check out my previous post on this topic.
Create the Web Service
1. Run the Web Service Publishing Wizard
2. Select “Publish Schema as A Web Service”
3. Delete “WebService1”
4. Right-Click on BizTalkWebServce, select Add Web Service
5. Right-Click on WebService1, select Add web method, One-Way
6. Right-Click on Request, select Schema Type
7. Select any dll with a schema, select any schema
8. Select next and fill out any other required information
9. Make sure you select Create Receive Port otherwise you’ll have to do this manual
Edit the Web Service
1. Open the newly created web service
2. Edit the web method signature to look like this:
public void WebMethod1(System.Xml.XmlDocument part)
3. Look for the inParms line it should look like this:
Microsoft.BizTalk.WebServices.ServerProxy.ParamInfo[] inParamInfos
4. Change the TypeOf to be System.Xml.XmlDocument
These same steps should work for BizTalk 2004 as well.
by stephen-w-thomas | Mar 13, 2006 | Stephen's BizTalk and Integration Blog
You probably know about untyped messages inside an Orchestration (that is, messages treated as Xml Documents rather than typed schema). Wouldn’t it be nice to have an untyped web service to submit messages into BizTalk?
How would this make life easier?
You could have one web service to receive all your different message types. Then, use direct binding and content based routing to get your messages to the correct destination.
This will not work for all scenarios. But, it can greatly increase your flexibility when submitting messages into BizTalk through a web service by allowing all external systems to call the same web service.
Download the sample code below that shows how easy it is to modify an existing BizTalk Web Service to accept Xml Documents rather than a typed message. The key to routing the message submitted by the Web Service is to make sure the Receive Port uses the Xml Disassembler pipeline. This will promote the message type property that can be used for routing.
As with any direct binding solution, extra care must be used to make sure you do not get into an endless loop. In the sample below, I use Message Type and Receive Port Name Exists to make sure only messages published by a receive port are routed to the Orchestration.
Download: Xml Documents to BizTalk via SOAP Sample
This sample was built using BizTalk 2006 using Visual Studios 2005. See the ReadMe.txt for set up information.
by stephen-w-thomas | Feb 28, 2006 | Downloads
Using Self Correlation, the Start Orchestration Shape, and Passing Configured Ports it is easy to get messages back into an Orchestration after it has been processed by another process. This sample shows how to Start two different Orchestrations and receive a response message without any Correlation Set to configure.
This sample should work for in BizTalk 2004 and BizTalk 2006.
Get more information from the original blog post on this topic: http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2006/02/28/working-with-start-orchestration-shapes_2c00_-self-correlated-ports_2c00_-and-configured-port-parameters.aspx