Bring It On!

Bring It On!

Twenty years ago I sat at Eden Park in Auckland and watched New Zealand win the first ever rugby world cup. At the time I didn’t appreciate what would become the enormity of the event over the next twenty years.


Last year I took Scott Guthrie and Rowan Simpson on an Eden Park vigil to see the AB’s destroy the Wallaby’s. And recently at a company kick off we heard from the NZRU on how they went about winning the hosting rights for the 2011 RWC in New Zealand. You can hear about that yourself by attending the partner conference in Auckland this month.


Last month the herald published the numbers for the event in France.


Approximately 4 billion people will watch some of the 2007 World Cup, according to corporate events organiser Sports World and 2.4 million tickets have been sold!


I watched a lot of the opening games over the weekend… I predicted that Argentina would trump France (I thought they would also beat Australia in the opener of the last world cup)… but I didn’t quite expect the complete dominance of the AB’s, Wallaby’s and South Africans and the downright awful performances of England, Ireland and Wales in the opening stages of their games against USA, Namibia and Canada respectively.


In the coming days the All Blacks will be releasing a Silverlight 1.0 mini application  to help AB fans track the world cup matches from here on in (all the way to winning the final 😉


Why did Jay, Niall and the Mabode team choose to do this in Silverlight 1.0? Well a few reasons really…


1) Silverlight 1.0 is now released and ready for prime time


2) The UI looks Hot and the gadget is small to download (570kb all up)


2) It plays well as a Gadget technology in Vista


3) You get the added bonus of a browser based version that runs cross platform


Keep an eye on allblacks.com later this week (I’ll post an update link when it is live) so that you can track the AB’s in France over the coming weeks!


In the meantime take a look at this little screencast I made of the gadget in use that I recorded and put up on Silverlight Streaming this morning.



It is also good to see that the alternative rugby commentary and Inky is back as well.

Manually sending a response back to a waiting Web Service client

Manually sending a response back to a waiting Web Service client

(or how to do asynchronous processing of a synchronous request/response message)
[Note: this post follows on from my previous post How
to validate Xml Documents against schemas in BizTalk. For example, if you validate
a message in a pipeline and validation fails, how do you send a response back to a
waiting web service client.]

For a while now, people have been struggling with how to asynchronously process request/response
messages – basically, how to get away from having a request/response port in an orchestration
bound to a request/response  receive location.

For example, Yossi Dohan blogged on this a while back, and came up with a solution
involving multiple orchestrations:
http://www.sabratech.co.uk/blogs/yossidahan/2006/06/sync-to-async-conversion.html

The problem revolves around the fact that BizTalk will always demote the EpmRRCorrelationToken context
property when your message leaves the orchestration if you try and manually set it
yourself.

There is a way around this, but it does involve you writing some code.
In fact, it involves writing a custom adapter and/or pipeline component. This is how
we solved it at one of my clients.
The trick is to promote the property outside of the orchestration – and that can only
be done in a send pipeline or send adapter.
If you’re not up to writing your own adapter, you can use the loopback
adapter and a custom pipeline component.
What you have to do is promote the EpmRRCorrelationToken context property in
your pipeline or your adapter.

Which means that with a custom pipeline/adapter, you can asynchronously process request/response
messages without even needing orchestrations (e.g. in high-perf situations where you
can do everything in pipelines).
The code to promote the property is very simple.

First of all (for those of you who haven’t come across this), let’s explain the issue
(skip this and go to after the primer if you wish):
<Begin Primer>


Take a typical example of BizTalk work: exposing an orchestration as a web service.

You have an orchestration which takes in a message, does some processing, and then
returns a response.
If you’ve used the Web Services Publishing Wizard, your orchestration will have s
request/response port which is used to receive messages from the web service, and
send a response.

When your request message is submitted to the BizTalk MessageBox (for pickup by the
Receive port on your orchestration) there needs to be some way to return the response
back to the same service instance which submitted the message in the first place.
This will make sure the response goes back out as a response to the HTTP POST which
submitted the request in the first place.

BizTalk achieves this by:
1.    Creating a new subscription using the ID of the service instance
waiting for a response
2.    Setting correlation properties on the Request message which match
this subscription
The two properties used are:

EpmRRCorrelationToken
RouteDirectToTP

When you send a message back through the Send port of your orchestration,
once of the things that happens internally is that these properties (from the request
message) are promoted onto the response message you’re sending.
The orchestration places the message in the MessageBox, and the waiting ServiceInstance
picks up the message as it has a matching subscription:


http://schemas.microsoft.com/BizTalk/2003/system-properties.EpmRRCorrelationToken
==
Svr:DANIEL-PC;PID:836;RRUid:{C5120F0D-06F7-4BDF-8A45-79B391AF56A0}  And

http://schemas.microsoft.com/BizTalk/2003/system-properties.RouteDirectToTP ==
True


Figure 1. The subscription for the ServiceInstance Response channel



Figure 2. The Context Properties on the Request message

So, if you want to create your own response message, all you have to do is promote
the same properties onto a message (note that you can’t just set them – they have
to be marked as Promoted as well)
In fact, as the subscription is not MessageType specific, you can return any message
you like back (as long as it deserialises into something expected by the web service
code).

Here’s an example of where you might want to do this: Failed Message Routing.
If the pipeline processing your request message throws an exception, and you have Enable
routing for failed messages
switched on in your receive port, then your message
will be submitted to the message box, and a new Error Report message will be created
with all the original message properties demoted, and some new error properties promoted:



Figure 3. The Context Properties for an Error Report message

As you can see although the RouteDirectToTP property has disappeared, the EpmRRCorrelationToken property
(the one we need) is still there.

A new feature in BizTalk 2006 is that if a message fails in the pipeline, it is still
written to the MessageBox and an error report generated i.e. you still have access
to the original request message even if it’s not XML.

In BizTalk 2004, if a pipeline exception occurred you’d lose the message (without
writing a custom pipeline component).
If you subscribe to the Error Report, what you will receive is the original message
(as opposed to the error report message which has no actual data).

So if we wanted to send this original message back to the waiting service instance,
all we’d have to do is:
1.    Add the RouteDirectToTP property
2.    Promote both of these properties

And herein lies the problem that many people have discovered: orchestration send ports
contain specific code which will not promote any user-set instances of EpmRRCorrelationToken.
The only time this property is automatically promoted is when it’s part of a request/response
port bound to the actual ReceiveLocation.

So what this means is that you can’t promote this property in an orchestration.


<End Primer>

So how do you promote the EpmRRCorrelationToken property before the message
gets into the MessageBox? Easy – you have to execute the following code from a custom
adapter or pipeline component:

// Check if EpmRRCorrelationToken
is present in message context


