Know A Good BizTalk Blog? Win A Copy of Microsoft BizTalk Server 2010 Patterns

For those of you who do not know, one of the features of BizTalkGurus.com is the aggregate blog feed.  This feed goes back over 8 years and has over 8,000 posts. 

Since I started the BizTalk feed, I have expanded the aggregate feeds to include App Fabric and Windows Workflow.

About once a year, I review Google to see if I am missing any BizTalk Blogs that should be included in the aggregate feed.  It is that time of year again but this time I would like some help.

In doing so, I’ll be giving away a copy of Microsoft BizTalk Server 2010 Patters book by Dan Rosanova published by Packt Publishing.  This book is available from Packt and Amazon.

As a 2nd place prize, I will be giving away a copy of Pro Business Activity monitoring in BizTalk 2009 signed by BOTH authors! 

To enter, just post a link to a BizTalk related blog not currently included in my aggregate feed.  If you do not want to post a comment, just send me an email with the link.  Just make sure I can contact you if you win .  Take a look at the current blogs below included in the feed to see who is not included.

I will be picking two winners at random after Sunday May 6th.

Good Luck!

List of BizTalk blogs currently featured on BizTalkGurus.com
http://abdulrafaysbiztalk.wordpress.com/feed/
http://biztalkmessages.vansplunteren.net/feed/
http://blog.eliasen.dk/SyndicationService.asmx/GetRss
http://bloggingabout.net/blogs/wellink/rss.aspx
http://blogs.breezetraining.com.au/mickb/SyndicationService.asmx/GetRss
http://fehlberg.wordpress.com/feed/
http://msinnovations.wordpress.com/feed/
http://sandroaspbiztalkblog.wordpress.com/feed/
http://santoshbenjamin.wordpress.com/feed/
http://seroter.wordpress.com/feed
http://soa-thoughts.blogspot.com/feeds/posts/default?alt=rss
http://weblogs.asp.net/gsusx/rss.aspx
http://weblogs.asp.net/woutercrooy/rss.aspx
http://www.bizbert.com/bizbert/SyndicationService.asmx/GetRss
http://www.blogbiztalk.com/?feed=rss2
http://www.masteringbiztalk.com/blogs/jon/SyndicationService.asmx/GetRss
http://consultingblogs.emc.com/matthall/rss.aspx
http://biztalkbill.com/Rss.aspx
http://www.kriegermartin.de/wordpress/feed/en
http://blog.sabratech.co.uk/feeds/posts/default
http://www.quicklearn.com/blog/syndication.axd
http://blog.cnext.eu/feed/

http://feeds.feedburner.com/modhul/eSXP
http://feeds.feedburner.com/Bizknowledge/rss
http://feeds.feedburner.com/BeLogical-WritingsByJohanHedberg
http://feeds.feedburner.com/Bia-TheBiztalkIntelligenceAgency
http://feeds.feedburner.com/blogspot/bencops
http://feeds.feedburner.com/danielberg?format=xml
http://feeds.feedburner.com/dotrichard
http://feeds.feedburner.com/KentWearesBiztalkBlog
http://feeds.feedburner.com/modhul/eSXP
http://feeds.feedburner.com/SaravanaKumar
http://feeds.feedburner.com/TimRayburnsBlog
http://feeds.feedburner.com/wmmihaa
http://feeds2.feedburner.com/Commonality

http://geekswithblogs.net/cyoung/Rss.aspx
http://geekswithblogs.net/andym/Rss.aspx
http://geekswithblogs.net/paulp/rss.aspx   
http://geekswithblogs.net/asmith/Rss.aspx
http://geekswithblogs.net/leonidganeline/rss.aspx  
http://geekswithblogs.net/michaelstephenson/Rss.aspx
http://geekswithblogs.net/EltonStoneman/Rss.aspx