object value = inmsg.Context.Read(“EpmRRCorrelationToken“,
http://schemas.microsoft.com/BizTalk/2003/system-properties“);
if (value != null)
{
      string empToken = (string)value;
      bool directToTP = true;
      inmsg.Context.Promote(“EpmRRCorrelationToken“,
http://schemas.microsoft.com/BizTalk/2003/system-properties“,
empToken);
      inmsg.Context.Promote(“RouteDirectToTP“,
http://schemas.microsoft.com/BizTalk/2003/system-properties“,
directToTP);
}


(ideally, you’d use the Types from Microsoft.BizTalk.GlobalPropertySchemas to
obtain the context property names and namespaces, as this means you’ll always have
the correct namespace versions)

So all you have to do is create a SendPort which uses your custom adapter (or the
Loopback adapter and a custom pipeline component with the above code), connect the
SendPort to your orchestration (or create a filter on the SendPort if you’re not using
orchestrations) and the message will be submitted to the message box, to be picked
up by the waiting service instance.

Bear in mind that your service instance will attempt to deserialise the message received
into an appropriate response message – which means that if you’re using typed messages
(as opposed to XmlDocuments) you may need to run a map or create a new response message,
otherwise the service instance will barf.

I have a full sample showing how to do all this without needing any orchestrations
which I’ll post up if anyone asks.
Additionally, I should get round to posting up the code for the custom adapter we
use – it saves you having to write your own pipeline component.

Listed Below (where again?)

In a map, I forgot to set the attribute to <empty> and therefore could not assign a value to it after the map completed.

InfoMsg.MessagePart.FileName=System.IO.Path.GetFileName(TransmissionMsg(FILE.ReceivedFileName));
InfoMsg.MessagePart.Occurrence=System.Convert.ToString(ThisInterchange);

However the error that is displayed in the ‘Service Details’ is somewhat misleading:

Where is the XPATH expression that does not have a node?

BizTalk Server 2006 R2 installation or configuration fails when you download the CAB files that contain the dependency software

Saw an interesting note come through and thought forward it out.


BizTalk Server 2006 R2 installation or configuration fails when you download the CAB files that contain the dependency software (942181)


 


When you try to install or configure Microsoft BizTalk Server 2006 R2, the installation process or the configuration process may fail unexpectedly.

This problem occurs if you downloaded the redistributable CAB files that contain the dependency software that is required by BizTalk Server R2 before trying to install or configure BizTalk Server 2006 R2.

Note This issue does not occur if you start the BizTalk Server 2006 R2 setup and then automatically download the CAB files during the installation.


BizTalk Server 2006 R2 installation or configuration fails when you download the CAB files that contain the dependency software (942181)


Cause Section


This problem occurs because of an error in the BizTalk Server 2006 R2 documentation. The installation guides for BizTalk Server 2006 R2 contain links to CAB files that contain the dependency software for Microsoft BizTalk Server 2006 instead of BizTalk Server 2006 R2.


Resolution Section


To resolve this issue, download the correct CAB files for the operating system version and BizTalk Server 2006 R2 language, and then try to install BizTalk Server 2006 R2 again. To determine the correct CAB files for the operating system and BizTalk Server 2006 R2 language, see the following tables:

Note If you were able to install BizTalk Server 2006 R2, but the configuration process failed, uninstall BizTalk Server 2006 R2. Then download the correct CAB files and install BizTalk Server 2006 R2 again.


Microsoft Windows Server 2003, 32-bit editions



































BizTalk Server 2006 R2 language


Download link


CN


http://go.microsoft.com/fwlink/?LinkId=81466


 DE


http://go.microsoft.com/fwlink/?LinkId=81467


EN


http://go.microsoft.com/fwlink/?LinkId=81468


ES


http://go.microsoft.com/fwlink/?LinkId=81469


FR


http://go.microsoft.com/fwlink/?LinkId=81470


IT


http://go.microsoft.com/fwlink/?LinkId=81471


JA


http://go.microsoft.com/fwlink/?LinkId=81472


KO


http://go.microsoft.com/fwlink/?LinkId=81473


TW


http://go.microsoft.com/fwlink/?LinkId=81474

Pre-conference training at the upcoming SOA BPM conference

Jon Flanders, Aaron Skonnard and I are going to be doing a two-day workshop just before Microsoft’s SOA and BPM conference at the end of October.  This will be two days chock full of training content on the latest tools coming out of the Connected Systems Division at Microsoft including BizTalk Services, WCF/WF integration, and BizTalk Server R2.  Check out our official page and sign up if you’ll be attending the conference or if you are in the area.  This will be a great way to start your week and maximize your travel. 

Awesome new BizTalk Database Optimization Whitepaper

One of the most tricky aspects of developing BizTalk applications can be the performance tuning and optimization phase. A great new whitepaper has just been released to MSDN that has extremely deep and thorough coverage on how to configure, install and tune the a BizTalk database tier. This is a must have paper for anyone dealing with high load, high performance BizTalk applications


 http://msdn2.microsoft.com/en-us/library/bb743398.aspx


 Great work done by John B. Brockmeyer and team.


 Cheers and keep on BizTalking

SharePoint Feature: Add Column from Existing Site Columns menu item

SharePoint Feature: Add Column from Existing Site Columns menu item

Question: what is the easiest way to add a column to a list or document library in SharePoint 2007?
Answer: navigate to the list, from the Settings menu, choose Create Column.

Question: how do you add an existing Site Column to a list or document library?
Answer: navigate to the list, from the Settings menu, choose List/Document Library Settings, scroll down to the Columns section and click Add from existing site columns.

In the beta versions of SharePoint 2007 there was an easier way to add an existing Site Column to a list or document library because there was another menu item in the Settings menu: Add column from existing site columns. For those of you who are nostalgic about the beta’s of Office 12, and want to have the menu item back: I’ve created simple feature to add the menu item:

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”
http://schemas.microsoft.com/sharepoint/”>
    <CustomAction
        Id=”{F32CD702-0391-4b55-A8D6-7653650DEF95}”
        Location=”Microsoft.SharePoint.StandardMenu”
        GroupId=”SettingsMenu”
        RegistrationType=”List”
        Sequence=”0″
        ImageUrl=”_layouts/images/menuaddcolumn.gif”
        Title=”Add column from existing site columns”
        Description=”Add an existing site column to store additional information about each item.”
        Rights=”ManageLists”
        >
        <UrlAction
            Url=”javascript:window.location= ‘{SiteUrl}/_layouts/AddFieldFromTemplate.aspx?List={ListId}&amp;Source=’ + window.location”/>
    </CustomAction>
</Elements>

The feature uses the Javascript tric which I explained yesterday (this feature was actually the reason for it). If you want to download the complete feature, packaged in a nice SharePoint Solution (WSP); just click here!

Here’s a screenshot of the result:

Technorati tags: sharepoint, sharepoint 2007, feature, site columns