http://blogs.technet.com/b/jpierauc/rss.aspx
http://blogs.msdn.com/b/adapters/rss.aspx
http://blogs.msdn.com/b/gzunino/rss.aspx
http://blogs.msdn.com/b/neilth/rss.aspx
http://blogs.msdn.com/b/nabeelp/rss.aspx
http://blogs.msdn.com/b/skaufman/rss.aspx
http://blogs.msdn.com/b/biztalk_server_team_blog/rss.aspx
http://blogs.msdn.com/b/cvidotto/rss.aspx
http://blogs.msdn.com/b/ewanf/rss.aspx
http://blogs.msdn.com/b/biztalkcpr/rss.aspx
http://blogs.msdn.com/pkelcey/rss.xml
http://services.social.microsoft.com/feeds/feed/BizTalkServerTopDownloads
http://services.social.microsoft.com/feeds/feed/TechNetWikiArticles
http://services.social.microsoft.com/feeds/feed/BizTalkFeaturedContent

How BizTalk Maps Work – Deconstructing a map (Part 2)

How BizTalk Maps Work – Deconstructing a map (Part 2)

In this article we will use the basic mapping operations previously described, and analyze the decisions taken by the BizTalk mapping engine. Basically on this mapping problem there are two similar schemes, which we intend to map the source elements in their proper destination and for which we implemented the following challenges: Concatenate the first […]
Blog Post by: Sandro Pereira

Weekly Cloud Newsround 2012-17

Filtering the informative, insightful and quirky from the fire hose of cloud-based hype.

Google’s “Google Drive” has been leading the news this week, and has sparked off some debate about the data storage “In the Cloud”. LA Times has a nice comparison of the different storage options available, and also asks “Who owns your stuff in the Google Drive cloud?

Two more stores on the data storage side, Microsoft will bundle CommVault Simpana with Windows Azure “The new bundle, unveiled Monday, provides access to up to 62 TBs of cloud storage capacity along with CommVault’s Simpana 9 Express data protection capabilities for prices starting at about $50,000”. Also Aidmatrix Expands to the Microsoft Windows Azure Cloud to Enhance Its Disaster Response Platform.

Big data seems to be big business there is a nice overview of big data here. As for big data transfer, academics get a break with Microsoft waiving Azure bandwidth fees for research universities.

On the security side if you are working with Azure the new book from Packt “Microsoft Windows Identity Foundation Cookbook” should go on your shopping list.

I can’t decide if this is fun or serious, but the “Home Security System Using Kinect, Azure, Windows Phone and Windows 8” makes good use of emerging technologies. I wonder if they have a “Caught red-handed!” achievement

Calling Pipelines with custom property settings from an orchestration

In my previous blog post I explained how to execute pipelines from an orchestration using the default pipeline property settings.
Now I would like to show you how to call pipelines from an orchestration while configuring the pipeline with custom property settings. To achieve this the standard methods wouldn’t suffice.

First of all you’ll need to add some extra functionalities. Here’s my code to achieve this:


using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Data.SqlClient;
using System.Runtime.Serialization;

using Microsoft.XLANGs.Pipeline;
using Microsoft.BizTalk.PipelineOM;
using Microsoft.XLANGs.BaseTypes;
using System.IO;
using System.Reflection;
using System.Collections;
using System.Data;
using System.Text.RegularExpressions;
using Microsoft.XLANGs.RuntimeTypes;
using Microsoft.XLANGs.Core;
using MIME;
using System.Net;

namespace TP.BTS.GlobalFunctions
{

public class PipelineInstance
{
internal Microsoft.BizTalk.PipelineOM.Pipeline pipeline = null;

public static PipelineInstance CreateInstance(Type type)
{
PipelineInstance instance = new PipelineInstance();
instance.pipeline = (Pipeline)Activator.CreateInstance(type);
return instance;
}

public void ApplyInstanceConfig(String config)
{
try
{
using (Stream stream = new MemoryStream(Encoding.Unicode.GetBytes(config)))
LoadPerInstanceConfig(pipeline, stream);
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine(String.Format("{0}", e));
throw;
}
}

#region Implementation

private static void LoadPerInstanceConfig(Pipeline pipeline, Stream stream)
{
try
{
MethodInfo method =
typeof(Pipeline).GetMethod(
"LoadPerInstanceConfig"
, BindingFlags.NonPublic | BindingFlags.Instance);
method.Invoke(pipeline, new object[] { stream });
}
catch (System.Exception e)
{
System.Diagnostics.Debug.WriteLine(e);
throw;
}
}

#endregion
}

public static class PipelineManager
{
#region receive pipeline
public static ReceivePipelineOutputMessages ExecuteReceivePipeline(Type type, XLANGMessage message)
{
string EmptyConfig =
@"<Root
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<Stages />
</Root>"
;

return ExecuteReceivePipeline(type, EmptyConfig, message);
}

public static ReceivePipelineOutputMessages ExecuteReceivePipeline(Type type, String config, XLANGMessage message)
{
try
{
PipelineInstance pipeline = PipelineInstance.CreateInstance(type);
pipeline.ApplyInstanceConfig(config);
return ExecuteReceivePipeline(pipeline, message);
}
catch (TargetInvocationException e)
{
System.Diagnostics.Debug.WriteLine(e);
ThrowPipelineException(e);
throw;
}
catch (XLANGPipelineManagerException e)
{
throw;
}
catch (Exception e)
{
System.Diagnostics.Debug.Assert(false, String.Format("Unexpected exception: {0}", e));
System.Diagnostics.Debug.WriteLine(e);
throw;
}
}

public static ReceivePipelineOutputMessages ExecuteReceivePipeline(PipelineInstance pipeline, XLANGMessage message)
{
Microsoft.BizTalk.PipelineOM.Pipeline pipelineOM = pipeline.pipeline;

try
{
MethodInfo method =
typeof(XLANGPipelineManager).GetMethod(
"ExecutePipeline"
, BindingFlags.NonPublic | BindingFlags.Static
, null, new Type[] { typeof(ReceivePipeline), typeof(XLANGMessage) }
, null);
return (ReceivePipelineOutputMessages)method.Invoke(null, new object[] { pipelineOM, message });
}
catch (TargetInvocationException e)
{
System.Diagnostics.Debug.WriteLine(e);
ThrowPipelineException(e);
throw;
}
}
#endregion

#region send pipeline
public static void ExecuteSendPipeline(Type type, SendPipelineInputMessages pipelineinputmsg, XLANGMessage message)
{
string EmptyConfig =
@"<Root
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<Stages />
</Root>"
;

ExecuteSendPipeline(type, EmptyConfig, pipelineinputmsg, message);
}

public static void ExecuteSendPipeline(Type type, String config, SendPipelineInputMessages pipelineinputmsg, XLANGMessage message)
{
try
{
PipelineInstance pipeline = PipelineInstance.CreateInstance(type);
pipeline.ApplyInstanceConfig(config);
ExecuteSendPipeline(pipeline, pipelineinputmsg, message);
}
catch (TargetInvocationException e)
{
System.Diagnostics.Debug.WriteLine(e);
ThrowPipelineException(e);
throw;
}
catch (XLANGPipelineManagerException e)
{
throw;
}
catch (Exception e)
{
System.Diagnostics.Debug.Assert(false, String.Format("Unexpected exception: {0}", e));
System.Diagnostics.Debug.WriteLine(e);
throw;
}
}

public static void ExecuteSendPipeline(PipelineInstance pipeline, SendPipelineInputMessages pipelineinputmsg, XLANGMessage message)
{
Microsoft.BizTalk.PipelineOM.Pipeline pipelineOM = pipeline.pipeline;

try
{
MethodInfo method =
typeof(XLANGPipelineManager).GetMethod(
"ExecutePipeline"
, BindingFlags.NonPublic | BindingFlags.Static
, null, new Type[] { typeof(SendPipeline), typeof(SendPipelineInputMessages), typeof(XLANGMessage) }
, null);
method.Invoke(null, new object[] { pipelineOM, pipelineinputmsg, message });
}
catch (TargetInvocationException e)
{
System.Diagnostics.Debug.WriteLine(e);
ThrowPipelineException(e);
throw;
}
}

#endregion

#region Implementation

private static void ThrowPipelineException(Exception innerException)
{
ConstructorInfo constructor =
typeof(XLANGPipelineManagerException).GetConstructor(
BindingFlags.NonPublic | BindingFlags.Instance
, null
, new Type[] { typeof(String), typeof(Exception) }
, null);
throw (XLANGPipelineManagerException)constructor.Invoke(
new object[] {
innerException != null ?
innerException.InnerException.Message != null?
innerException.InnerException.Message : innerException.Message:
String.Empty, innerException });
}

#endregion
}
}

Now, here’s how to execute a receive pipeline using the custom property settings.
First create a variable of type TP.BTS.GlobalFunctions.PipelineInstance (called ReceivePipeline in my example). Also create a variable PipelineOutputMsg of type Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages.
This would be the code to execute the pipeline then:


ReceivePipeline =
TP.BTS.GlobalFunctions.PipelineInstance.CreateInstance(typeof(TC_FFRECEIVE.TC_FFRECEIVE));

ReceivePipeline.ApplyInstanceConfig(
@"<Root xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<Stages>
<Stage CategoryId='9d0e4103-4cce-4536-83fa-4a5040674ad6'>
<Components>
<Component Name='TP.BTS.PIPELINES.CustomXMLRECEIVECOMPONENT'>
<Properties />
</Component>
</Components>
</Stage>
<Stage CategoryId='9d0e4105-4cce-4536-83fa-4a5040674ad6'>
<Components>
<Component Name='Microsoft.BizTalk.Component.FFDasmComp'>
<Properties>
<DocumentSpecName vt='8'>FLATFILE.ORDERS.FF_ORDERS,FLATFILE.ORDERS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a8e07cee919011d4</DocumentSpecName>
</Properties>
</Component>
</Components>
</Stage>
</Stages>
</Root>"
);



PipelineOutputMsg = TP.BTS.GlobalFunctions.PipelineManager.ExecuteReceivePipeline(ReceivePipeline,MsgICMTxt);

The XML assigned when calling the ApplyInstanceConfig is the same as you can find when exporting the binding file with the Biztalk Admin Console.
It is that simple :).

Calling a send pipeline with custom property settings would be done like this:
Create a variable SendPipelineInput from type Microsoft.XLANGs.Pipeline.SendPipelineInputMessages. I’ve also used a variable PipelineConfig of type System.String.
Here’s the code I’ve used:


SendPipelineInput.Add(MsgINVOIC_EDI);

PipelineConfig = @"<Root xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<Stages>
<Stage CategoryId='9d0e4101-4cce-4536-83fa-4a5040674ad6'>
<Components>
<Component Name='TP.BTS.PIPELINES.CUSTOMSENDEDIPARTYRESOLUTION.CUSTOMSENDEDIPARTYRESOLUTION'>
<Properties>
<OverrideRcvprn vt='8'>"
+ MsgINVOIC_GEN(ORDERS.ORDERSPropertySchema.RCVPRN) + @"</OverrideRcvprn>
<OverrideRecipient vt='11'>-1</OverrideRecipient>
<OverrideSndprn vt='8'>"
+ MsgINVOIC_GEN(ORDERS.ORDERSPropertySchema.SNDPRN) + @"</OverrideSndprn>
</Properties>
</Component>
</Components>
</Stage>
<Stage CategoryId='9d0e4107-4cce-4536-83fa-4a5040674ad6'>
<Components>
<Component Name='Microsoft.BizTalk.Edi.Pipelines.EdiAssembler'>
<Properties />
</Component>
</Components>
</Stage>
<Stage CategoryId='9d0e4108-4cce-4536-83fa-4a5040674ad6'>
<Components>
<Component Name='TP.BTS.PIPELINES.CustomXMLSENDCOMPONENT'>
<Properties />
</Component>
</Components>
</Stage>
</Stages>
</Root>"
;

OrdersOutputInterchange = null;

TP.BTS.GlobalFunctions.PipelineManager.ExecuteSendPipeline(typeof
(CUSTOM_EDI_SEND.CUSTOM_EDI_SEND), PipelineConfig, SendPipelineInput,OrdersOutputInterchange);

And that should do the trick.

Hope you enjoyed this post.

BizTalk Server 2010 Cookbook-a review

It is hard to not point out the fact that this is a cookbook, and there already is a book about BizTalk recipes. It is also hard not to point out the fact that I love cooking but hate using cookbooks

This is a cookbook I really, really like though.

I imagine that you, like me, have a collection of really good BizTalk blog post links in you browser of choice. When you use BizTalk, and when you read up on what others have written, then you bookmark certain posts for safe-keeping. You just know that “this is a good thing to remember for another day”.

This book is like the best collection of links you could possibly have! A really good blog in book-form, or a blog-oriented book. First of all: buy this book. It is a given in any BizTalk developer team. The 25 spent on the book will be paid for over and over again as you save time during development and testing.

BizTalk Server 2010 Cookbook uses a very practical approach to problem solving. This is the only downside to the book. Sometimes it it too focused on how to solve something and not enough is spent on understanding it. Then again the author points you to further reading at the end of each recipe. So if you want to know more about something, you can find it easily. Personally I would like it to have been part of the book but I guess that is not up to me to decide.

The practical approach splits each recipe into different parts. First an introduction to present the challenges or the problem. Then follows a “How to” section, a “how it works” and the aforementioned “There is more”.

Do not be fooled by the subtitle of the book “Quick answers to common problems” as the word “problem” might be associated with “bug” or “issue” and this is not the case. It is rather a case of “How to quickly, understand and perform common tasks” but that is a really bad strapline I agree.

The publisher has a complete listing of the books content and I encourage you read it but I would like to point out some of my personal favorites: BizTalk Server Automation: Patterns, Monitoring using Log4Net and Securing Message Exchange. The last one is in my opinion the best text on the subject I have seen. After reading it I feel that the usage of certificates in BizTalk is no longer hard, and I can understand it. Something I must admit to being part of my ignorance up until now.

So once again: Buy this book. It is smart, practical, well written and really useful.

Blog Post by: Mikael Sand

Stockholm, Friday 27th April: Hybrid Applications with Clemens Vasters + Win a Hot Air Balloon Ride!

The Sweden Windows Azure Group (SWAG) will hold a session on “Hybrid Applications – Building Solutions that span On-Premises Assets and the Cloud” with Clemens Vasters, principle technical lead for the Windows Azure Service Bus. It should be a great session with a lot of inside information from the guy behind the technology.

Microsoft Sweden has been kind enough to give us three “Windows Azure Hot Air Balloon” ride tickets, which we were tempted to use ourselves, but will raffle to three lucky attendees at the meeting. A great way to “move to the cloud”.

Date: Friday 27th April, 17:30 – 20:30
Location: knowit Stockholm: Klarabergsgatan 60 4tr

Register here: http://swag10.eventbrite.com/

See you there.

Call pipelines from an orchestration

Calling a pipeline from an orchestration is quite easy.

First of all you need to add a reference to the Microsoft.XLANGs.Pipeline.dll and Microsoft.BizTalk.Pipeline.dll assemblies. When this is done you’ll be able to execute a receive pipeline as follows:


ReceivePipelineOutput = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline
(typeof(ShemasAndPipelines.ReceiveCustOrdres), OrdersInputInterchange);

To get all messages coming out the pipeline, you’ll have to loop over the batch and get all messages like this:


ReceivePipelineOutput.GetCurrent(OrdersInputMsg);

For the execution of a send pipeline you’ll need to create a variable of type Microsoft.XLANGs.Pipeline.SendPipelineInputMessages. then call the method add on this variable which adds message of type Microsoft.XLANGs.BaseType.XLANGMessage.


SendPipelineInputMessages.Add(OrderSummary);

To execute the send pipeline, you’ll have call the ExecuteSendPipeline method with the just created SendPipelineInputMessages and the output message as follows:


Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteSendPipeline(typeof
(ShemasAndPipelines.SendCustOrdersPipeline), SendPipelineInput, OrdersOutputInterchange);

This way of executing pipelines will execute the pipelines using the default settings for all pipeline properties. How to execute pipelines from an orchestration with custom settings for the pipeline properties will be explained in my next blogs.

a more detailed explanation can be found here