<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>eliasen</title>
    <link>http://blog.eliasen.dk/</link>
    <description>Just another BizTalk guy</description>
    <language>en-us</language>
    <copyright>Jan Eliasen</copyright>
    <lastBuildDate>Wed, 01 Sep 2010 19:42:41 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>jan@eliasen.dk</managingEditor>
    <webMaster>jan@eliasen.dk</webMaster>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=b6b89b88-09ed-428b-b447-419521695d08</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,b6b89b88-09ed-428b-b447-419521695d08.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,b6b89b88-09ed-428b-b447-419521695d08.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=b6b89b88-09ed-428b-b447-419521695d08</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
If you go to <a title="http://msdn.microsoft.com/en-us/biztalk/default.aspx" href="http://msdn.microsoft.com/en-us/biztalk/default.aspx">http://msdn.microsoft.com/en-us/biztalk/default.aspx</a> you
can see that this month I am the featured BizTalk MVP – yeah…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b6b89b88-09ed-428b-b447-419521695d08" />
      </body>
      <title>Featured BizTalk MVP</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,b6b89b88-09ed-428b-b447-419521695d08.aspx</guid>
      <link>http://blog.eliasen.dk/2010/09/01/FeaturedBizTalkMVP.aspx</link>
      <pubDate>Wed, 01 Sep 2010 19:42:41 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
If you go to &lt;a title="http://msdn.microsoft.com/en-us/biztalk/default.aspx" href="http://msdn.microsoft.com/en-us/biztalk/default.aspx"&gt;http://msdn.microsoft.com/en-us/biztalk/default.aspx&lt;/a&gt; you
can see that this month I am the featured BizTalk MVP – yeah…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b6b89b88-09ed-428b-b447-419521695d08" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,b6b89b88-09ed-428b-b447-419521695d08.aspx</comments>
      <category>MVP</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f88e86be-19a4-47fe-9790-61044a7e25c9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f88e86be-19a4-47fe-9790-61044a7e25c9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f88e86be-19a4-47fe-9790-61044a7e25c9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f88e86be-19a4-47fe-9790-61044a7e25c9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A couple of days ago I held two presentations at the first meeting in the Danish BizTalk
User Group (DBUG).
</p>
        <p>
The first presentation was about the new mapper in BizTalk 2010. 
<br />
Find my presentation here: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:9eab222e-352d-4a56-8aa6-f2bb7e31f83a" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/DKBUG.Mapper.Presentation.pptx" target="_blank">DKBUG
Mapper Presentation.pptx</a>
          </div>
        </div>
        <p>
The second presentation was about the Pipeline Component Wizard. 
<br />
Find my presentation here: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:a4caf911-aba9-4fad-a823-6f5725b16a40" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/DKBUG.Pipeline.Component.Wizard.pptx" target="_blank">DKBUG
Pipeline Component Wizard.pptx</a>
          </div>
        </div>
        <p>
Find the code samples for both presentations here: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:74b8c81d-80a2-4934-a834-bd0912df3ffa" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/DKBUG.zip" target="_self">DKBUG.zip</a>
          </div>
        </div>
        <p>
Note that my file names, source code, and so on has “DKBUG” instead of “DBUG” because
the official acronym wasn’t chosen until the meeting, so I guessed… and guessed wrong <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/wlEmoticon-smile_2.png" /></p>
        <p>
That’s all, folks!
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f88e86be-19a4-47fe-9790-61044a7e25c9" />
      </body>
      <title>Presentations from DBUG meeting</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f88e86be-19a4-47fe-9790-61044a7e25c9.aspx</guid>
      <link>http://blog.eliasen.dk/2010/08/14/PresentationsFromDBUGMeeting.aspx</link>
      <pubDate>Sat, 14 Aug 2010 08:17:38 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A couple of days ago I held two presentations at the first meeting in the Danish BizTalk
User Group (DBUG).
&lt;/p&gt;
&lt;p&gt;
The first presentation was about the new mapper in BizTalk 2010. 
&lt;br /&gt;
Find my presentation here: 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:9eab222e-352d-4a56-8aa6-f2bb7e31f83a" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/DKBUG.Mapper.Presentation.pptx" target="_blank"&gt;DKBUG
Mapper Presentation.pptx&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
The second presentation was about the Pipeline Component Wizard. 
&lt;br /&gt;
Find my presentation here: 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:a4caf911-aba9-4fad-a823-6f5725b16a40" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/DKBUG.Pipeline.Component.Wizard.pptx" target="_blank"&gt;DKBUG
Pipeline Component Wizard.pptx&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
Find the code samples for both presentations here: 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:74b8c81d-80a2-4934-a834-bd0912df3ffa" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/DKBUG.zip" target="_self"&gt;DKBUG.zip&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
Note that my file names, source code, and so on has “DKBUG” instead of “DBUG” because
the official acronym wasn’t chosen until the meeting, so I guessed… and guessed wrong &lt;img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/PresentationsfromDBUGmeeting_8DBD/wlEmoticon-smile_2.png" /&gt;
&lt;/p&gt;
&lt;p&gt;
That’s all, folks!
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f88e86be-19a4-47fe-9790-61044a7e25c9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f88e86be-19a4-47fe-9790-61044a7e25c9.aspx</comments>
      <category>DBUG</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=6fce9a5f-6a80-47e0-a18d-ebba0c84df53</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,6fce9a5f-6a80-47e0-a18d-ebba0c84df53.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,6fce9a5f-6a80-47e0-a18d-ebba0c84df53.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=6fce9a5f-6a80-47e0-a18d-ebba0c84df53</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
For those interested in the Danish BizTalk User Group (DBUG), at LinkedIn group has
been created, free for everyone to join.
</p>
        <p>
Find it here: <a title="http://www.linkedin.com/groups?gid=3305228" href="http://www.linkedin.com/groups?gid=3305228">http://www.linkedin.com/groups?gid=3305228</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6fce9a5f-6a80-47e0-a18d-ebba0c84df53" />
      </body>
      <title>LinkedIn group for Danish BizTalk User Group (DBUG)</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,6fce9a5f-6a80-47e0-a18d-ebba0c84df53.aspx</guid>
      <link>http://blog.eliasen.dk/2010/08/13/LinkedInGroupForDanishBizTalkUserGroupDBUG.aspx</link>
      <pubDate>Fri, 13 Aug 2010 18:27:21 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
For those interested in the Danish BizTalk User Group (DBUG), at LinkedIn group has
been created, free for everyone to join.
&lt;/p&gt;
&lt;p&gt;
Find it here: &lt;a title="http://www.linkedin.com/groups?gid=3305228" href="http://www.linkedin.com/groups?gid=3305228"&gt;http://www.linkedin.com/groups?gid=3305228&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6fce9a5f-6a80-47e0-a18d-ebba0c84df53" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,6fce9a5f-6a80-47e0-a18d-ebba0c84df53.aspx</comments>
      <category>DBUG</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, today my boss confirmed that I can go to the event held by the Swedish BizTalk
User Group. See the details of the event here: <a title="http://bugs20100908-widget.eventbrite.com/" href="http://bugs20100908-widget.eventbrite.com/">http://bugs20100908-widget.eventbrite.com/</a>.
The event says it’s a BizTalk 2010 launch party… but whether BizTalk 2010 will be
out there… I don’t know.
</p>
        <p>
I am really looking forward to hearing what <a href="http://seroter.wordpress.com/" target="_blank">Richard
Seroter</a>, <a href="http://blogs.msdn.com/b/ewanf/default.aspx" target="_blank">Ewan
Fairweather</a> and <a href="http://www.biztalkgurus.com/blogs/biztalk/" target="_blank">Stephen
W. Thomas</a> have to say. I have preordered their book, both paper and ebook editions.
Hopefully I will receive at least one of them before September 8’th where the event
starts.
</p>
        <p>
Also, this will actually be the first time I will meet <a href="http://blogical.se/blogs/johan/" target="_blank">Johan
Hedberg</a> and <a href="http://blogical.se/blogs/mikael/" target="_blank">Mikael
Håkansson</a>, who are two of my Swedish colleagues who are both BizTalk MVPs.
</p>
        <p>
Anyway, flight and hotel are booked. Look for me there!
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03" />
      </body>
      <title>BizTalk 2010 launch party–I’ll be there</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03.aspx</guid>
      <link>http://blog.eliasen.dk/2010/08/09/BizTalk2010LaunchPartyIllBeThere.aspx</link>
      <pubDate>Mon, 09 Aug 2010 18:14:28 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, today my boss confirmed that I can go to the event held by the Swedish BizTalk
User Group. See the details of the event here: &lt;a title="http://bugs20100908-widget.eventbrite.com/" href="http://bugs20100908-widget.eventbrite.com/"&gt;http://bugs20100908-widget.eventbrite.com/&lt;/a&gt;.
The event says it’s a BizTalk 2010 launch party… but whether BizTalk 2010 will be
out there… I don’t know.
&lt;/p&gt;
&lt;p&gt;
I am really looking forward to hearing what &lt;a href="http://seroter.wordpress.com/" target="_blank"&gt;Richard
Seroter&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ewanf/default.aspx" target="_blank"&gt;Ewan
Fairweather&lt;/a&gt; and &lt;a href="http://www.biztalkgurus.com/blogs/biztalk/" target="_blank"&gt;Stephen
W. Thomas&lt;/a&gt; have to say. I have preordered their book, both paper and ebook editions.
Hopefully I will receive at least one of them before September 8’th where the event
starts.
&lt;/p&gt;
&lt;p&gt;
Also, this will actually be the first time I will meet &lt;a href="http://blogical.se/blogs/johan/" target="_blank"&gt;Johan
Hedberg&lt;/a&gt; and &lt;a href="http://blogical.se/blogs/mikael/" target="_blank"&gt;Mikael
Håkansson&lt;/a&gt;, who are two of my Swedish colleagues who are both BizTalk MVPs.
&lt;/p&gt;
&lt;p&gt;
Anyway, flight and hotel are booked. Look for me there!
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,5ba8eff4-b16b-4efe-b8a5-b5ab32d63c03.aspx</comments>
      <category>BizTalk 2010</category>
      <category>Conference</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d1a22346-47e2-47bd-b5fb-52e6d78c382a</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d1a22346-47e2-47bd-b5fb-52e6d78c382a.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d1a22346-47e2-47bd-b5fb-52e6d78c382a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d1a22346-47e2-47bd-b5fb-52e6d78c382a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I exported an MSI file from my development machine and wanted to import the
MSI file on our test environment.
</p>
        <p>
I got this error, though:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/690397708bcb_1261C/import_msi_error_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="import_msi_error" border="0" alt="import_msi_error" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/690397708bcb_1261C/import_msi_error_thumb.png" width="616" height="453" />
          </a>
        </p>
        <hr />
        <p>
Change requests failed for some resources. (mscorlib)
</p>
        <p>
Unable to process create change request for BizTalk binding "BindingInfo.xml".
Import bindings (overwrite) failed. (Microsoft.BizTalk.ResourceManagers)
</p>
        <p>
Failed to update binding information. (mscorlib)
</p>
        <p>
Cannot update receive port "WcfReceivePort_FvmIndberetningCommon_CVR/FvmIndberetningCommon_CVR".
(Microsoft.BizTalk.Deployment)
</p>
        <p>
Cannot update receive location "WcfService_FvmIndberetningCommon_CVR/FvmIndberetningCommon_CVR".
(Microsoft.BizTalk.Deployment)
</p>
        <p>
The following items could not be matched up to hosts due to name and/or trust level
mismatches: 
<br />
Item: 'WcfService_FvmIndberetningCommon_CVR/FvmIndberetningCommon_CVR' Host: 'FVM_Indberetningsplatform_IsolatedHost'
Trust level: 'Untrusted' 
<br />
You must do one of the following: 
<br />
1) Create hosts with these names and trust levels and try again 
<br />
2) Re-export the MSI without the binding files and have a post import script apply
a suitable binding file. (Microsoft.BizTalk.Deployment)
</p>
        <hr />
        <p>
Now, the error message is pretty easy to understand. What had me baffled was, that
the host exists and it IS untrusted. So there is no mismatch and the two ideas as
to what to fix don’t seem to apply to my situation.
</p>
        <p>
It turned out that the issue was that after creating the needed host and host instances,
I had forgotten to add the necessary Receive Hander on the appropriate adapter for
the receive location. But the error message doesn’t say anything about that – it just
says that I need to create the host with the right trust level.
</p>
        <p>
So, this post is just to let you know that there is another reason for the error message
than what the error message states.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d1a22346-47e2-47bd-b5fb-52e6d78c382a" />
      </body>
      <title>Error importing binding files</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d1a22346-47e2-47bd-b5fb-52e6d78c382a.aspx</guid>
      <link>http://blog.eliasen.dk/2010/08/06/ErrorImportingBindingFiles.aspx</link>
      <pubDate>Fri, 06 Aug 2010 19:46:42 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I exported an MSI file from my development machine and wanted to import the
MSI file on our test environment.
&lt;/p&gt;
&lt;p&gt;
I got this error, though:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/690397708bcb_1261C/import_msi_error_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="import_msi_error" border="0" alt="import_msi_error" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/690397708bcb_1261C/import_msi_error_thumb.png" width="616" height="453" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;
Change requests failed for some resources. (mscorlib)
&lt;/p&gt;
&lt;p&gt;
Unable to process create change request for BizTalk binding &amp;quot;BindingInfo.xml&amp;quot;.
Import bindings (overwrite) failed. (Microsoft.BizTalk.ResourceManagers)
&lt;/p&gt;
&lt;p&gt;
Failed to update binding information. (mscorlib)
&lt;/p&gt;
&lt;p&gt;
Cannot update receive port &amp;quot;WcfReceivePort_FvmIndberetningCommon_CVR/FvmIndberetningCommon_CVR&amp;quot;.
(Microsoft.BizTalk.Deployment)
&lt;/p&gt;
&lt;p&gt;
Cannot update receive location &amp;quot;WcfService_FvmIndberetningCommon_CVR/FvmIndberetningCommon_CVR&amp;quot;.
(Microsoft.BizTalk.Deployment)
&lt;/p&gt;
&lt;p&gt;
The following items could not be matched up to hosts due to name and/or trust level
mismatches: 
&lt;br /&gt;
Item: 'WcfService_FvmIndberetningCommon_CVR/FvmIndberetningCommon_CVR' Host: 'FVM_Indberetningsplatform_IsolatedHost'
Trust level: 'Untrusted' 
&lt;br /&gt;
You must do one of the following: 
&lt;br /&gt;
1) Create hosts with these names and trust levels and try again 
&lt;br /&gt;
2) Re-export the MSI without the binding files and have a post import script apply
a suitable binding file. (Microsoft.BizTalk.Deployment)
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;
Now, the error message is pretty easy to understand. What had me baffled was, that
the host exists and it IS untrusted. So there is no mismatch and the two ideas as
to what to fix don’t seem to apply to my situation.
&lt;/p&gt;
&lt;p&gt;
It turned out that the issue was that after creating the needed host and host instances,
I had forgotten to add the necessary Receive Hander on the appropriate adapter for
the receive location. But the error message doesn’t say anything about that – it just
says that I need to create the host with the right trust level.
&lt;/p&gt;
&lt;p&gt;
So, this post is just to let you know that there is another reason for the error message
than what the error message states.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d1a22346-47e2-47bd-b5fb-52e6d78c382a" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d1a22346-47e2-47bd-b5fb-52e6d78c382a.aspx</comments>
      <category>BizTalk 2009</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=87656bed-b92e-4e27-b895-a74eb06034ed</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,87656bed-b92e-4e27-b895-a74eb06034ed.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,87656bed-b92e-4e27-b895-a74eb06034ed.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=87656bed-b92e-4e27-b895-a74eb06034ed</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have decided to start up a personal blog as well. I get a few complaints from people
who don’t care about my personal life, and therefore, I will be moving personal blog
entries to my new blog at <a href="http://jan.eliasen.dk">http://jan.eliasen.dk</a> –
with an RSS feed at <a title="http://jan.eliasen.dk/syndication.axd" href="http://jan.eliasen.dk/syndication.axd">http://jan.eliasen.dk/syndication.axd</a></p>
        <p>
This blog will NOT change! Well… personal blog entries will not appear anymore, but
other than that, I will still be blogging about technological abnormalities, funny
things, strange things, errors, and what not…
</p>
        <p>
So, for Jan, the person, go see <a href="http://jan.eliasen.dk">http://jan.eliasen.dk</a></p>
        <p>
Thanks
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=87656bed-b92e-4e27-b895-a74eb06034ed" />
      </body>
      <title>Personal blog</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,87656bed-b92e-4e27-b895-a74eb06034ed.aspx</guid>
      <link>http://blog.eliasen.dk/2010/07/25/PersonalBlog.aspx</link>
      <pubDate>Sun, 25 Jul 2010 18:08:24 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have decided to start up a personal blog as well. I get a few complaints from people
who don’t care about my personal life, and therefore, I will be moving personal blog
entries to my new blog at &lt;a href="http://jan.eliasen.dk"&gt;http://jan.eliasen.dk&lt;/a&gt; –
with an RSS feed at &lt;a title="http://jan.eliasen.dk/syndication.axd" href="http://jan.eliasen.dk/syndication.axd"&gt;http://jan.eliasen.dk/syndication.axd&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
This blog will NOT change! Well… personal blog entries will not appear anymore, but
other than that, I will still be blogging about technological abnormalities, funny
things, strange things, errors, and what not…
&lt;/p&gt;
&lt;p&gt;
So, for Jan, the person, go see &lt;a href="http://jan.eliasen.dk"&gt;http://jan.eliasen.dk&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Thanks
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=87656bed-b92e-4e27-b895-a74eb06034ed" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,87656bed-b92e-4e27-b895-a74eb06034ed.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a9a84057-875b-43fc-b3f6-130a735b893d</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a9a84057-875b-43fc-b3f6-130a735b893d.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a9a84057-875b-43fc-b3f6-130a735b893d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a9a84057-875b-43fc-b3f6-130a735b893d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
The other day a developer who needs to call a BizTalk exposed web service approached
me and told me that there was an error in the wsdl – something about the Response
having the wrong fields.
</p>
        <p>
So, I fixed it – I changed the XSD and ran the WCF Service Publishing Wizard again.
</p>
        <p>
I called the developer and told him that everything was fine now. He refreshed his
service reference and told me that everything was just as it was before. So I thought;
Restart IIS.. and I did. Developer goes: Jan, what is wrong with you? Everything is
still the same!
</p>
        <p>
So now I actually need to start thinking…
</p>
        <p>
Turns out, that silly I just did this:
</p>
        <ol>
          <li>
Made my changes to the XSD</li>
          <li>
Recompiled</li>
          <li>
Run the Wizard</li>
        </ol>
        <ol>
          <li>
Point to the newly compiled assembly</li>
          <li>
Finish the wizard</li>
        </ol>
        <p>
BUT, what I forgot was to deploy the newly created assembly… or at least GAC it. Because
the wizard, even though you point to a .DLL in the file system, will look for the
assembly in the GAC with the same strong name and used that instead of the .DLL you
chose. To me this is really silly… It could at least provide a warning that it will
ignore the assembly I chose before ignoring it.
</p>
        <p>
Anyway, after deploying the new assembly, everything worked just fine.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a9a84057-875b-43fc-b3f6-130a735b893d" />
      </body>
      <title>Updating an existing published web service doesn’t work</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a9a84057-875b-43fc-b3f6-130a735b893d.aspx</guid>
      <link>http://blog.eliasen.dk/2010/07/07/UpdatingAnExistingPublishedWebServiceDoesntWork.aspx</link>
      <pubDate>Wed, 07 Jul 2010 20:39:35 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
The other day a developer who needs to call a BizTalk exposed web service approached
me and told me that there was an error in the wsdl – something about the Response
having the wrong fields.
&lt;/p&gt;
&lt;p&gt;
So, I fixed it – I changed the XSD and ran the WCF Service Publishing Wizard again.
&lt;/p&gt;
&lt;p&gt;
I called the developer and told him that everything was fine now. He refreshed his
service reference and told me that everything was just as it was before. So I thought;
Restart IIS.. and I did. Developer goes: Jan, what is wrong with you? Everything is
still the same!
&lt;/p&gt;
&lt;p&gt;
So now I actually need to start thinking…
&lt;/p&gt;
&lt;p&gt;
Turns out, that silly I just did this:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Made my changes to the XSD&lt;/li&gt;
&lt;li&gt;
Recompiled&lt;/li&gt;
&lt;li&gt;
Run the Wizard&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
Point to the newly compiled assembly&lt;/li&gt;
&lt;li&gt;
Finish the wizard&lt;/li&gt;
&lt;/ol&gt;
&gt;
&lt;p&gt;
BUT, what I forgot was to deploy the newly created assembly… or at least GAC it. Because
the wizard, even though you point to a .DLL in the file system, will look for the
assembly in the GAC with the same strong name and used that instead of the .DLL you
chose. To me this is really silly… It could at least provide a warning that it will
ignore the assembly I chose before ignoring it.
&lt;/p&gt;
&lt;p&gt;
Anyway, after deploying the new assembly, everything worked just fine.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a9a84057-875b-43fc-b3f6-130a735b893d" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a9a84057-875b-43fc-b3f6-130a735b893d.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f32fe627-9e98-4024-b2c3-2201e7bdbbff</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f32fe627-9e98-4024-b2c3-2201e7bdbbff.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f32fe627-9e98-4024-b2c3-2201e7bdbbff.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f32fe627-9e98-4024-b2c3-2201e7bdbbff</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
If you read the documentation for Correlation Sets (<a href="http://msdn.microsoft.com/en-us/library/aa560163(BTS.70).aspx" target="_blank">here</a>),
you will see that it clearly states that:
</p>
        <p>
“Each correlation set supports a maximum of three parameters.”
</p>
        <p>
Now, the documentation for BizTalk 2010 is still subject to change, but you will find
the same text in the documentation for previous versions.
</p>
        <p>
The funny part is, that inside the Orchestration View, you are allowed to add as many
properties to your Correlation Type as you please:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb.png" width="604" height="453" />
          </a>
        </p>
        <p>
You will get no compiler error, as I would have expected, and no compiler warning,
either.
</p>
        <p>
I implemented a small orchestration that uses the Correlation Type seen above and
it looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_1.png" width="189" height="450" />
          </a>
        </p>
        <p>
Basically, a message in, a transformation, an output and then a response back in.
The “msg_FirstOut” initializes the correlation set and the “msg_SecondIn” follows
it.
</p>
        <p>
As mentioned, the compiler will not complain at all and I can deploy the solution.
Once I send a message through, an instance subscription is created once the send shape
has finished, and this surprisingly looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_2.png" width="518" height="526" />
          </a>
        </p>
        <p>
As you can see, ALL five properties are used in the instance subscription, which in
effect means that the documentation is wrong.
</p>
        <p>
So this brings me to the point; The documentation states, that you can only have three
parameters (not sure why they call them parameters) in a Correlation Set, but this
actually ONLY applies to Correlation Sets used in Convoys.
</p>
        <p>
If I change my solution to utilize a parallel convoy like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_10.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_4.png" width="290" height="352" />
          </a>
        </p>
        <p>
or to be a sequential convoy like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_12.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_5.png" width="153" height="455" />
          </a>
        </p>
        <p>
then I still get no compiler warning or error no matter how many properties I have
in my Correlation Type, but if I deploy the solution and try to start the orchestration,
I get this error message:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_8.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_3.png" width="615" height="206" />
          </a>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
“The maximum number of convoy set properties has been exceeded. A convoy set can only
contain up to 3 properties.”
</p>
        <p>
Now, you may very well ask, what is a convoy set? And yes, it is a bit confusing that
the error message uses a term that is actually internal to BizTalk and not something
your average BizTalk developer cares about. But a convoy set is simply a correlation
set that is used in a convoy.
</p>
        <p>
So this means, that for correlation sets that are used for convoys you can only have
three properties, which actually comes from the fact that the table “ConvoySets” in
the MessageBox database has three columns called “uidPropertyID1”, “uidPropertyID2”,
and “uidPropertyID3” which contain GUIDs that are the GUIDs of the properties in the
correlation set. So since only three fields exist in the database, only three properties
can be in a convoy set.
</p>
        <p>
So to me, it would nice if:
</p>
        <ol>
          <li>
The documentation was clear about the fact that the limitation only applies to correlation
sets used in convoys 
</li>
          <li>
The compiler would provide an error if you use more than three properties in a correlation
set used in a convoy so you don’t ahve to wait until starting the orchestration to
find that out. 
</li>
        </ol>
        <p>
Happy correlating and convoying out there!
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:b309668b-b6d3-4e40-a289-2aae547e1d24" class="wlWriterEditableSmartContent">
          <p>
          </p>
          <div>You can find my sample code here: <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/ThreePropertiesInCorrelationSet_3.zip" target="_self">ThreePropertiesInCorrelationSet.zip</a></div>
        </div>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f32fe627-9e98-4024-b2c3-2201e7bdbbff" />
      </body>
      <title>Only three properties in a Correlation Type – or what is the deal?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f32fe627-9e98-4024-b2c3-2201e7bdbbff.aspx</guid>
      <link>http://blog.eliasen.dk/2010/07/04/OnlyThreePropertiesInACorrelationTypeOrWhatIsTheDeal.aspx</link>
      <pubDate>Sun, 04 Jul 2010 13:29:02 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
If you read the documentation for Correlation Sets (&lt;a href="http://msdn.microsoft.com/en-us/library/aa560163(BTS.70).aspx" target="_blank"&gt;here&lt;/a&gt;),
you will see that it clearly states that:
&lt;/p&gt;
&lt;p&gt;
“Each correlation set supports a maximum of three parameters.”
&lt;/p&gt;
&lt;p&gt;
Now, the documentation for BizTalk 2010 is still subject to change, but you will find
the same text in the documentation for previous versions.
&lt;/p&gt;
&lt;p&gt;
The funny part is, that inside the Orchestration View, you are allowed to add as many
properties to your Correlation Type as you please:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb.png" width="604" height="453" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You will get no compiler error, as I would have expected, and no compiler warning,
either.
&lt;/p&gt;
&lt;p&gt;
I implemented a small orchestration that uses the Correlation Type seen above and
it looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_1.png" width="189" height="450" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Basically, a message in, a transformation, an output and then a response back in.
The “msg_FirstOut” initializes the correlation set and the “msg_SecondIn” follows
it.
&lt;/p&gt;
&lt;p&gt;
As mentioned, the compiler will not complain at all and I can deploy the solution.
Once I send a message through, an instance subscription is created once the send shape
has finished, and this surprisingly looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_2.png" width="518" height="526" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see, ALL five properties are used in the instance subscription, which in
effect means that the documentation is wrong.
&lt;/p&gt;
&lt;p&gt;
So this brings me to the point; The documentation states, that you can only have three
parameters (not sure why they call them parameters) in a Correlation Set, but this
actually ONLY applies to Correlation Sets used in Convoys.
&lt;/p&gt;
&lt;p&gt;
If I change my solution to utilize a parallel convoy like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_4.png" width="290" height="352" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
or to be a sequential convoy like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_5.png" width="153" height="455" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
then I still get no compiler warning or error no matter how many properties I have
in my Correlation Type, but if I deploy the solution and try to start the orchestration,
I get this error message:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/image_thumb_3.png" width="615" height="206" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
“The maximum number of convoy set properties has been exceeded. A convoy set can only
contain up to 3 properties.”
&lt;/p&gt;
&lt;p&gt;
Now, you may very well ask, what is a convoy set? And yes, it is a bit confusing that
the error message uses a term that is actually internal to BizTalk and not something
your average BizTalk developer cares about. But a convoy set is simply a correlation
set that is used in a convoy.
&lt;/p&gt;
&lt;p&gt;
So this means, that for correlation sets that are used for convoys you can only have
three properties, which actually comes from the fact that the table “ConvoySets” in
the MessageBox database has three columns called “uidPropertyID1”, “uidPropertyID2”,
and “uidPropertyID3” which contain GUIDs that are the GUIDs of the properties in the
correlation set. So since only three fields exist in the database, only three properties
can be in a convoy set.
&lt;/p&gt;
&lt;p&gt;
So to me, it would nice if:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The documentation was clear about the fact that the limitation only applies to correlation
sets used in convoys 
&lt;/li&gt;
&lt;li&gt;
The compiler would provide an error if you use more than three properties in a correlation
set used in a convoy so you don’t ahve to wait until starting the orchestration to
find that out. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Happy correlating and convoying out there!
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:b309668b-b6d3-4e40-a289-2aae547e1d24" class="wlWriterEditableSmartContent"&gt;
&lt;p&gt;
&lt;div&gt;You can find my sample code here: &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/OnlythreepropertiesinaCorrelationType_13AD4/ThreePropertiesInCorrelationSet_3.zip" target="_self"&gt;ThreePropertiesInCorrelationSet.zip&lt;/a&gt;
&lt;/div&gt;
&gt;
&lt;/div&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f32fe627-9e98-4024-b2c3-2201e7bdbbff" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f32fe627-9e98-4024-b2c3-2201e7bdbbff.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3f36f45e-1427-4349-be00-e9413567cd8a</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3f36f45e-1427-4349-be00-e9413567cd8a.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3f36f45e-1427-4349-be00-e9413567cd8a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3f36f45e-1427-4349-be00-e9413567cd8a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
This is probably most useful to Danish BizTalk people… We are four guys trying to
start up a Danish BizTalk User Group.
</p>
        <p>
The first meeting is set to be on August 12’th with the following agenda:
</p>
        <ol>
          <li>
Introduction to the User Group</li>
          <li>
Basic topic: The new mapper in BizTalk 2010 by Jan Eliasen</li>
          <li>
Advanced topic: Introduction to WF4 by Christian Stærk</li>
          <li>
Tools of the Trade: Pipeline Component Wizard by Jan Eliasen</li>
        </ol>
        <p>
So as you can see, I’ll be speaking twice :) And unless someone else has a great topic,
I have an advanced topic lined up for the next meeting as well.
</p>
        <p>
You can find the official invitation here: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:88cf58b8-dc3c-4db6-8c69-b37000793053" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/DanishBizTalkUserGroupstartingup_139CF/biztalk.brugergruppe.august.2010.pdf" target="_blank">biztalk
brugergruppe august 2010.pdf</a>
          </div>
        </div>
  – Danish only.
<p>
Everyone is invited, so please spread the word and the invitation.
</p><p>
Thanks
</p><p>
-- 
<br />
eliasen
</p><img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3f36f45e-1427-4349-be00-e9413567cd8a" /></body>
      <title>Danish BizTalk User Group starting up</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3f36f45e-1427-4349-be00-e9413567cd8a.aspx</guid>
      <link>http://blog.eliasen.dk/2010/07/03/DanishBizTalkUserGroupStartingUp.aspx</link>
      <pubDate>Sat, 03 Jul 2010 20:18:57 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
This is probably most useful to Danish BizTalk people… We are four guys trying to
start up a Danish BizTalk User Group.
&lt;/p&gt;
&lt;p&gt;
The first meeting is set to be on August 12’th with the following agenda:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Introduction to the User Group&lt;/li&gt;
&lt;li&gt;
Basic topic: The new mapper in BizTalk 2010 by Jan Eliasen&lt;/li&gt;
&lt;li&gt;
Advanced topic: Introduction to WF4 by Christian Stærk&lt;/li&gt;
&lt;li&gt;
Tools of the Trade: Pipeline Component Wizard by Jan Eliasen&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So as you can see, I’ll be speaking twice :) And unless someone else has a great topic,
I have an advanced topic lined up for the next meeting as well.
&lt;/p&gt;
&lt;p&gt;
You can find the official invitation here: 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:88cf58b8-dc3c-4db6-8c69-b37000793053" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/DanishBizTalkUserGroupstartingup_139CF/biztalk.brugergruppe.august.2010.pdf" target="_blank"&gt;biztalk
brugergruppe august 2010.pdf&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&amp;#160; – Danish only.&gt;
&lt;p&gt;
Everyone is invited, so please spread the word and the invitation.
&lt;/p&gt;
&lt;p&gt;
Thanks
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3f36f45e-1427-4349-be00-e9413567cd8a" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3f36f45e-1427-4349-be00-e9413567cd8a.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=04e70631-d227-433a-a498-09cbbe74592e</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,04e70631-d227-433a-a498-09cbbe74592e.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,04e70631-d227-433a-a498-09cbbe74592e.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=04e70631-d227-433a-a498-09cbbe74592e</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am extremely happy to announce, that today I was re-awarded the MVP title for BizTalk
Server for another year.
</p>
        <p>
This is my fourth MVP title and the third in a row.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=04e70631-d227-433a-a498-09cbbe74592e" />
      </body>
      <title>MVP once again</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,04e70631-d227-433a-a498-09cbbe74592e.aspx</guid>
      <link>http://blog.eliasen.dk/2010/07/01/MVPOnceAgain.aspx</link>
      <pubDate>Thu, 01 Jul 2010 19:26:46 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am extremely happy to announce, that today I was re-awarded the MVP title for BizTalk
Server for another year.
&lt;/p&gt;
&lt;p&gt;
This is my fourth MVP title and the third in a row.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=04e70631-d227-433a-a498-09cbbe74592e" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,04e70631-d227-433a-a498-09cbbe74592e.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=9752a49a-4a6e-4d59-a4dc-32e4a59d7282</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,9752a49a-4a6e-4d59-a4dc-32e4a59d7282.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,9752a49a-4a6e-4d59-a4dc-32e4a59d7282.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=9752a49a-4a6e-4d59-a4dc-32e4a59d7282</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I just had the funniest (NOT) experience (AGAIN) with the new BizTalk 2009 project
system.
</p>
        <p>
Somehow I had gotten into a situation, where I could add all the usual artifacts to
a BizTalk project except schemas. I could add orchestrations, send pipelines, receive
pipelines, maps, flat file schemas, property schemas, and flat file wizard schemas.
So the only thing I couldn’t add was “normal” schemas.
</p>
        <p>
I thought: Who cares? I can just add either a property schema or a flat file schema
instead and then change the necessary properties on it to make it a normal schema,
and that worked for me for some time.
</p>
        <p>
Then, I was contacted by Microsoft to test out a new QFE package that they have created
to fix an issue I have reported. The QFE package wouldn’t install, so i thought it
might have something to do with my project system being broken, so I chose to repair
my BizTalk installation.
</p>
        <p>
The result was, that now I can add “normal” schemas, but I can’t add orchestrations
and property schemas. Also, naturally, the QFE package still doesn’t install :-( So
I ended up unconfiguring, uninstalling, reinstalling and reconfiguring. Everything
seems normal now. But for how long?
</p>
        <p>
I really hope they have improved the project system for BizTalk 2010.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9752a49a-4a6e-4d59-a4dc-32e4a59d7282" />
      </body>
      <title>BizTalk 2009 Project System – Repair or no repair?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,9752a49a-4a6e-4d59-a4dc-32e4a59d7282.aspx</guid>
      <link>http://blog.eliasen.dk/2010/06/30/BizTalk2009ProjectSystemRepairOrNoRepair.aspx</link>
      <pubDate>Wed, 30 Jun 2010 20:11:27 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I just had the funniest (NOT) experience (AGAIN) with the new BizTalk 2009 project
system.
&lt;/p&gt;
&lt;p&gt;
Somehow I had gotten into a situation, where I could add all the usual artifacts to
a BizTalk project except schemas. I could add orchestrations, send pipelines, receive
pipelines, maps, flat file schemas, property schemas, and flat file wizard schemas.
So the only thing I couldn’t add was “normal” schemas.
&lt;/p&gt;
&lt;p&gt;
I thought: Who cares? I can just add either a property schema or a flat file schema
instead and then change the necessary properties on it to make it a normal schema,
and that worked for me for some time.
&lt;/p&gt;
&lt;p&gt;
Then, I was contacted by Microsoft to test out a new QFE package that they have created
to fix an issue I have reported. The QFE package wouldn’t install, so i thought it
might have something to do with my project system being broken, so I chose to repair
my BizTalk installation.
&lt;/p&gt;
&lt;p&gt;
The result was, that now I can add “normal” schemas, but I can’t add orchestrations
and property schemas. Also, naturally, the QFE package still doesn’t install :-( So
I ended up unconfiguring, uninstalling, reinstalling and reconfiguring. Everything
seems normal now. But for how long?
&lt;/p&gt;
&lt;p&gt;
I really hope they have improved the project system for BizTalk 2010.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9752a49a-4a6e-4d59-a4dc-32e4a59d7282" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,9752a49a-4a6e-4d59-a4dc-32e4a59d7282.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Frequently I get emails from people looking for my help with some BizTalk challenge
they are facing. Some times I just get a zipped version of a project containing schemas
and other artifacts that don’t even have anything to do with the issue – it was just
easier to send the entire thing and hope that I can figure it all out.
</p>
        <p>
So here comes a plea from me to all you people looking for help: Please, when you
send someone an email asking for help, prepare an SSCCE (See more here: <a title="http://sscce.org/" href="http://sscce.org/">http://sscce.org/</a>).
</p>
        <p>
I have plenty of things to look at, so if you take the time to prepare an SSCCE the
chances of me helping you increases by a multitude of 10 :-)
</p>
        <p>
Thanks!
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b" />
      </body>
      <title>Short, Self Contained, Correct (Compilable), Example</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b.aspx</guid>
      <link>http://blog.eliasen.dk/2010/05/30/ShortSelfContainedCorrectCompilableExample.aspx</link>
      <pubDate>Sun, 30 May 2010 19:21:14 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Frequently I get emails from people looking for my help with some BizTalk challenge
they are facing. Some times I just get a zipped version of a project containing schemas
and other artifacts that don’t even have anything to do with the issue – it was just
easier to send the entire thing and hope that I can figure it all out.
&lt;/p&gt;
&lt;p&gt;
So here comes a plea from me to all you people looking for help: Please, when you
send someone an email asking for help, prepare an SSCCE (See more here: &lt;a title="http://sscce.org/" href="http://sscce.org/"&gt;http://sscce.org/&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
I have plenty of things to look at, so if you take the time to prepare an SSCCE the
chances of me helping you increases by a multitude of 10 :-)
&lt;/p&gt;
&lt;p&gt;
Thanks!
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,eb67d757-ccfc-47c2-b7b0-8e73b67e4b7b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=33a28112-ab84-405a-ad3e-dcefcc6dfdc2</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,33a28112-ab84-405a-ad3e-dcefcc6dfdc2.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,33a28112-ab84-405a-ad3e-dcefcc6dfdc2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=33a28112-ab84-405a-ad3e-dcefcc6dfdc2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am just playing around with the new mapper in BizTalk 2010 beta (get it <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0f852e77-f792-4784-b2d4-95113d40db64&amp;displayLang=en" target="_blank">here</a>).
</p>
        <p>
I am happy to announce that the restrictions form the old versions of BizTalk regarding
placement of functoids that have the output from other functoids as input has been
removed.
</p>
        <p>
In the “old” days (pre-BizTalk 2010 beta), you would have some of the mapper grid
marked as inaccessible when you dragged a functoid that has the output form another
functoid as input like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_thumb.png" width="196" height="147" />
          </a>
        </p>
        <p>
With BizTalk 2010 Beta you can place the functoids were you like. All links have a
small arrow on them indicating the flow of information and you can therefore have
a setup like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_thumb_1.png" width="281" height="158" />
          </a>
        </p>
        <p>
Very nice and more flexible, I think.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=33a28112-ab84-405a-ad3e-dcefcc6dfdc2" />
      </body>
      <title>Placement of functoids on the mapper grid</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,33a28112-ab84-405a-ad3e-dcefcc6dfdc2.aspx</guid>
      <link>http://blog.eliasen.dk/2010/05/24/PlacementOfFunctoidsOnTheMapperGrid.aspx</link>
      <pubDate>Mon, 24 May 2010 13:10:16 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am just playing around with the new mapper in BizTalk 2010 beta (get it &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0f852e77-f792-4784-b2d4-95113d40db64&amp;amp;displayLang=en" target="_blank"&gt;here&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
I am happy to announce that the restrictions form the old versions of BizTalk regarding
placement of functoids that have the output from other functoids as input has been
removed.
&lt;/p&gt;
&lt;p&gt;
In the “old” days (pre-BizTalk 2010 beta), you would have some of the mapper grid
marked as inaccessible when you dragged a functoid that has the output form another
functoid as input like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_thumb.png" width="196" height="147" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
With BizTalk 2010 Beta you can place the functoids were you like. All links have a
small arrow on them indicating the flow of information and you can therefore have
a setup like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Placementoffunctoidsonthemappergrid_D1AE/image_thumb_1.png" width="281" height="158" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Very nice and more flexible, I think.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=33a28112-ab84-405a-ad3e-dcefcc6dfdc2" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,33a28112-ab84-405a-ad3e-dcefcc6dfdc2.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=bcba20c7-9eb8-4698-94e0-2687bd172a65</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,bcba20c7-9eb8-4698-94e0-2687bd172a65.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,bcba20c7-9eb8-4698-94e0-2687bd172a65.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=bcba20c7-9eb8-4698-94e0-2687bd172a65</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
As many of you know, I am writing this <a href="http://www.amazon.co.uk/Biztalk-Server-2009-R2-Unleashed/dp/0672331187" target="_blank">book</a> on
BizTalk along side some great names of the community.
</p>
        <p>
Anyway, I was just writing about the Scope shape for orchestrations and decided to
go through the documentation of this to see if I missed something. And indeed there
was a small detail I missed, which you can find at <a title="http://msdn.microsoft.com/en-us/library/aa560150(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa560150(BTS.10).aspx">http://msdn.microsoft.com/en-us/library/aa560150(BTS.10).aspx</a> –
it states that “You can nest scopes up to 44 levels deep.”
</p>
        <p>
I thought that was a funny number and decided to test it.
</p>
        <p>
So I started adding Scope shapes and at 19 nested Scope shapes I had this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_19_levels_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Scopes_19_levels" border="0" alt="Scopes_19_levels" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_19_levels_thumb.png" width="627" height="674" />
          </a>
        </p>
        <p>
which looks just fine. BUT, after adding an expression shape to the content of the
19’th Scope shape and adding the 20’th Scope shape I get this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_20_levels_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Scopes_20_levels" border="0" alt="Scopes_20_levels" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_20_levels_thumb.png" width="543" height="676" />
          </a>
        </p>
        <p>
which is not fine.
</p>
        <p>
So basically, the orchestration designer will not show you the Scopes at level 20
or deeper. You can still add them, though – and it compiles just fine even at 47 levels
of Scope shapes, actually – haven’t bothered trying more levels than that.
</p>
        <p>
Now, some of you (all of you?) may sit and wonder: Come on, how probable is it that
anyone will do that? An I completely agree – if you get above 10 levels of nested
Scope shapes you are most definitely going in the wrong direction :) I just wanted
to see if the documentation was correct on this.
</p>
        <p>
I hope this will help someone, but it probably won’t :)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bcba20c7-9eb8-4698-94e0-2687bd172a65" />
      </body>
      <title>Nesting Scope shapes more than 19 levels</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,bcba20c7-9eb8-4698-94e0-2687bd172a65.aspx</guid>
      <link>http://blog.eliasen.dk/2010/04/24/NestingScopeShapesMoreThan19Levels.aspx</link>
      <pubDate>Sat, 24 Apr 2010 09:48:05 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
As many of you know, I am writing this &lt;a href="http://www.amazon.co.uk/Biztalk-Server-2009-R2-Unleashed/dp/0672331187" target="_blank"&gt;book&lt;/a&gt; on
BizTalk along side some great names of the community.
&lt;/p&gt;
&lt;p&gt;
Anyway, I was just writing about the Scope shape for orchestrations and decided to
go through the documentation of this to see if I missed something. And indeed there
was a small detail I missed, which you can find at &lt;a title="http://msdn.microsoft.com/en-us/library/aa560150(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa560150(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa560150(BTS.10).aspx&lt;/a&gt; –
it states that “You can nest scopes up to 44 levels deep.”
&lt;/p&gt;
&lt;p&gt;
I thought that was a funny number and decided to test it.
&lt;/p&gt;
&lt;p&gt;
So I started adding Scope shapes and at 19 nested Scope shapes I had this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_19_levels_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Scopes_19_levels" border="0" alt="Scopes_19_levels" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_19_levels_thumb.png" width="627" height="674" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
which looks just fine. BUT, after adding an expression shape to the content of the
19’th Scope shape and adding the 20’th Scope shape I get this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_20_levels_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Scopes_20_levels" border="0" alt="Scopes_20_levels" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/NestingScopeshapesmorethan19levels_A5F7/Scopes_20_levels_thumb.png" width="543" height="676" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
which is not fine.
&lt;/p&gt;
&lt;p&gt;
So basically, the orchestration designer will not show you the Scopes at level 20
or deeper. You can still add them, though – and it compiles just fine even at 47 levels
of Scope shapes, actually – haven’t bothered trying more levels than that.
&lt;/p&gt;
&lt;p&gt;
Now, some of you (all of you?) may sit and wonder: Come on, how probable is it that
anyone will do that? An I completely agree – if you get above 10 levels of nested
Scope shapes you are most definitely going in the wrong direction :) I just wanted
to see if the documentation was correct on this.
&lt;/p&gt;
&lt;p&gt;
I hope this will help someone, but it probably won’t :)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bcba20c7-9eb8-4698-94e0-2687bd172a65" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,bcba20c7-9eb8-4698-94e0-2687bd172a65.aspx</comments>
      <category>BizTalk 2009</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=2a12c3cb-6a91-4e56-851d-25c331b2d507</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,2a12c3cb-6a91-4e56-851d-25c331b2d507.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,2a12c3cb-6a91-4e56-851d-25c331b2d507.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=2a12c3cb-6a91-4e56-851d-25c331b2d507</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
At times you may run into this error at compile time: “an atomic scope may not contain
a receive with a correlation filtration initialized in the same scope”. Not very many
posts exist on this topic so I thought I’d just share some thoughts on it.
</p>
        <p>
First of all, the error occurs because you have a Receive shape inside an atomic scope
and this Receive shape follows a correlation set that is initialized within the same
scope. This is not allowed, as explained here: <a title="http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx">http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx</a>.
</p>
        <p>
The reason for this limitation is, that everything that happens inside the Atomic
scope is not committed until the Scope shape finishes processing. If you at some point
initialize a correlation set inside the Atomic scope, then the subscriptions for any
Receive shapes that follow this correlation set cannot match the properties from the
correlation type because the routing engine cannot know about the values until the
Atomic transaction is committed.
</p>
        <p>
If you actually could follow a correlation set that is initialized within the same
Atomic scope you would end up in a deadlock because:
</p>
        <ol>
          <li>
The instance subscription is not created until the transaction commits</li>
          <li>
The transaction does not commit until the Receive shape has its message</li>
        </ol>
        <p>
So as you can see, the Receive shape would never get a message and therefore the transaction
would never commit.
</p>
        <p>
Hope this helps someone out there.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2a12c3cb-6a91-4e56-851d-25c331b2d507" />
      </body>
      <title>Atomic scope may not contain Receive that follows correlation set initialized inside scope</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,2a12c3cb-6a91-4e56-851d-25c331b2d507.aspx</guid>
      <link>http://blog.eliasen.dk/2010/04/05/AtomicScopeMayNotContainReceiveThatFollowsCorrelationSetInitializedInsideScope.aspx</link>
      <pubDate>Mon, 05 Apr 2010 14:04:06 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
At times you may run into this error at compile time: “an atomic scope may not contain
a receive with a correlation filtration initialized in the same scope”. Not very many
posts exist on this topic so I thought I’d just share some thoughts on it.
&lt;/p&gt;
&lt;p&gt;
First of all, the error occurs because you have a Receive shape inside an atomic scope
and this Receive shape follows a correlation set that is initialized within the same
scope. This is not allowed, as explained here: &lt;a title="http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The reason for this limitation is, that everything that happens inside the Atomic
scope is not committed until the Scope shape finishes processing. If you at some point
initialize a correlation set inside the Atomic scope, then the subscriptions for any
Receive shapes that follow this correlation set cannot match the properties from the
correlation type because the routing engine cannot know about the values until the
Atomic transaction is committed.
&lt;/p&gt;
&lt;p&gt;
If you actually could follow a correlation set that is initialized within the same
Atomic scope you would end up in a deadlock because:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The instance subscription is not created until the transaction commits&lt;/li&gt;
&lt;li&gt;
The transaction does not commit until the Receive shape has its message&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So as you can see, the Receive shape would never get a message and therefore the transaction
would never commit.
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone out there.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2a12c3cb-6a91-4e56-851d-25c331b2d507" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,2a12c3cb-6a91-4e56-851d-25c331b2d507.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=063625a2-8846-42a7-8c8d-0b9f4f791c6b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,063625a2-8846-42a7-8c8d-0b9f4f791c6b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,063625a2-8846-42a7-8c8d-0b9f4f791c6b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=063625a2-8846-42a7-8c8d-0b9f4f791c6b</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
When I run into some issues on web pages and report them, one of the things that almost
always happens is that they won’t deal with your request until you have deleted all
cookies and tried again. The support guys have some steps to guide the user through
before they can send anything on to the second level support. And this usually includes
getting the users to delete all cookies.
</p>
        <p>
Now, this is bad! IF there is an issue with the cookie for a particular web site,
then
</p>
        <ol>
          <li>
Deal with it in your server side code</li>
          <li>
Don’t ask me to delete ALL cookies, but instruct me to delete the one that is the
right one for your web site.</li>
        </ol>
        <p>
Deleting all cookies will make me start over entering usernames and passwords for
lots of web sites that are really not in any way impacted by the ongoing issue the
support guys are trying to solve. It may solve the problem, sure… but it sure isn’t
the RIGHT way to solve the issue. The right way would be to 
</p>
        <ol>
          <li>
Make sure the cookie doesn’t get corrupted</li>
          <li>
Handle the corrupt cookie in the server side code</li>
          <li>
Only delete the necessary cookies and not all cookies.</li>
        </ol>
        <p>
Asking customers to delete all cookies is just plain lazy.
</p>
        <p>
I have seen this from several web sites, and lately I actually got it from the mcp
support team. I emailed them that I get this screen frequently:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Deleteallcookiesandtryagain_A270/ErrorOnMCPSite_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ErrorOnMCPSite" border="0" alt="ErrorOnMCPSite" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Deleteallcookiesandtryagain_A270/ErrorOnMCPSite_thumb.png" width="803" height="624" />
          </a>
        </p>
        <p>
As you can see, the web page instructs me to click an icon to sign in, but the icon
is for signing out (Clicking it actually signs me out). Now, to me, this means that
the server side code is faulty. The code generates a page that at the same time instructs
me to sign in and to sign out. But, the reply from the mcp support team was that I
was told to delete all cookies and try again. I have emailed them that I don’t think
that is the right way to go about it and they have replied that deleting all cookies
won’t do my system any harm and I should do it and get back to them. Sure it won’t
harm my system, but it will for sure harm my user experience on all the web sites,
whose cookies have now disappeared.
</p>
        <p>
This is the way it always goes – not just with the mcp support team… I tell them it
is the wrong solution and they instruct me to do it anyway.
</p>
        <p>
Sigh…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=063625a2-8846-42a7-8c8d-0b9f4f791c6b" />
      </body>
      <title>Delete all cookies and try again</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,063625a2-8846-42a7-8c8d-0b9f4f791c6b.aspx</guid>
      <link>http://blog.eliasen.dk/2010/04/05/DeleteAllCookiesAndTryAgain.aspx</link>
      <pubDate>Mon, 05 Apr 2010 09:33:09 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
When I run into some issues on web pages and report them, one of the things that almost
always happens is that they won’t deal with your request until you have deleted all
cookies and tried again. The support guys have some steps to guide the user through
before they can send anything on to the second level support. And this usually includes
getting the users to delete all cookies.
&lt;/p&gt;
&lt;p&gt;
Now, this is bad! IF there is an issue with the cookie for a particular web site,
then
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Deal with it in your server side code&lt;/li&gt;
&lt;li&gt;
Don’t ask me to delete ALL cookies, but instruct me to delete the one that is the
right one for your web site.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Deleting all cookies will make me start over entering usernames and passwords for
lots of web sites that are really not in any way impacted by the ongoing issue the
support guys are trying to solve. It may solve the problem, sure… but it sure isn’t
the RIGHT way to solve the issue. The right way would be to 
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Make sure the cookie doesn’t get corrupted&lt;/li&gt;
&lt;li&gt;
Handle the corrupt cookie in the server side code&lt;/li&gt;
&lt;li&gt;
Only delete the necessary cookies and not all cookies.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Asking customers to delete all cookies is just plain lazy.
&lt;/p&gt;
&lt;p&gt;
I have seen this from several web sites, and lately I actually got it from the mcp
support team. I emailed them that I get this screen frequently:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Deleteallcookiesandtryagain_A270/ErrorOnMCPSite_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ErrorOnMCPSite" border="0" alt="ErrorOnMCPSite" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Deleteallcookiesandtryagain_A270/ErrorOnMCPSite_thumb.png" width="803" height="624" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see, the web page instructs me to click an icon to sign in, but the icon
is for signing out (Clicking it actually signs me out). Now, to me, this means that
the server side code is faulty. The code generates a page that at the same time instructs
me to sign in and to sign out. But, the reply from the mcp support team was that I
was told to delete all cookies and try again. I have emailed them that I don’t think
that is the right way to go about it and they have replied that deleting all cookies
won’t do my system any harm and I should do it and get back to them. Sure it won’t
harm my system, but it will for sure harm my user experience on all the web sites,
whose cookies have now disappeared.
&lt;/p&gt;
&lt;p&gt;
This is the way it always goes – not just with the mcp support team… I tell them it
is the wrong solution and they instruct me to do it anyway.
&lt;/p&gt;
&lt;p&gt;
Sigh…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=063625a2-8846-42a7-8c8d-0b9f4f791c6b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,063625a2-8846-42a7-8c8d-0b9f4f791c6b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=73019874-5d77-44f0-bda9-022d02439072</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,73019874-5d77-44f0-bda9-022d02439072.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,73019874-5d77-44f0-bda9-022d02439072.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=73019874-5d77-44f0-bda9-022d02439072</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am trying out BizTalk 2010 beta, and just discovered a small glitch, will I will
describe here and then email a link to the blog post to Microsoft to let them know
about it.
</p>
        <p>
I have a very simple solution:
</p>
        <p>
I have a C# project which is a helper class, which I will be using from my orchestration
in another project.
</p>
        <p>
The project structure is as you can see here:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb.png" width="395" height="107" />
          </a>
        </p>
        <p>
The helper class only has one class with one method which looks like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">const</span>
              <span style="color: #0000ff">string</span> XPATH
= <span style="color: #006080">"Some XPath expression"</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">static</span>
              <span style="color: #0000ff">void</span> ChangeXmlDocument(XmlDocument
xmldoc)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> xmldoc.SelectSingleNode(XPATH).InnerText
= <span style="color: #006080">"New value!"</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
So it just changes the value of an element in the XML that is given to it as a parameter.
</p>
        <p>
The second project only contains a schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb_1.png" width="123" height="92" />
          </a>
        </p>
        <p>
and an orchestration:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb_2.png" width="382" height="242" />
          </a>
        </p>
        <p>
The orchestration just picks up a message and then calls the helper class with the
message as a parameter.
</p>
        <p>
So, the deployment properties are set on the BizTalk project, so I right click it
and choose to deploy it. It deploys fine.
</p>
        <p>
I then entered BizTalk Server Administration, and created a new receive port and a
receive location for it. I enabled the receive location and I bind the receive port
to the Orchestrations receive port.
</p>
        <p>
When enlisting the orchestration, I get this error:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_8.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb_3.png" width="615" height="180" />
          </a>
        </p>
        <p>
Error message (For the benefit of search engines):
</p>
        <p>
Could not enlist orchestration ‘strong name of orchestration’. Could not load file
or assembly ‘Strong name of helper class’  or one of its dependencies. The system
cannot find the file specified. (Microsoft.BizTalk.ExplorerOM)
</p>
        <p>
So I am thinking that the error is because I forgot to GAC the helper class and the
administration console wants to alert me to this. Not sure I like that, but ok – I’ll
GAC it. That didn’t help, though.
</p>
        <p>
So I thought: Maybe a refresh of the administration console, so I right clicked on
the application with the orchestration and chose “Refresh”. That didn’t help.
</p>
        <p>
Then I thought: I’ll right click the “Applications” node in Administration console
and chose “Refresh”. That didn’t help either.
</p>
        <p>
Then I tried to chose “Refresh” on the BizTalk Group node in Administration Console.
That didn’t help either.
</p>
        <p>
So, as it turns out, there are two options to fix this error.
</p>
        <ol>
          <li>
Restart BizTalk Server Administration Console</li>
          <li>
Add the helper class as a resource in Administration Console</li>
        </ol>
        <p>
Neither should be necessary, I think… 
</p>
        <p>
Hope this helps someone.
</p>
        <p>
You can find my solution here: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:6b94693d-1f19-4cd7-bd8e-a00d8e46ef02" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/eliasen.reproduce.AssemblyNotFoundWhenEnlisting.zip" target="_blank">eliasen.reproduce.AssemblyNotFoundWhenEnlisting.zip</a>
          </div>
        </div>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=73019874-5d77-44f0-bda9-022d02439072" />
      </body>
      <title>Cannot enlist orchestration because assembly not found</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,73019874-5d77-44f0-bda9-022d02439072.aspx</guid>
      <link>http://blog.eliasen.dk/2010/04/05/CannotEnlistOrchestrationBecauseAssemblyNotFound.aspx</link>
      <pubDate>Mon, 05 Apr 2010 09:05:34 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am trying out BizTalk 2010 beta, and just discovered a small glitch, will I will
describe here and then email a link to the blog post to Microsoft to let them know
about it.
&lt;/p&gt;
&lt;p&gt;
I have a very simple solution:
&lt;/p&gt;
&lt;p&gt;
I have a C# project which is a helper class, which I will be using from my orchestration
in another project.
&lt;/p&gt;
&lt;p&gt;
The project structure is as you can see here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb.png" width="395" height="107" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The helper class only has one class with one method which looks like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; XPATH
= &lt;span style="color: #006080"&gt;&amp;quot;Some XPath expression&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ChangeXmlDocument(XmlDocument
xmldoc)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; xmldoc.SelectSingleNode(XPATH).InnerText
= &lt;span style="color: #006080"&gt;&amp;quot;New value!&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
So it just changes the value of an element in the XML that is given to it as a parameter.
&lt;/p&gt;
&lt;p&gt;
The second project only contains a schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb_1.png" width="123" height="92" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
and an orchestration:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb_2.png" width="382" height="242" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The orchestration just picks up a message and then calls the helper class with the
message as a parameter.
&lt;/p&gt;
&lt;p&gt;
So, the deployment properties are set on the BizTalk project, so I right click it
and choose to deploy it. It deploys fine.
&lt;/p&gt;
&lt;p&gt;
I then entered BizTalk Server Administration, and created a new receive port and a
receive location for it. I enabled the receive location and I bind the receive port
to the Orchestrations receive port.
&lt;/p&gt;
&lt;p&gt;
When enlisting the orchestration, I get this error:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/image_thumb_3.png" width="615" height="180" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Error message (For the benefit of search engines):
&lt;/p&gt;
&lt;p&gt;
Could not enlist orchestration ‘strong name of orchestration’. Could not load file
or assembly ‘Strong name of helper class’&amp;#160; or one of its dependencies. The system
cannot find the file specified. (Microsoft.BizTalk.ExplorerOM)
&lt;/p&gt;
&lt;p&gt;
So I am thinking that the error is because I forgot to GAC the helper class and the
administration console wants to alert me to this. Not sure I like that, but ok – I’ll
GAC it. That didn’t help, though.
&lt;/p&gt;
&lt;p&gt;
So I thought: Maybe a refresh of the administration console, so I right clicked on
the application with the orchestration and chose “Refresh”. That didn’t help.
&lt;/p&gt;
&lt;p&gt;
Then I thought: I’ll right click the “Applications” node in Administration console
and chose “Refresh”. That didn’t help either.
&lt;/p&gt;
&lt;p&gt;
Then I tried to chose “Refresh” on the BizTalk Group node in Administration Console.
That didn’t help either.
&lt;/p&gt;
&lt;p&gt;
So, as it turns out, there are two options to fix this error.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Restart BizTalk Server Administration Console&lt;/li&gt;
&lt;li&gt;
Add the helper class as a resource in Administration Console&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Neither should be necessary, I think… 
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone.
&lt;/p&gt;
&lt;p&gt;
You can find my solution here: 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:6b94693d-1f19-4cd7-bd8e-a00d8e46ef02" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Cannotenlistorchestrationbecauseassembly_9BFB/eliasen.reproduce.AssemblyNotFoundWhenEnlisting.zip" target="_blank"&gt;eliasen.reproduce.AssemblyNotFoundWhenEnlisting.zip&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=73019874-5d77-44f0-bda9-022d02439072" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,73019874-5d77-44f0-bda9-022d02439072.aspx</comments>
      <category>BizTalk 2010</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c8933bc0-ee41-4fb5-ada4-a22024822764</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c8933bc0-ee41-4fb5-ada4-a22024822764.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c8933bc0-ee41-4fb5-ada4-a22024822764.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c8933bc0-ee41-4fb5-ada4-a22024822764</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I discovered something, that AGAIN confirms, that BizTalk 2009 was simply shipped
without any form of proper testing of the new Visual Studio .NET project system that
they chose to switch to. I have already described lots of issues here: <a title="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx" href="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx">http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx</a> and
a hotfix has been releases which I have shortly described here: <a title="http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx" href="http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx">http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx</a>.
</p>
        <p>
Anyways, the issue is, that I created a property schema in my project, and in this
property schema I created four properties. I then opened up the orchestration I had
in the same project and created a Correlation Type, that used these four properties.
That gave me this error:
</p>
        <p>
identifier 'PropertyName' does not exist in 'ProjectName'; are you missing an assembly
reference?
</p>
        <p>
So basically, when compiling, the new property cannot be found. Turns out, though,
that if I compile the project and THEN use the properties in a Correlation Type, then
everything works just fine. What a lousy deal…
</p>
        <p>
The hotfix mentioned above does not seem to rectify this issue, so this remains an
issue, I think.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c8933bc0-ee41-4fb5-ada4-a22024822764" />
      </body>
      <title>Property fields not found when creating a Correlation Type and compiling</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c8933bc0-ee41-4fb5-ada4-a22024822764.aspx</guid>
      <link>http://blog.eliasen.dk/2010/03/07/PropertyFieldsNotFoundWhenCreatingACorrelationTypeAndCompiling.aspx</link>
      <pubDate>Sun, 07 Mar 2010 19:35:43 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I discovered something, that AGAIN confirms, that BizTalk 2009 was simply shipped
without any form of proper testing of the new Visual Studio .NET project system that
they chose to switch to. I have already described lots of issues here: &lt;a title="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx" href="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx"&gt;http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx&lt;/a&gt; and
a hotfix has been releases which I have shortly described here: &lt;a title="http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx" href="http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx"&gt;http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Anyways, the issue is, that I created a property schema in my project, and in this
property schema I created four properties. I then opened up the orchestration I had
in the same project and created a Correlation Type, that used these four properties.
That gave me this error:
&lt;/p&gt;
&lt;p&gt;
identifier 'PropertyName' does not exist in 'ProjectName'; are you missing an assembly
reference?
&lt;/p&gt;
&lt;p&gt;
So basically, when compiling, the new property cannot be found. Turns out, though,
that if I compile the project and THEN use the properties in a Correlation Type, then
everything works just fine. What a lousy deal…
&lt;/p&gt;
&lt;p&gt;
The hotfix mentioned above does not seem to rectify this issue, so this remains an
issue, I think.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c8933bc0-ee41-4fb5-ada4-a22024822764" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c8933bc0-ee41-4fb5-ada4-a22024822764.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just installed VMware WorkStation 7.0.1 in order to start building 64bit guest
OS’es in order to try out Windows Server 2008 R2 and SharePoint 2010. Microsoft Virtual
PC does not support 64bit guest operating systems, and since I really appreciate being
able to run guest operating systems in a window on my host PC I saw no other way out
than getting and installing VMware WorkStation.
</p>
        <p>
Now, after installing it, I tried to create my first Windows 2008 R2 virtual machine,
but that failed because I hadn’t enabled Virtualization Technology (VT) in my BIOS.
So I rebooted, entered BIOS and enabled it. That worked fine, and I now have a virtual
machine running Windows 2008 R2 64bit.
</p>
        <p>
BUT, when I then wanted to fire up one of my old Microsoft Virtual PC virtual machines
that I had earlier saved, I got an error saying that the saved file was corrupt. I
had the choice of deleting the saved file or doing nothing. Since I needed the VPC,
I chose to delete the saved file information and hope that I could recreate what was
then lost.
</p>
        <p>
Then, when starting up my next saved virtual machine from Microsoft Virtual PC, I
got the same error. I have now played around with it, and it simply seems that if
I save the state of a VPC and then turn on VT, the file gets corrupted and cannot
be used :-( I even tried saving state when VT was enabled, and then I disabled it
and reenabled it. Saved file was again corrupt :-(
</p>
        <p>
This REALLY sucks! This means that you need to be really careful with when you save
the state and when you do not… 
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c" />
      </body>
      <title>Virtualization Technology messed up saved state for Virtual PCs</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c.aspx</guid>
      <link>http://blog.eliasen.dk/2010/03/07/VirtualizationTechnologyMessedUpSavedStateForVirtualPCs.aspx</link>
      <pubDate>Sun, 07 Mar 2010 10:03:41 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just installed VMware WorkStation 7.0.1 in order to start building 64bit guest
OS’es in order to try out Windows Server 2008 R2 and SharePoint 2010. Microsoft Virtual
PC does not support 64bit guest operating systems, and since I really appreciate being
able to run guest operating systems in a window on my host PC I saw no other way out
than getting and installing VMware WorkStation.
&lt;/p&gt;
&lt;p&gt;
Now, after installing it, I tried to create my first Windows 2008 R2 virtual machine,
but that failed because I hadn’t enabled Virtualization Technology (VT) in my BIOS.
So I rebooted, entered BIOS and enabled it. That worked fine, and I now have a virtual
machine running Windows 2008 R2 64bit.
&lt;/p&gt;
&lt;p&gt;
BUT, when I then wanted to fire up one of my old Microsoft Virtual PC virtual machines
that I had earlier saved, I got an error saying that the saved file was corrupt. I
had the choice of deleting the saved file or doing nothing. Since I needed the VPC,
I chose to delete the saved file information and hope that I could recreate what was
then lost.
&lt;/p&gt;
&lt;p&gt;
Then, when starting up my next saved virtual machine from Microsoft Virtual PC, I
got the same error. I have now played around with it, and it simply seems that if
I save the state of a VPC and then turn on VT, the file gets corrupted and cannot
be used :-( I even tried saving state when VT was enabled, and then I disabled it
and reenabled it. Saved file was again corrupt :-(
&lt;/p&gt;
&lt;p&gt;
This REALLY sucks! This means that you need to be really careful with when you save
the state and when you do not… 
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3e5188b8-6f8b-41f8-8df7-c6ba4f7a6a2c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=7c10bb7a-511d-4d47-9e6a-65a52be56029</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,7c10bb7a-511d-4d47-9e6a-65a52be56029.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,7c10bb7a-511d-4d47-9e6a-65a52be56029.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=7c10bb7a-511d-4d47-9e6a-65a52be56029</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just to let you all know, that <a href="http://blog.noveli.fr/" target="_blank">David
GROSPELIER</a> has written a BizTalk 2009 book in French that is about to be published.
</p>
        <p>
You can find the book at <a href="http://www.amazon.co.uk/BizTalk-Server-2009-oeuvre-op%C3%A9rationnelle/dp/2746053349" target="_blank">Amazon</a> and
at <a href="http://www.editions-eni.fr/Livres/BizTalk-Server-2009-Mise-en-oeuvre-operationnelle/.6_3a6222cf-b921-41f5-886c-c989f77ba994_023b8832-f827-4c9e-b25e-55e91e78fe2d_3a2e5880-f9f6-4df4-8f39-e77637a8fee7_1_0_d9bd8b5e-f324-473f-b1fc-b41b421c950f.html?xtor=AL-50048" target="_blank">Editions-ENI</a>.
</p>
        <p>
David has been so kind as to mention my collection of functoids from <a href="http://eebiztalkfunctoids.codeplex.com">http://eebiztalkfunctoids.codeplex.com</a> several
times in the book, and since it is in French, I have not bothered to check what has
been written, but trust that David knows what he is talking about :-)
</p>
        <p>
So… go check it out! :-)
</p>
        <p>
-- 
<br />
Eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=7c10bb7a-511d-4d47-9e6a-65a52be56029" />
      </body>
      <title>New BizTalk book in French is out</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,7c10bb7a-511d-4d47-9e6a-65a52be56029.aspx</guid>
      <link>http://blog.eliasen.dk/2010/03/02/NewBizTalkBookInFrenchIsOut.aspx</link>
      <pubDate>Tue, 02 Mar 2010 20:16:14 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just to let you all know, that &lt;a href="http://blog.noveli.fr/" target="_blank"&gt;David
GROSPELIER&lt;/a&gt; has written a BizTalk 2009 book in French that is about to be published.
&lt;/p&gt;
&lt;p&gt;
You can find the book at &lt;a href="http://www.amazon.co.uk/BizTalk-Server-2009-oeuvre-op%C3%A9rationnelle/dp/2746053349" target="_blank"&gt;Amazon&lt;/a&gt; and
at &lt;a href="http://www.editions-eni.fr/Livres/BizTalk-Server-2009-Mise-en-oeuvre-operationnelle/.6_3a6222cf-b921-41f5-886c-c989f77ba994_023b8832-f827-4c9e-b25e-55e91e78fe2d_3a2e5880-f9f6-4df4-8f39-e77637a8fee7_1_0_d9bd8b5e-f324-473f-b1fc-b41b421c950f.html?xtor=AL-50048" target="_blank"&gt;Editions-ENI&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
David has been so kind as to mention my collection of functoids from &lt;a href="http://eebiztalkfunctoids.codeplex.com"&gt;http://eebiztalkfunctoids.codeplex.com&lt;/a&gt; several
times in the book, and since it is in French, I have not bothered to check what has
been written, but trust that David knows what he is talking about :-)
&lt;/p&gt;
&lt;p&gt;
So… go check it out! :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
Eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=7c10bb7a-511d-4d47-9e6a-65a52be56029" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,7c10bb7a-511d-4d47-9e6a-65a52be56029.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d53789a5-77f8-4560-81be-0d792df9de23</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d53789a5-77f8-4560-81be-0d792df9de23.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d53789a5-77f8-4560-81be-0d792df9de23.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d53789a5-77f8-4560-81be-0d792df9de23</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Lots of people think, that if they use a Parallel Actions shape, they get things done
in parallel. Well, rethink that. An orchestration executes in just one thread, so
no chance of getting anything to run in parallel. At runtime, the shapes in the parallel
shape are simply serialized.
</p>
        <p>
But what is the algorithm, then?
</p>
        <p>
Well, I did some tests. First of all, I created this simple orchestration:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb.png" width="568" height="618" />
          </a>
        </p>
        <p>
It’s a receive shape to fire up the orchestration and then a parallel shape with four
branches and five expression shapes in each. The code in each expression shape is
this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> System.Diagnostics.Trace.WriteLine(<span style="color: #006080">"X.
Y"</span>);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
where X is a number indicating the branch and Y is a sequence number within the branch.
This means that X=2 and Y=3 is the third expression shape in the second branch and
X=4 and Y=1 is the first expression shape in the fourth branch.
</p>
        <p>
Running this orchestration I get this result from DebugView:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_1.png" width="434" height="380" />
          </a>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
So as you can see, the entire first branch is executed, then the entire second branch,
and so on until the fourth branch has finished. Sounds easy enough. But lets try some
other scenarios like this one:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_2.png" width="567" height="687" />
          </a>
        </p>
        <p>
In essence I have thrown in a receive shape in branch 2 to see if branches three and
four will still have to wait until branch 2 has finished.
</p>
        <p>
The result can be seen here:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_8.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_3.png" width="434" height="380" />
          </a>
        </p>
        <p>
So as you can see, the second branch stops after the second shape because now it awaits
the receive shape. Branches three and four are then executed and after I send in a
message for the receive shape, the second branch completes.
</p>
        <p>
So some form of parallelism is actually achieved, but only when a shape takes too
long to handle. Lets see what happens with a Delay shape instead like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_10.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_4.png" width="567" height="686" />
          </a>
        </p>
        <p>
I have switched the Receive Shape for a Delay shape, and I have set the Delay shape
to wait for 100 milliseconds. The result of this is the same as with the Receive shape:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_12.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_5.png" width="434" height="380" />
          </a>
        </p>
        <p>
Then I tried setting the Delay shape to just 1 millisecond, but this gave the same
result.
</p>
        <p>
With shapes that take time in two branches, like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_14.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_6.png" width="567" height="686" />
          </a>
        </p>
        <p>
And the Delay is still set at one millisecond. I get the following result:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_16.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_7.png" width="434" height="380" />
          </a>
        </p>
        <p>
So as you can see, the Receive shape causes branch 2 to stop executing, and the Delay
shape causes branch 3 to stop executing, allowing branch 4 to execute. Branch 3 is
then executed because the Delay shape has finished and finally once the message for
the Receive shape has arrived, branch 2 is executed to its end.
</p>
        <p>
Another thing to note is, that the Delay shape actually doesn’t make the thread sleep.
If it did, we couldn’t continue in another branch once a Delay shape is run. This
makes perfectly sense, since the shapes in one branch are to be seen as a mini-process
within the big process, and the delay that is needed for that mini-process shouldn’t
affect the other branches. This is exemplified in this process:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_22.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_10.png" width="568" height="617" />
          </a> 
</p>
        <p>
The third expression shape in the first branch has been updated to this code:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 46px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> System.Diagnostics.Trace.WriteLine(<span style="color: #006080">"1.
3"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> System.Threading.Thread.Sleep(2000);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
 
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_18.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_8.png" width="434" height="380" />
          </a>
        </p>
        <p>
So as you can see, even though the first branch must wait for 2 seconds, it still
executes completely before the second branch is started. 
</p>
        <p>
So, takeaways:
</p>
        <ol>
          <li>
The Parallel Actions shape does NOT mean you get any multi-threading execution environment. 
</li>
          <li>
Think of the PArallel Actions shape as a way of letting multiple Business Activities
happen and you don’t know in what order they will occur. 
</li>
          <li>
The Delay shape does not use Thread.Sleep, but instead handles things internally. 
</li>
        </ol>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d53789a5-77f8-4560-81be-0d792df9de23" />
      </body>
      <title>How the Parallel Actions shape works</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d53789a5-77f8-4560-81be-0d792df9de23.aspx</guid>
      <link>http://blog.eliasen.dk/2010/02/02/HowTheParallelActionsShapeWorks.aspx</link>
      <pubDate>Tue, 02 Feb 2010 19:27:56 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Lots of people think, that if they use a Parallel Actions shape, they get things done
in parallel. Well, rethink that. An orchestration executes in just one thread, so
no chance of getting anything to run in parallel. At runtime, the shapes in the parallel
shape are simply serialized.
&lt;/p&gt;
&lt;p&gt;
But what is the algorithm, then?
&lt;/p&gt;
&lt;p&gt;
Well, I did some tests. First of all, I created this simple orchestration:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb.png" width="568" height="618" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
It’s a receive shape to fire up the orchestration and then a parallel shape with four
branches and five expression shapes in each. The code in each expression shape is
this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; System.Diagnostics.Trace.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;X.
Y&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
where X is a number indicating the branch and Y is a sequence number within the branch.
This means that X=2 and Y=3 is the third expression shape in the second branch and
X=4 and Y=1 is the first expression shape in the fourth branch.
&lt;/p&gt;
&lt;p&gt;
Running this orchestration I get this result from DebugView:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_1.png" width="434" height="380" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
So as you can see, the entire first branch is executed, then the entire second branch,
and so on until the fourth branch has finished. Sounds easy enough. But lets try some
other scenarios like this one:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_2.png" width="567" height="687" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In essence I have thrown in a receive shape in branch 2 to see if branches three and
four will still have to wait until branch 2 has finished.
&lt;/p&gt;
&lt;p&gt;
The result can be seen here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_3.png" width="434" height="380" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So as you can see, the second branch stops after the second shape because now it awaits
the receive shape. Branches three and four are then executed and after I send in a
message for the receive shape, the second branch completes.
&lt;/p&gt;
&lt;p&gt;
So some form of parallelism is actually achieved, but only when a shape takes too
long to handle. Lets see what happens with a Delay shape instead like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_4.png" width="567" height="686" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I have switched the Receive Shape for a Delay shape, and I have set the Delay shape
to wait for 100 milliseconds. The result of this is the same as with the Receive shape:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_5.png" width="434" height="380" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Then I tried setting the Delay shape to just 1 millisecond, but this gave the same
result.
&lt;/p&gt;
&lt;p&gt;
With shapes that take time in two branches, like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_6.png" width="567" height="686" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
And the Delay is still set at one millisecond. I get the following result:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_16.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_7.png" width="434" height="380" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So as you can see, the Receive shape causes branch 2 to stop executing, and the Delay
shape causes branch 3 to stop executing, allowing branch 4 to execute. Branch 3 is
then executed because the Delay shape has finished and finally once the message for
the Receive shape has arrived, branch 2 is executed to its end.
&lt;/p&gt;
&lt;p&gt;
Another thing to note is, that the Delay shape actually doesn’t make the thread sleep.
If it did, we couldn’t continue in another branch once a Delay shape is run. This
makes perfectly sense, since the shapes in one branch are to be seen as a mini-process
within the big process, and the delay that is needed for that mini-process shouldn’t
affect the other branches. This is exemplified in this process:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_22.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_10.png" width="568" height="617" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
The third expression shape in the first branch has been updated to this code:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 46px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; System.Diagnostics.Trace.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;1.
3&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; System.Threading.Thread.Sleep(2000);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_18.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/HowtheParallelActionsshapeworks_8222/image_thumb_8.png" width="434" height="380" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So as you can see, even though the first branch must wait for 2 seconds, it still
executes completely before the second branch is started. 
&lt;/p&gt;
&lt;p&gt;
So, takeaways:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The Parallel Actions shape does NOT mean you get any multi-threading execution environment. 
&lt;/li&gt;
&lt;li&gt;
Think of the PArallel Actions shape as a way of letting multiple Business Activities
happen and you don’t know in what order they will occur. 
&lt;/li&gt;
&lt;li&gt;
The Delay shape does not use Thread.Sleep, but instead handles things internally. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d53789a5-77f8-4560-81be-0d792df9de23" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d53789a5-77f8-4560-81be-0d792df9de23.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=bddf5867-c130-4885-93fa-b82e2cf92e33</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,bddf5867-c130-4885-93fa-b82e2cf92e33.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,bddf5867-c130-4885-93fa-b82e2cf92e33.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=bddf5867-c130-4885-93fa-b82e2cf92e33</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A hot fix has been released, which is quite poorly described, but which supposedly
fixes some of the issues I have described at <a title="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx" href="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx">http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx</a></p>
        <p>
The hotfix is available at <a title="http://support.microsoft.com/kb/977428/en-us" href="http://support.microsoft.com/kb/977428/en-us">http://support.microsoft.com/kb/977428/en-us</a></p>
        <p>
 
</p>
        <p>
Good luck :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bddf5867-c130-4885-93fa-b82e2cf92e33" />
      </body>
      <title>Hotfix for issues with developing BizTalk 2009 solutions in Visual Studio</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,bddf5867-c130-4885-93fa-b82e2cf92e33.aspx</guid>
      <link>http://blog.eliasen.dk/2010/01/27/HotfixForIssuesWithDevelopingBizTalk2009SolutionsInVisualStudio.aspx</link>
      <pubDate>Wed, 27 Jan 2010 07:05:16 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A hot fix has been released, which is quite poorly described, but which supposedly
fixes some of the issues I have described at &lt;a title="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx" href="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx"&gt;http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The hotfix is available at &lt;a title="http://support.microsoft.com/kb/977428/en-us" href="http://support.microsoft.com/kb/977428/en-us"&gt;http://support.microsoft.com/kb/977428/en-us&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Good luck :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bddf5867-c130-4885-93fa-b82e2cf92e33" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,bddf5867-c130-4885-93fa-b82e2cf92e33.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=ed0f9c81-c349-469e-bb58-dffb0441cb1b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,ed0f9c81-c349-469e-bb58-dffb0441cb1b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,ed0f9c81-c349-469e-bb58-dffb0441cb1b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=ed0f9c81-c349-469e-bb58-dffb0441cb1b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I started receiving this error in the event log every time I tried to test my
custom functoid in a map on the receive port.
</p>
        <p>
A message received by adapter "FILE" on receive location "Receive Location3"
with URI "C:\Projects\TestCumulativeFunctoid\TestCumulativeFunctoid\Instances\In\*Copy*.xml"
is suspended. 
<br />
Error details: The system cannot find the file specified. (Exception from HRESULT:
0x80070002) 
<br />
MessageId:  {5C621C74-A873-4E68-84E0-D0621DF9471E} 
<br />
InstanceID: {21D3DCEC-7C1C-4865-BB46-6D1BF6FAC7AA}
</p>
        <p>
The map worked fine in Visual Studio and I was quite confused and even restarted my
machine.
</p>
        <p>
It turned out that I had forgotten to sign the assembly with the functoid, so the
script I have to deploy a new functoid failed when adding the assembly to the GAC,
which I didn’t notice, since the script runs so fast I never see the result :-)
</p>
        <p>
But really.. why can’t an error like that contain the name of the file that cannot
be found?
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ed0f9c81-c349-469e-bb58-dffb0441cb1b" />
      </body>
      <title>The system cannot find the file specified</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,ed0f9c81-c349-469e-bb58-dffb0441cb1b.aspx</guid>
      <link>http://blog.eliasen.dk/2010/01/17/TheSystemCannotFindTheFileSpecified.aspx</link>
      <pubDate>Sun, 17 Jan 2010 23:39:50 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I started receiving this error in the event log every time I tried to test my
custom functoid in a map on the receive port.
&lt;/p&gt;
&lt;p&gt;
A message received by adapter &amp;quot;FILE&amp;quot; on receive location &amp;quot;Receive Location3&amp;quot;
with URI &amp;quot;C:\Projects\TestCumulativeFunctoid\TestCumulativeFunctoid\Instances\In\*Copy*.xml&amp;quot;
is suspended. 
&lt;br /&gt;
Error details: The system cannot find the file specified. (Exception from HRESULT:
0x80070002) 
&lt;br /&gt;
MessageId:&amp;#160; {5C621C74-A873-4E68-84E0-D0621DF9471E} 
&lt;br /&gt;
InstanceID: {21D3DCEC-7C1C-4865-BB46-6D1BF6FAC7AA}
&lt;/p&gt;
&lt;p&gt;
The map worked fine in Visual Studio and I was quite confused and even restarted my
machine.
&lt;/p&gt;
&lt;p&gt;
It turned out that I had forgotten to sign the assembly with the functoid, so the
script I have to deploy a new functoid failed when adding the assembly to the GAC,
which I didn’t notice, since the script runs so fast I never see the result :-)
&lt;/p&gt;
&lt;p&gt;
But really.. why can’t an error like that contain the name of the file that cannot
be found?
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ed0f9c81-c349-469e-bb58-dffb0441cb1b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,ed0f9c81-c349-469e-bb58-dffb0441cb1b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=4c31c1dc-9d55-4b9b-afae-5c7110cb12f1</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,4c31c1dc-9d55-4b9b-afae-5c7110cb12f1.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,4c31c1dc-9d55-4b9b-afae-5c7110cb12f1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=4c31c1dc-9d55-4b9b-afae-5c7110cb12f1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I just did a post on developing a custom cumulative functoid. You can find it here: <a title="http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx" href="http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx">http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx</a></p>
        <p>
At the very end of the post I write that you should NEVER develop a custom referenced
cumulative functoid but instead develop a custom inline cumulative functoid. Given
the title of this blog post, probably by now you know why this is :-)
</p>
        <p>
When I developed my first cumulative functoid, I developed a referenced functoid,
since this is what I prefer. I tested it on an input and it worked fine. Then I deployed
it and threw 1023 copies of the same message through BizTalk at the same time. My
test solution had two very simple schemas:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_2_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image_2" border="0" alt="image_2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_2_thumb.png" width="129" height="62" />
          </a> Source
schema.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_4_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image_4" border="0" alt="image_4" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_4_thumb.png" width="129" height="57" />
          </a> Destination
schema.
</p>
        <p>
The field “Field1” in the source schema has a maxOccurs = unbounded and the field
“Field1” in the destination schema has maxOccurs = 1.
</p>
        <p>
I then created a simple map between them:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_6_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image_6" border="0" alt="image_6" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_6_thumb.png" width="369" height="65" />
          </a> 
</p>
        <p>
        </p>
        <p>
        </p>
        <p>
The map merely utilizes my “Cumulative Comma” functoid (Yes, I know the screen shot
is of another functoid. Sorry about that… :-) ) to get all occurrences of “Field1”
in the source schema concatenated into one value separated by commas that is output
to the “Field1” node in the output.
</p>
        <p>
My 1023 test instanced all have 10 instances of the “Field1” in the input, so all
output XML should have these ten values in a comma separated list in the “Field1”
element in the output schema.
</p>
        <p>
Basically, what I found was, that it was quite unpredictable what the outcome of that
was. Some of the output XML has a completely empty “Field1” element. Others had perhaps
42 values in their comma separated list. About 42% of the output files had the right
number of fields in the comma separated list, but I don’t really trust they are the <em>right</em> values…
</p>
        <p>
Anyway, I looked at my code, and looked again… couldn’t see anything wrong. So I thought
I’d try with the cumulative functoids that ship with BizTalk. I replaced my functoid
with the built-in “Cumulative Concatenate” functoid and did the same test. The output
was just fine – nothing wrong. This baffled me a bit, but then I discovered that the
cumulative functoids that ship with BizTalk are actually developed so they can be
used as BOTH referenced functoids and inline functoids. Which one is used depends
on the value of the “Script Type Precedence” property on the map. By default, inline
C# has priority, so the built-in “Cumulative Concatenate” functoid wasn’t used as
a referenced functoid as my own functoid was. I changed the property to have “External
Assembly” as first priority and checked the generated XSLT to make sure that now it
was using the functoid as a referenced functoid. It was. So I deployed and tested…
and guess what?
</p>
        <p>
          <strong>
            <font size="4">I got the same totally unpredictable output as I did with my
own functoid!</font>
          </strong>
        </p>
        <p>
So the conclusion is simple; <strong><font size="3">The cumulative functoids that
ship with BizTalk are NOT thread safe</font></strong>, when used as referenced functoids.
As a matter of fact, I claim that it is impossible to write a thread safe referenced
cumulative functoid, for reasons I will now explain.
</p>
        <p>
When using a referenced cumulative functoid, the generated XSLT looks something like
this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:template</span>
              <span style="color: #ff0000">match</span>
              <span style="color: #0000ff">="/s0:InputRoot"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">ns0:OutputRoot</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:variable</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="var:v1"</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="ScriptNS0:InitCumulativeConcat(0)"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:for-each</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="/s0:InputRoot/Field1"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:variable</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="var:v2"</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="ScriptNS0:AddToCumulativeConcat(0,string(./text()),"</span>
              <span style="color: #ff0000">1000</span>
              <span style="color: #0000ff">")"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">xsl:for-each</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:variable</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="var:v3"</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="ScriptNS0:GetCumulativeConcat(0)"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">Field1</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:value-of</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="$var:v3"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">Field1</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">ns0:OutputRoot</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">xsl:template</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
As you can see, the “InitCumulativeConcat” is called once, then “AddToCumulativeConcat
is called for each occurrence of “Field1” and finally “GetCumulativeConcat” is called
and the value is inserted into the “Field1” node of the output.
</p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
In order to make sure the functoid can distinguish between instances of the functoid,
there is an “index” parameter to all three methods, which the documentation states
is unique for that instance. The issue here is, that this is only true for instances <em>within
the same map </em>and not across all instances of the map. As you can see in the XSLT,
a value of “0” is used for the index parameter. If the functoid was used twice in
the same map, a value of “1” would be hardcoded in the map for the second usage of
the functoid and so on.
</p>
        <p>
But if the map runs 1000 times simultaneously, they will all send a value of “0” to
the functoids methods. And since the functoid is not instantiated for each map, but
rather the same object is used across all the maps, there will a whole lot of method
calls with the value “0” for the index parameter without the functoid having a clue
as to which instance of the map is calling it, basically mixing everything up good.
</p>
        <p>
The reason it works for inline functoids is, of course, that there is no object to
be shared across map instances – it’s all inline for each map… so here the index parameter
is actually unique and things work.
</p>
        <p>
And the reason I cannot find anyone on the internet having described this before me
(This issue must have been there since BizTalk 2004) is probably that the default
behavior of maps is to use the inline functionality if present, then probably no one
has ever changed that property at the same time as having used a cumulative functoid
under high load.
</p>
        <p>
What is really funny is, that the only example of developing a custom cumulative functoid
I have found online is at MSDN: <a title="http://msdn.microsoft.com/en-us/library/aa561338(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa561338(BTS.10).aspx">http://msdn.microsoft.com/en-us/library/aa561338(BTS.10).aspx</a> and
the example is actually a custom referenced cumulative functoid… which doesn’t work,
because it isn’t thread safe. Funny, eh?
</p>
        <p>
So, to sum up:
</p>
        <p>
Never ever develop a custom cumulative referenced functoid – use the inline versions
instead. I will have o update the one at <a href="http://eebiztalkfunctoids.codeplex.com">http://eebiztalkfunctoids.codeplex.com</a> right
away :)
</p>
        <p>
Good night…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=4c31c1dc-9d55-4b9b-afae-5c7110cb12f1" />
      </body>
      <title>BizTalks built-in cumulative functoids are not (always) thread safe</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,4c31c1dc-9d55-4b9b-afae-5c7110cb12f1.aspx</guid>
      <link>http://blog.eliasen.dk/2010/01/13/BizTalksBuiltinCumulativeFunctoidsAreNotAlwaysThreadSafe.aspx</link>
      <pubDate>Wed, 13 Jan 2010 21:34:55 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I just did a post on developing a custom cumulative functoid. You can find it here: &lt;a title="http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx" href="http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx"&gt;http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
At the very end of the post I write that you should NEVER develop a custom referenced
cumulative functoid but instead develop a custom inline cumulative functoid. Given
the title of this blog post, probably by now you know why this is :-)
&lt;/p&gt;
&lt;p&gt;
When I developed my first cumulative functoid, I developed a referenced functoid,
since this is what I prefer. I tested it on an input and it worked fine. Then I deployed
it and threw 1023 copies of the same message through BizTalk at the same time. My
test solution had two very simple schemas:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_2_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image_2" border="0" alt="image_2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_2_thumb.png" width="129" height="62" /&gt;&lt;/a&gt; Source
schema.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_4_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image_4" border="0" alt="image_4" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_4_thumb.png" width="129" height="57" /&gt;&lt;/a&gt; Destination
schema.
&lt;/p&gt;
&lt;p&gt;
The field “Field1” in the source schema has a maxOccurs = unbounded and the field
“Field1” in the destination schema has maxOccurs = 1.
&lt;/p&gt;
&lt;p&gt;
I then created a simple map between them:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_6_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image_6" border="0" alt="image_6" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalksbuiltincumulativefunctoidsarenot_136A3/image_6_thumb.png" width="369" height="65" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The map merely utilizes my “Cumulative Comma” functoid (Yes, I know the screen shot
is of another functoid. Sorry about that… :-) ) to get all occurrences of “Field1”
in the source schema concatenated into one value separated by commas that is output
to the “Field1” node in the output.
&lt;/p&gt;
&lt;p&gt;
My 1023 test instanced all have 10 instances of the “Field1” in the input, so all
output XML should have these ten values in a comma separated list in the “Field1”
element in the output schema.
&lt;/p&gt;
&lt;p&gt;
Basically, what I found was, that it was quite unpredictable what the outcome of that
was. Some of the output XML has a completely empty “Field1” element. Others had perhaps
42 values in their comma separated list. About 42% of the output files had the right
number of fields in the comma separated list, but I don’t really trust they are the &lt;em&gt;right&lt;/em&gt; values…
&lt;/p&gt;
&lt;p&gt;
Anyway, I looked at my code, and looked again… couldn’t see anything wrong. So I thought
I’d try with the cumulative functoids that ship with BizTalk. I replaced my functoid
with the built-in “Cumulative Concatenate” functoid and did the same test. The output
was just fine – nothing wrong. This baffled me a bit, but then I discovered that the
cumulative functoids that ship with BizTalk are actually developed so they can be
used as BOTH referenced functoids and inline functoids. Which one is used depends
on the value of the “Script Type Precedence” property on the map. By default, inline
C# has priority, so the built-in “Cumulative Concatenate” functoid wasn’t used as
a referenced functoid as my own functoid was. I changed the property to have “External
Assembly” as first priority and checked the generated XSLT to make sure that now it
was using the functoid as a referenced functoid. It was. So I deployed and tested…
and guess what?
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size="4"&gt;I got the same totally unpredictable output as I did with my
own functoid!&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
So the conclusion is simple; &lt;strong&gt;&lt;font size="3"&gt;The cumulative functoids that
ship with BizTalk are NOT thread safe&lt;/font&gt;&lt;/strong&gt;, when used as referenced functoids.
As a matter of fact, I claim that it is impossible to write a thread safe referenced
cumulative functoid, for reasons I will now explain.
&lt;/p&gt;
&lt;p&gt;
When using a referenced cumulative functoid, the generated XSLT looks something like
this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:template&lt;/span&gt; &lt;span style="color: #ff0000"&gt;match&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;/s0:InputRoot&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:OutputRoot&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:variable&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;var:v1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptNS0:InitCumulativeConcat(0)&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:for-each&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;/s0:InputRoot/Field1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:variable&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;var:v2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptNS0:AddToCumulativeConcat(0,string(./text()),&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;1000&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;)&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:for-each&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:variable&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;var:v3&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptNS0:GetCumulativeConcat(0)&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Field1&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;$var:v3&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Field1&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:OutputRoot&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:template&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
As you can see, the “InitCumulativeConcat” is called once, then “AddToCumulativeConcat
is called for each occurrence of “Field1” and finally “GetCumulativeConcat” is called
and the value is inserted into the “Field1” node of the output.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
In order to make sure the functoid can distinguish between instances of the functoid,
there is an “index” parameter to all three methods, which the documentation states
is unique for that instance. The issue here is, that this is only true for instances &lt;em&gt;within
the same map &lt;/em&gt;and not across all instances of the map. As you can see in the XSLT,
a value of “0” is used for the index parameter. If the functoid was used twice in
the same map, a value of “1” would be hardcoded in the map for the second usage of
the functoid and so on.
&lt;/p&gt;
&lt;p&gt;
But if the map runs 1000 times simultaneously, they will all send a value of “0” to
the functoids methods. And since the functoid is not instantiated for each map, but
rather the same object is used across all the maps, there will a whole lot of method
calls with the value “0” for the index parameter without the functoid having a clue
as to which instance of the map is calling it, basically mixing everything up good.
&lt;/p&gt;
&lt;p&gt;
The reason it works for inline functoids is, of course, that there is no object to
be shared across map instances – it’s all inline for each map… so here the index parameter
is actually unique and things work.
&lt;/p&gt;
&lt;p&gt;
And the reason I cannot find anyone on the internet having described this before me
(This issue must have been there since BizTalk 2004) is probably that the default
behavior of maps is to use the inline functionality if present, then probably no one
has ever changed that property at the same time as having used a cumulative functoid
under high load.
&lt;/p&gt;
&lt;p&gt;
What is really funny is, that the only example of developing a custom cumulative functoid
I have found online is at MSDN: &lt;a title="http://msdn.microsoft.com/en-us/library/aa561338(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa561338(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa561338(BTS.10).aspx&lt;/a&gt; and
the example is actually a custom referenced cumulative functoid… which doesn’t work,
because it isn’t thread safe. Funny, eh?
&lt;/p&gt;
&lt;p&gt;
So, to sum up:
&lt;/p&gt;
&lt;p&gt;
Never ever develop a custom cumulative referenced functoid – use the inline versions
instead. I will have o update the one at &lt;a href="http://eebiztalkfunctoids.codeplex.com"&gt;http://eebiztalkfunctoids.codeplex.com&lt;/a&gt; right
away :)
&lt;/p&gt;
&lt;p&gt;
Good night…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=4c31c1dc-9d55-4b9b-afae-5c7110cb12f1" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,4c31c1dc-9d55-4b9b-afae-5c7110cb12f1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=51c9e5a5-d03a-4a30-aca1-28142f9666a5</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,51c9e5a5-d03a-4a30-aca1-28142f9666a5.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,51c9e5a5-d03a-4a30-aca1-28142f9666a5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=51c9e5a5-d03a-4a30-aca1-28142f9666a5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
As many of you know, I am currently writing a book alongside some of the best of the
community. Currently I am writing about developing functoids, and in doing this I
have discovered that there are plenty of blog posts and helpful articles out there
about developing functoids, but hardly any of them deal with developing cumulative
functoids. So I thought the world might end soon if this wasn’t rectified. :-)
</p>
        <p>
Developing functoids really isn’t as hard as it might seem. As I have explained numerous
times, I consider creating a good icon as the most difficult part of it :—)
</p>
        <p>
When developing custom functoids, you need to choose between developing a <a href="http://msdn.microsoft.com/en-us/library/aa559109(BTS.10).aspx" target="_blank">referenced
functoid</a> or an <a href="http://msdn.microsoft.com/en-us/library/aa559855(BTS.10).aspx" target="_blank">inline
functoid</a>. The difference is that a referenced functoid is a normal .NET assembly
that is GAC’ed and called from the map at runtime requiring it to be deployed on all
BizTalk Servers that have a map that use the functoid. Inline functoids on the other
hand output a string containing the method and this method is put inside the XSLT
and called from there.
</p>
        <p>
There are <a href="http://msdn.microsoft.com/en-us/library/aa562075(BTS.10).aspx" target="_blank">ups
and downs</a> to both – my preference usually goes towards the referenced functoid…
not because of the reasons mentioned on MSDN, but simply because I can’t be bothered
creating a method that outputs a string that is a method. It just looks ugly :)
</p>
        <p>
So, in this blog post I will develop a custom cumulative functoid that generates a
comma delimited string based on a reoccurring node as input.
</p>
        <p>
          <strong>First, the functionality that is needed for both referenced and inline functoids</strong>
        </p>
        <p>
All functoids must inherit from the BaseFunctoid class which is found in the Microsoft.BizTalk.BaseFunctoids
namespace which is usually found in &lt;InstallationFolder&gt;\Developer Tools\Microsoft.BizTalk.BaseFunctoids.dll.
</p>
        <p>
Usually a custom functoid consists of:
</p>
        <ul>
          <li>
A constructor that does almost all the work and setting up the functoid 
</li>
          <li>
The method that should be called at runtime for a referenced functoid or a method
that returns a string with a method for inline functoids. 
</li>
          <li>
Resources for name, tooltip, description and icon 
</li>
        </ul>
        <p>
A custom <em>cumulative</em> functoid consists of the same but also has a data structure
to keep aggregated values in and it has two methods more to specify. The reason a
cumulative functoid has three methods instead of one is that the first is called to
initialize the data structure, the second is called once for every occurrence of the
input node and the third is called to retrieve the aggregated value.
</p>
        <p>
To exemplify, I have created two very simple schemas:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_thumb.png" width="129" height="62" />
          </a> Source
schema.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_thumb_1.png" width="129" height="57" />
          </a> Destination
schema.
</p>
        <p>
The field “Field1” in the source schema has a maxOccurs = unbounded and the field
“Field1” in the destination schema has maxOccurs = 1.
</p>
        <p>
I have then created a simple map between them:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_thumb_2.png" width="369" height="65" />
          </a>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
The map merely utilizes the built-in “Cumulative Concatenate” functoid to get all
occurrences of “Field1” in the source schema concatenated into one value that is output
to the “Field1” node in the output.
</p>
        <p>
The generated XSLT looks something like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:template</span>
              <span style="color: #ff0000">match</span>
              <span style="color: #0000ff">="/s0:InputRoot"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">ns0:OutputRoot</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:variable</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="var:v1"</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="ScriptNS0:InitCumulativeConcat(0)"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:for-each</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="/s0:InputRoot/Field1"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:variable</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="var:v2"</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="ScriptNS0:AddToCumulativeConcat(0,string(./text()),"</span>
              <span style="color: #ff0000">1000</span>
              <span style="color: #0000ff">")"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">xsl:for-each</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:variable</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="var:v3"</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="ScriptNS0:GetCumulativeConcat(0)"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">Field1</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">xsl:value-of</span>
              <span style="color: #ff0000">select</span>
              <span style="color: #0000ff">="$var:v3"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">Field1</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">ns0:OutputRoot</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span>
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">xsl:template</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
As you can see, the “InitCumulativeConcat” is called once, then “AddToCumulativeConcat
is called for each occurrence of “Field1” and finally “GetCumulativeConcat” is called
and the value is inserted into the “Field1” node of the output.
</p>
        <p>
So, back to the code needed for all functoids. It is basically the same as normal
functoids:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> CummulativeComma
: BaseFunctoid</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">public</span> CummulativeComma()
: <span style="color: #0000ff">base</span>()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">this</span>.ID
= 7356;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> SetupResourceAssembly(GetType().Namespace
+ <span style="color: #006080">"."</span> + NameOfResourceFile, Assembly.GetExecutingAssembly());</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span> SetName(<span style="color: #006080">"Str_CummulativeComma_Name"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> SetTooltip(<span style="color: #006080">"Str_CummulativeComma_Tooltip"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span> SetDescription(<span style="color: #006080">"Str_CummulativeComma_Description"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span> SetBitmap(<span style="color: #006080">"Bmp_CummulativeComma_Icon"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum13"> 13:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum14"> 14:</span>
              <span style="color: #0000ff">this</span>.SetMinParams(1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum15"> 15:</span>
              <span style="color: #0000ff">this</span>.SetMaxParams(1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum16"> 16:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum17"> 17:</span>
              <span style="color: #0000ff">this</span>.Category
= FunctoidCategory.Cumulative;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum18"> 18:</span>
              <span style="color: #0000ff">this</span>.OutputConnectionType
= ConnectionType.AllExceptRecord;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum19"> 19:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum20"> 20:</span> AddInputConnectionType(ConnectionType.AllExceptRecord);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum21"> 21:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum22"> 22:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Basically, you need to:
</p>
        <ul>
          <li>
Set the ID of the functoid to a unique value that is greater than 6000. Values smaller
than 6000 are reserved for BizTalks own functoids. 
</li>
          <li>
Call SetupResourceAssembly to let the base class know what resource file to get resources
from 
</li>
          <li>
Call SetName, SetTooltip, SetDescription and SetBitmap to let the base class get the
appropriate resources from the resource file. Remember to add the appropriate resources
to the resource file. 
</li>
          <li>
Call SetMinParams and SetMaxParams to determine how many parameters the functoid can
have. They should be set to 1 and 2 respectively. The first is for the reoccurring
node and the second is a scoping input. 
</li>
          <li>
Set the category of the functoid to “Cumulative” 
</li>
          <li>
Determine both the type of nodes/functoids the functoid can get input from and what
it can output to. 
</li>
        </ul>
        <p>
I won’t describe these any more right now. They are explained in more details in the
book :) And also, there are plenty of posts out there about these emthods and properties.
</p>
        <p>
          <strong>Now for the functionality needed for a referenced functoid:</strong>
        </p>
        <p>
Beside what you have seen above, for a referenced functoid, the three methods must
be written and referenced. This is done like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> SetExternalFunctionName(GetType().Assembly.FullName,
GetType().FullName, <span style="color: #006080">"InitializeValue"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> SetExternalFunctionName2(<span style="color: #006080">"AddValue"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> SetExternalFunctionName3(<span style="color: #006080">"RetrieveFinalValue"</span>);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
The above code must be in the constructor along with the rest. Now, all that is left
is to write the code for those three methods, which can look something like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">private</span> Hashtable
myCumulativeArray = <span style="color: #0000ff">new</span> Hashtable();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> InitializeValue(<span style="color: #0000ff">int</span> index)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> myCumulativeArray[index]
= <span style="color: #006080">""</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">""</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> AddValue(<span style="color: #0000ff">int</span> index, <span style="color: #0000ff">string</span><span style="color: #0000ff">value</span>, <span style="color: #0000ff">string</span> scope)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span>
              <span style="color: #0000ff">string</span> str
= myCumulativeArray[index].ToString();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span> str
+= <span style="color: #0000ff">value</span> + <span style="color: #006080">","</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum13"> 13:</span> myCumulativeArray[index]
= str;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum14"> 14:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">""</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum15"> 15:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum16"> 16:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum17"> 17:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> RetrieveFinalValue(<span style="color: #0000ff">int</span> index)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum18"> 18:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum19"> 19:</span>
              <span style="color: #0000ff">string</span> str
= myCumulativeArray[index].ToString();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum20"> 20:</span>
              <span style="color: #0000ff">if</span> (str.Length
&gt; 0)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum21"> 21:</span>
              <span style="color: #0000ff">return</span> str.Substring(0,
str.Length - 1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum22"> 22:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum23"> 23:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">""</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum24"> 24:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
So, as you can see, a data structure (in this case a Hashtable) is declared to store
the aggregated results and all three methods have an index parameter that is used
to know how to index the data structure for each method call in case the functoid
is used multiple times at the same time. The mapper will generate a unique index to
be used.
</p>
        <p>
Compile the project, copy the DLL to “&lt;InstallationFolder&gt;\Developer Tools\Mapper
Extensions” and GAC the assembly and you are good to go. Just reset the toolbox to
load the functoid.
</p>
        <p>
          <strong>Now for the functionality needed for an inline functoid:</strong>
        </p>
        <p>
The idea behind a cumulative inline functoid is the same as for a cumulative referenced
functoid. You still need to specify three methods to use. For an inline functoid you
need to generate the methods that will be included in the XSLT, though.
</p>
        <p>
For the constructor, add the following lines of code:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> SetScriptGlobalBuffer(ScriptType.CSharp,
GetGlobalScript());</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> SetScriptBuffer(ScriptType.CSharp,
GetInitScript(), 0);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> SetScriptBuffer(ScriptType.CSharp,
GetAggScript(), 1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> SetScriptBuffer(ScriptType.CSharp,
GetFinalValueScript(), 2);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
The first method call sets a script that will be global for the map. In this script
you should initialize the needed data structure.
</p>
        <p>
The second method call sets up the script that will initialize the data structure
for a given instance of the functoid.
</p>
        <p>
The third method call sets up the script that will add a value to the aggregated value
in the data structure.
</p>
        <p>
The fourth method call sets up the script that is used to retrieve the aggregated
value.
</p>
        <p>
As you can see, the second, third and fourth line all call the same method. The last
parameter is used to let the functoid know if it is the initialization, aggregating
or retrieving method that is being setup.
</p>
        <p>
So, what is left is to implement these four methods. The code for this can look quite
ugly, since you need to build a string and output it, but it goes something like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">string</span> GetFinalValueScript()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> StringBuilder
sb = <span style="color: #0000ff">new</span> StringBuilder();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> sb.Append(<span style="color: #006080">"\npublic
string RetrieveFinalValue(int index)\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> sb.Append(<span style="color: #006080">"{\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> sb.Append(<span style="color: #006080">"\tstring
str = myCumulativeArray[index].ToString();"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> sb.Append(<span style="color: #006080">"\tif
(str.Length &gt; 0)\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span> sb.Append(<span style="color: #006080">"\t\treturn
str.Substring(0, str.Length - 1);\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span> sb.Append(<span style="color: #006080">"\telse\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> sb.Append(<span style="color: #006080">"\t\treturn
\"\";\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span> sb.Append(<span style="color: #006080">"}\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span>
              <span style="color: #0000ff">return</span> sb.ToString();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum13"> 13:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum14"> 14:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum15"> 15:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">string</span> GetAggScript()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum16"> 16:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum17"> 17:</span> StringBuilder
sb = <span style="color: #0000ff">new</span> StringBuilder();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum18"> 18:</span> sb.Append(<span style="color: #006080">"\npublic
string AddValue(int index, string value, string scope)\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum19"> 19:</span> sb.Append(<span style="color: #006080">"{\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum20"> 20:</span> sb.Append(<span style="color: #006080">"\tstring
str = myCumulativeArray[index].ToString();"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum21"> 21:</span> sb.Append(<span style="color: #006080">"\tstr
+= value + \",\";\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum22"> 22:</span> sb.Append(<span style="color: #006080">"\tmyCumulativeArray[index]
= str;\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum23"> 23:</span> sb.Append(<span style="color: #006080">"\treturn
\"\";\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum24"> 24:</span> sb.Append(<span style="color: #006080">"}\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum25"> 25:</span>
              <span style="color: #0000ff">return</span> sb.ToString();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum26"> 26:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum27"> 27:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum28"> 28:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">string</span> GetInitScript()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum29"> 29:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum30"> 30:</span> StringBuilder
sb = <span style="color: #0000ff">new</span> StringBuilder();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum31"> 31:</span> sb.Append(<span style="color: #006080">"\npublic
string InitializeValue(int index)\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum32"> 32:</span> sb.Append(<span style="color: #006080">"{\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum33"> 33:</span> sb.Append(<span style="color: #006080">"\tmyCumulativeArray[index]
= \"\";\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum34"> 34:</span> sb.Append(<span style="color: #006080">"\treturn
\"\";\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum35"> 35:</span> sb.Append(<span style="color: #006080">"}\n"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum36"> 36:</span>
              <span style="color: #0000ff">return</span> sb.ToString();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum37"> 37:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum38"> 38:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum39"> 39:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">string</span> GetGlobalScript()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum40"> 40:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum41"> 41:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"private
Hashtable myCumulativeArray = new Hashtable();"</span>;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum42"> 42:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
I suppose, by now you get why I prefer referenced functoids? :-) You need to write
the method anyway in order to check that it compiles. Wrapping it in methods that
output the strings is just plain ugly.
</p>
        <p>
          <strong>Conclusion</strong>
        </p>
        <p>
As you can hopefully see, developing a cumulative functoids really isn’t that much
harder than developing a normal functoid. Just a couple more methods. I did mention
that I usually prefer the referenced functoids because of the uglyness of creating
inline functoids. For cumulative functoids, however, you should NEVER use referenced
functoids but instead only use inline functoids. The reason for this is quite good,
actually – and you can see it in my next blog post which will come in a day or two.
</p>
        <p>
Thanks
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=51c9e5a5-d03a-4a30-aca1-28142f9666a5" />
      </body>
      <title>Developing a custom cumulative functoid</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,51c9e5a5-d03a-4a30-aca1-28142f9666a5.aspx</guid>
      <link>http://blog.eliasen.dk/2010/01/13/DevelopingACustomCumulativeFunctoid.aspx</link>
      <pubDate>Wed, 13 Jan 2010 20:57:50 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
As many of you know, I am currently writing a book alongside some of the best of the
community. Currently I am writing about developing functoids, and in doing this I
have discovered that there are plenty of blog posts and helpful articles out there
about developing functoids, but hardly any of them deal with developing cumulative
functoids. So I thought the world might end soon if this wasn’t rectified. :-)
&lt;/p&gt;
&lt;p&gt;
Developing functoids really isn’t as hard as it might seem. As I have explained numerous
times, I consider creating a good icon as the most difficult part of it :—)
&lt;/p&gt;
&lt;p&gt;
When developing custom functoids, you need to choose between developing a &lt;a href="http://msdn.microsoft.com/en-us/library/aa559109(BTS.10).aspx" target="_blank"&gt;referenced
functoid&lt;/a&gt; or an &lt;a href="http://msdn.microsoft.com/en-us/library/aa559855(BTS.10).aspx" target="_blank"&gt;inline
functoid&lt;/a&gt;. The difference is that a referenced functoid is a normal .NET assembly
that is GAC’ed and called from the map at runtime requiring it to be deployed on all
BizTalk Servers that have a map that use the functoid. Inline functoids on the other
hand output a string containing the method and this method is put inside the XSLT
and called from there.
&lt;/p&gt;
&lt;p&gt;
There are &lt;a href="http://msdn.microsoft.com/en-us/library/aa562075(BTS.10).aspx" target="_blank"&gt;ups
and downs&lt;/a&gt; to both – my preference usually goes towards the referenced functoid…
not because of the reasons mentioned on MSDN, but simply because I can’t be bothered
creating a method that outputs a string that is a method. It just looks ugly :)
&lt;/p&gt;
&lt;p&gt;
So, in this blog post I will develop a custom cumulative functoid that generates a
comma delimited string based on a reoccurring node as input.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;First, the functionality that is needed for both referenced and inline functoids&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
All functoids must inherit from the BaseFunctoid class which is found in the Microsoft.BizTalk.BaseFunctoids
namespace which is usually found in &amp;lt;InstallationFolder&amp;gt;\Developer Tools\Microsoft.BizTalk.BaseFunctoids.dll.
&lt;/p&gt;
&lt;p&gt;
Usually a custom functoid consists of:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
A constructor that does almost all the work and setting up the functoid 
&lt;/li&gt;
&lt;li&gt;
The method that should be called at runtime for a referenced functoid or a method
that returns a string with a method for inline functoids. 
&lt;/li&gt;
&lt;li&gt;
Resources for name, tooltip, description and icon 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
A custom &lt;em&gt;cumulative&lt;/em&gt; functoid consists of the same but also has a data structure
to keep aggregated values in and it has two methods more to specify. The reason a
cumulative functoid has three methods instead of one is that the first is called to
initialize the data structure, the second is called once for every occurrence of the
input node and the third is called to retrieve the aggregated value.
&lt;/p&gt;
&lt;p&gt;
To exemplify, I have created two very simple schemas:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_thumb.png" width="129" height="62" /&gt;&lt;/a&gt; Source
schema.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_thumb_1.png" width="129" height="57" /&gt;&lt;/a&gt; Destination
schema.
&lt;/p&gt;
&lt;p&gt;
The field “Field1” in the source schema has a maxOccurs = unbounded and the field
“Field1” in the destination schema has maxOccurs = 1.
&lt;/p&gt;
&lt;p&gt;
I have then created a simple map between them:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Developingacustomcumulativefunctoid_1369C/image_thumb_2.png" width="369" height="65" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The map merely utilizes the built-in “Cumulative Concatenate” functoid to get all
occurrences of “Field1” in the source schema concatenated into one value that is output
to the “Field1” node in the output.
&lt;/p&gt;
&lt;p&gt;
The generated XSLT looks something like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:template&lt;/span&gt; &lt;span style="color: #ff0000"&gt;match&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;/s0:InputRoot&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:OutputRoot&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:variable&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;var:v1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptNS0:InitCumulativeConcat(0)&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:for-each&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;/s0:InputRoot/Field1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:variable&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;var:v2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptNS0:AddToCumulativeConcat(0,string(./text()),&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;1000&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;)&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:for-each&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:variable&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;var:v3&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptNS0:GetCumulativeConcat(0)&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Field1&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;$var:v3&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Field1&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:OutputRoot&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;xsl:template&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
As you can see, the “InitCumulativeConcat” is called once, then “AddToCumulativeConcat
is called for each occurrence of “Field1” and finally “GetCumulativeConcat” is called
and the value is inserted into the “Field1” node of the output.
&lt;/p&gt;
&lt;p&gt;
So, back to the code needed for all functoids. It is basically the same as normal
functoids:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CummulativeComma
: BaseFunctoid&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; CummulativeComma()
: &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.ID
= 7356;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; SetupResourceAssembly(GetType().Namespace
+ &lt;span style="color: #006080"&gt;&amp;quot;.&amp;quot;&lt;/span&gt; + NameOfResourceFile, Assembly.GetExecutingAssembly());&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; SetName(&lt;span style="color: #006080"&gt;&amp;quot;Str_CummulativeComma_Name&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; SetTooltip(&lt;span style="color: #006080"&gt;&amp;quot;Str_CummulativeComma_Tooltip&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; SetDescription(&lt;span style="color: #006080"&gt;&amp;quot;Str_CummulativeComma_Description&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; SetBitmap(&lt;span style="color: #006080"&gt;&amp;quot;Bmp_CummulativeComma_Icon&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SetMinParams(1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SetMaxParams(1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Category
= FunctoidCategory.Cumulative;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.OutputConnectionType
= ConnectionType.AllExceptRecord;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; AddInputConnectionType(ConnectionType.AllExceptRecord);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Basically, you need to:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Set the ID of the functoid to a unique value that is greater than 6000. Values smaller
than 6000 are reserved for BizTalks own functoids. 
&lt;/li&gt;
&lt;li&gt;
Call SetupResourceAssembly to let the base class know what resource file to get resources
from 
&lt;/li&gt;
&lt;li&gt;
Call SetName, SetTooltip, SetDescription and SetBitmap to let the base class get the
appropriate resources from the resource file. Remember to add the appropriate resources
to the resource file. 
&lt;/li&gt;
&lt;li&gt;
Call SetMinParams and SetMaxParams to determine how many parameters the functoid can
have. They should be set to 1 and 2 respectively. The first is for the reoccurring
node and the second is a scoping input. 
&lt;/li&gt;
&lt;li&gt;
Set the category of the functoid to “Cumulative” 
&lt;/li&gt;
&lt;li&gt;
Determine both the type of nodes/functoids the functoid can get input from and what
it can output to. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I won’t describe these any more right now. They are explained in more details in the
book :) And also, there are plenty of posts out there about these emthods and properties.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Now for the functionality needed for a referenced functoid:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Beside what you have seen above, for a referenced functoid, the three methods must
be written and referenced. This is done like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; SetExternalFunctionName(GetType().Assembly.FullName,
GetType().FullName, &lt;span style="color: #006080"&gt;&amp;quot;InitializeValue&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; SetExternalFunctionName2(&lt;span style="color: #006080"&gt;&amp;quot;AddValue&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; SetExternalFunctionName3(&lt;span style="color: #006080"&gt;&amp;quot;RetrieveFinalValue&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The above code must be in the constructor along with the rest. Now, all that is left
is to write the code for those three methods, which can look something like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Hashtable
myCumulativeArray = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Hashtable();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; InitializeValue(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; index)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; myCumulativeArray[index]
= &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; AddValue(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; index, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; scope)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; str
= myCumulativeArray[index].ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; str
+= &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; + &lt;span style="color: #006080"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt; myCumulativeArray[index]
= str;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; RetrieveFinalValue(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; index)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; str
= myCumulativeArray[index].ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (str.Length
&amp;gt; 0)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; str.Substring(0,
str.Length - 1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt; 23:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt; 24:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
So, as you can see, a data structure (in this case a Hashtable) is declared to store
the aggregated results and all three methods have an index parameter that is used
to know how to index the data structure for each method call in case the functoid
is used multiple times at the same time. The mapper will generate a unique index to
be used.
&lt;/p&gt;
&lt;p&gt;
Compile the project, copy the DLL to “&amp;lt;InstallationFolder&amp;gt;\Developer Tools\Mapper
Extensions” and GAC the assembly and you are good to go. Just reset the toolbox to
load the functoid.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Now for the functionality needed for an inline functoid:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The idea behind a cumulative inline functoid is the same as for a cumulative referenced
functoid. You still need to specify three methods to use. For an inline functoid you
need to generate the methods that will be included in the XSLT, though.
&lt;/p&gt;
&lt;p&gt;
For the constructor, add the following lines of code:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; SetScriptGlobalBuffer(ScriptType.CSharp,
GetGlobalScript());&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; SetScriptBuffer(ScriptType.CSharp,
GetInitScript(), 0);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; SetScriptBuffer(ScriptType.CSharp,
GetAggScript(), 1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; SetScriptBuffer(ScriptType.CSharp,
GetFinalValueScript(), 2);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The first method call sets a script that will be global for the map. In this script
you should initialize the needed data structure.
&lt;/p&gt;
&lt;p&gt;
The second method call sets up the script that will initialize the data structure
for a given instance of the functoid.
&lt;/p&gt;
&lt;p&gt;
The third method call sets up the script that will add a value to the aggregated value
in the data structure.
&lt;/p&gt;
&lt;p&gt;
The fourth method call sets up the script that is used to retrieve the aggregated
value.
&lt;/p&gt;
&lt;p&gt;
As you can see, the second, third and fourth line all call the same method. The last
parameter is used to let the functoid know if it is the initialization, aggregating
or retrieving method that is being setup.
&lt;/p&gt;
&lt;p&gt;
So, what is left is to implement these four methods. The code for this can look quite
ugly, since you need to build a string and output it, but it goes something like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetFinalValueScript()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; StringBuilder
sb = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\npublic
string RetrieveFinalValue(int index)\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;{\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\tstring
str = myCumulativeArray[index].ToString();&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\tif
(str.Length &amp;gt; 0)\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\t\treturn
str.Substring(0, str.Length - 1);\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\telse\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\t\treturn
\&amp;quot;\&amp;quot;;\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;}\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sb.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetAggScript()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; StringBuilder
sb = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\npublic
string AddValue(int index, string value, string scope)\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;{\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\tstring
str = myCumulativeArray[index].ToString();&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\tstr
+= value + \&amp;quot;,\&amp;quot;;\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\tmyCumulativeArray[index]
= str;\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt; 23:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\treturn
\&amp;quot;\&amp;quot;;\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt; 24:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;}\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt; 25:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sb.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt; 26:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt; 27:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt; 28:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetInitScript()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt; 29:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt; 30:&lt;/span&gt; StringBuilder
sb = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt; 31:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\npublic
string InitializeValue(int index)\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt; 32:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;{\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt; 33:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\tmyCumulativeArray[index]
= \&amp;quot;\&amp;quot;;\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt; 34:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;\treturn
\&amp;quot;\&amp;quot;;\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt; 35:&lt;/span&gt; sb.Append(&lt;span style="color: #006080"&gt;&amp;quot;}\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt; 36:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sb.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt; 37:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt; 38:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt; 39:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetGlobalScript()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt; 40:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt; 41:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;private
Hashtable myCumulativeArray = new Hashtable();&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt; 42:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
I suppose, by now you get why I prefer referenced functoids? :-) You need to write
the method anyway in order to check that it compiles. Wrapping it in methods that
output the strings is just plain ugly.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
As you can hopefully see, developing a cumulative functoids really isn’t that much
harder than developing a normal functoid. Just a couple more methods. I did mention
that I usually prefer the referenced functoids because of the uglyness of creating
inline functoids. For cumulative functoids, however, you should NEVER use referenced
functoids but instead only use inline functoids. The reason for this is quite good,
actually – and you can see it in my next blog post which will come in a day or two.
&lt;/p&gt;
&lt;p&gt;
Thanks
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=51c9e5a5-d03a-4a30-aca1-28142f9666a5" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,51c9e5a5-d03a-4a30-aca1-28142f9666a5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=ddb5b0ca-afe3-436c-a822-e44a81a86dc6</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,ddb5b0ca-afe3-436c-a822-e44a81a86dc6.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,ddb5b0ca-afe3-436c-a822-e44a81a86dc6.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=ddb5b0ca-afe3-436c-a822-e44a81a86dc6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I just threw my blog through <a title="http://typealyzer.com" href="http://typealyzer.com">http://typealyzer.com</a> to
see what type my blog is, and it turns out my blog is an “ESTP - The Doers”. Description
of that:
</p>
        <hr />
        <p>
The active and playful type. They are especially attuned to people and things around
them and often full of energy, talking, joking and engaging in physical out-door activities. 
<br />
The Doers are happiest with action-filled work which craves their full attention and
focus. They might be very impulsive and more keen on starting something new than following
it through. They might have a problem with sitting still or remaining inactive for
any period of time.
</p>
        <p>
        </p>
        <hr />
        <p>
        </p>
        <p>
The graph show is this one:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Blogtypeanalyzer_9583/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Blogtypeanalyzer_9583/image_thumb.png" width="444" height="344" />
          </a>
        </p>
        <p>
I am not going to comment on the accuracy of this description other than well… pretty
accurate :-)
</p>
        <p>
What blog type is your blog?
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ddb5b0ca-afe3-436c-a822-e44a81a86dc6" />
      </body>
      <title>Blog type analyzer</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,ddb5b0ca-afe3-436c-a822-e44a81a86dc6.aspx</guid>
      <link>http://blog.eliasen.dk/2009/12/20/BlogTypeAnalyzer.aspx</link>
      <pubDate>Sun, 20 Dec 2009 10:25:38 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I just threw my blog through &lt;a title="http://typealyzer.com" href="http://typealyzer.com"&gt;http://typealyzer.com&lt;/a&gt; to
see what type my blog is, and it turns out my blog is an “ESTP - The Doers”. Description
of that:
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;
The active and playful type. They are especially attuned to people and things around
them and often full of energy, talking, joking and engaging in physical out-door activities. 
&lt;br /&gt;
The Doers are happiest with action-filled work which craves their full attention and
focus. They might be very impulsive and more keen on starting something new than following
it through. They might have a problem with sitting still or remaining inactive for
any period of time.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The graph show is this one:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Blogtypeanalyzer_9583/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Blogtypeanalyzer_9583/image_thumb.png" width="444" height="344" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I am not going to comment on the accuracy of this description other than well… pretty
accurate :-)
&lt;/p&gt;
&lt;p&gt;
What blog type is your blog?
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ddb5b0ca-afe3-436c-a822-e44a81a86dc6" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,ddb5b0ca-afe3-436c-a822-e44a81a86dc6.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=659d36b9-5752-4316-bfa9-c6ad41b00966</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,659d36b9-5752-4316-bfa9-c6ad41b00966.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,659d36b9-5752-4316-bfa9-c6ad41b00966.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=659d36b9-5752-4316-bfa9-c6ad41b00966</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I had a discussion with Randal van Splunteren (<a title="http://biztalkmessages.vansplunteren.net/" href="http://biztalkmessages.vansplunteren.net/">http://biztalkmessages.vansplunteren.net/</a>)
today about demotion. Randal has been so kind as to review the first chapter I am
writing for the book (<a title="http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx" href="http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx">http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx</a>)
and we started chatting about demotion. Specifically we discussed whether existing
values in XML would be overwritten when demotion occurs.
</p>
        <p>
As it turns out, it depends.
</p>
        <p>
I did a small sample with two schemas and a map. I used a receive port to receive
a message, mapped it to the second schema (which just created empty nodes in the destination
schema) and output the result through a send port. The receive location used XMLReceive
and the send port used the XMLTransmit pipeline. What happened was, that the output
had the correct demoted values in them, since the XML assembler had empty elements
to map into. Now, if I changed the map to put a value into the fields, then the mapped
values were also output and not the demoted values. This means, that demotion does
NOT overwrite existing values.
</p>
        <p>
Randal, however, had a sample, where the existing values WERE overwritten. His solution
was leveraging an orchestration, however, which seems to be the big difference. As
I have blogged about here: <a title="http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx" href="http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx">http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx</a> orchestrations
can demote into attributes, which normal demotion cannot. So apparently there is another
difference, which is, that demotion in an orchestration, actually overwrites existing
values.
</p>
        <p>
 
</p>
        <p>
But now for the funny (weird?) part. I setup a solution where I had an XML instance
as input and used the passthrough receive pipeline. So no message type was promoted.
Even without an orchestration, the XML assembler actually does demotion, which is
cool. BUT, it overwrites existing values… Go figure. If the message type is present,
existing values are not overwritten, but if it is not present, existing values are
overwritten.
</p>
        <p>
Weird!
</p>
        <p>
-- 
<br />
Eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=659d36b9-5752-4316-bfa9-c6ad41b00966" />
      </body>
      <title>Some more notes on demotion</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,659d36b9-5752-4316-bfa9-c6ad41b00966.aspx</guid>
      <link>http://blog.eliasen.dk/2009/12/15/SomeMoreNotesOnDemotion.aspx</link>
      <pubDate>Tue, 15 Dec 2009 20:50:43 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I had a discussion with Randal van Splunteren (&lt;a title="http://biztalkmessages.vansplunteren.net/" href="http://biztalkmessages.vansplunteren.net/"&gt;http://biztalkmessages.vansplunteren.net/&lt;/a&gt;)
today about demotion. Randal has been so kind as to review the first chapter I am
writing for the book (&lt;a title="http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx" href="http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx"&gt;http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx&lt;/a&gt;)
and we started chatting about demotion. Specifically we discussed whether existing
values in XML would be overwritten when demotion occurs.
&lt;/p&gt;
&lt;p&gt;
As it turns out, it depends.
&lt;/p&gt;
&lt;p&gt;
I did a small sample with two schemas and a map. I used a receive port to receive
a message, mapped it to the second schema (which just created empty nodes in the destination
schema) and output the result through a send port. The receive location used XMLReceive
and the send port used the XMLTransmit pipeline. What happened was, that the output
had the correct demoted values in them, since the XML assembler had empty elements
to map into. Now, if I changed the map to put a value into the fields, then the mapped
values were also output and not the demoted values. This means, that demotion does
NOT overwrite existing values.
&lt;/p&gt;
&lt;p&gt;
Randal, however, had a sample, where the existing values WERE overwritten. His solution
was leveraging an orchestration, however, which seems to be the big difference. As
I have blogged about here: &lt;a title="http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx" href="http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx"&gt;http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx&lt;/a&gt; orchestrations
can demote into attributes, which normal demotion cannot. So apparently there is another
difference, which is, that demotion in an orchestration, actually overwrites existing
values.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
But now for the funny (weird?) part. I setup a solution where I had an XML instance
as input and used the passthrough receive pipeline. So no message type was promoted.
Even without an orchestration, the XML assembler actually does demotion, which is
cool. BUT, it overwrites existing values… Go figure. If the message type is present,
existing values are not overwritten, but if it is not present, existing values are
overwritten.
&lt;/p&gt;
&lt;p&gt;
Weird!
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
Eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=659d36b9-5752-4316-bfa9-c6ad41b00966" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,659d36b9-5752-4316-bfa9-c6ad41b00966.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a8f25deb-6d3a-427d-a797-d573c26ba423</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a8f25deb-6d3a-427d-a797-d573c26ba423.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a8f25deb-6d3a-427d-a797-d573c26ba423.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a8f25deb-6d3a-427d-a797-d573c26ba423</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
The other day I was given the task of updating an InfoPath template part that was
in use on a laptop, because a newer version of this template part was available.
</p>
        <p>
Upon opening the InfoPath client, I saw this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_thumb.png" width="221" height="640" />
          </a>
        </p>
        <p>
There were two template parts, and in this case they are named “TemplateGroup1” and
“TemplateGroup2”. I had a new version for the “TemplateGroup1” template part. I clicked
on “Add or Remove Custom Controls” and got this screen:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_thumb_1.png" width="385" height="296" />
          </a>
        </p>
        <p>
As you can see, the “TemplateGroup1” does not show up, which I thought was weird.
So, I tried clicking on “Add” to just add the new version of the “TemplateGroup1”,
but that gave me this error:
</p>
        <p>
The custom control, &lt;TemplateGroup1&gt; (urn:schemas-microsoft-com:office:infopath:templategroup1:-myxsd-2009-11-22t19-43-32),
is already installed. Remove the existing custom control, and then try installing
again.
</p>
        <p>
So, I was at a loss… I couldn’t remove the existing version, and I couldn’t upload
a new version.
</p>
        <p>
Finally, I discovered what had happened. The user has an entry in the registry like
this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_thumb_2.png" width="610" height="89" />
          </a>
        </p>
        <p>
The key “IPCustomControlsFolder” is placed in the “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\InfoPath\Designer”
path of the registry. All template parts you put into this folder are automatically
added to the controls of InfoPath.
</p>
        <p>
So I found that path, and deleted the “TemplateGroup1” template part, and everything
was fine.
</p>
        <p>
So, what I now know is, that there are two ways of adding new template parts to be
used by InfoPath:
</p>
        <ol>
          <li>
Add them manually inside the InfoPath client (or the toolbox in VS.NET)</li>
          <li>
Add the right registry key to the registry, so you have a repository of template parts.
This is especially useful for a repository on a shared network folder that can be
used for all employees.</li>
        </ol>
        <p>
So if you ever have trouble removing a template parts from the custom controls section,
look for the registry key.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a8f25deb-6d3a-427d-a797-d573c26ba423" />
      </body>
      <title>Removing an InfoPath template part from the controls section</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a8f25deb-6d3a-427d-a797-d573c26ba423.aspx</guid>
      <link>http://blog.eliasen.dk/2009/11/22/RemovingAnInfoPathTemplatePartFromTheControlsSection.aspx</link>
      <pubDate>Sun, 22 Nov 2009 20:35:51 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
The other day I was given the task of updating an InfoPath template part that was
in use on a laptop, because a newer version of this template part was available.
&lt;/p&gt;
&lt;p&gt;
Upon opening the InfoPath client, I saw this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_thumb.png" width="221" height="640" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
There were two template parts, and in this case they are named “TemplateGroup1” and
“TemplateGroup2”. I had a new version for the “TemplateGroup1” template part. I clicked
on “Add or Remove Custom Controls” and got this screen:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_thumb_1.png" width="385" height="296" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see, the “TemplateGroup1” does not show up, which I thought was weird.
So, I tried clicking on “Add” to just add the new version of the “TemplateGroup1”,
but that gave me this error:
&lt;/p&gt;
&lt;p&gt;
The custom control, &amp;lt;TemplateGroup1&amp;gt; (urn:schemas-microsoft-com:office:infopath:templategroup1:-myxsd-2009-11-22t19-43-32),
is already installed. Remove the existing custom control, and then try installing
again.
&lt;/p&gt;
&lt;p&gt;
So, I was at a loss… I couldn’t remove the existing version, and I couldn’t upload
a new version.
&lt;/p&gt;
&lt;p&gt;
Finally, I discovered what had happened. The user has an entry in the registry like
this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/RemovinganInfoPathtemplatepartfromthecon_12FB3/image_thumb_2.png" width="610" height="89" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The key “IPCustomControlsFolder” is placed in the “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\InfoPath\Designer”
path of the registry. All template parts you put into this folder are automatically
added to the controls of InfoPath.
&lt;/p&gt;
&lt;p&gt;
So I found that path, and deleted the “TemplateGroup1” template part, and everything
was fine.
&lt;/p&gt;
&lt;p&gt;
So, what I now know is, that there are two ways of adding new template parts to be
used by InfoPath:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Add them manually inside the InfoPath client (or the toolbox in VS.NET)&lt;/li&gt;
&lt;li&gt;
Add the right registry key to the registry, so you have a repository of template parts.
This is especially useful for a repository on a shared network folder that can be
used for all employees.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So if you ever have trouble removing a template parts from the custom controls section,
look for the registry key.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a8f25deb-6d3a-427d-a797-d573c26ba423" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a8f25deb-6d3a-427d-a797-d573c26ba423.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=eaa31c17-df2a-4d84-b0f8-0dc3899dd25b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,eaa31c17-df2a-4d84-b0f8-0dc3899dd25b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,eaa31c17-df2a-4d84-b0f8-0dc3899dd25b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=eaa31c17-df2a-4d84-b0f8-0dc3899dd25b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I KNOW it is old, but I have just today finally taken the time to listen to an interview
on Channel 9 with Sean O’Driscoll, who is the general manager for community support
and the MVP program. You can find it <a href="http://channel9.msdn.com/posts/Dan/Sean-ODriscoll-General-Manager-for-Community-Support-and-the-MVP-Program/" target="_blank">here</a>.
</p>
        <p>
Sean talks a lot about what the MVP program is, and I’d like to just take a couple
of really important points from his talk and list here
</p>
        <ol>
          <li>
The MVP award is a “Thank you” for your PAST efforts in the communities. There are
NO expectations to an MVP about what to do the next 12 months or the next day, even.</li>
          <li>
The MVP award lasts 12 months. After that you will have to be reevaluated to see if
your past 12 months of contributions to the community have been good enough to warrant
a reaward.</li>
          <li>
A true MVP gets the award not because he wants the award but because he wants to help
people. A true MVP would do exactly the same effort in communities even if there was
no MVP award.</li>
        </ol>
        <p>
Especially the third point is important to me. I mean.. the first time I was awarded
the MVP title, I got an email from MS stating that I had been nominated, and I had
to go search on the internet to find out what the MVP award was, because I had NO
idea…
</p>
        <p>
Anyway, it’s a good video – go watch it! :)
</p>
        <p>
Edit: Only 15 minutes after I posted it: Sean is no longer GM of community support.
Toby Richards is that now. Big thanks to my very fast MVP lead <a href="http://www.gerver.com/blog/" target="_blank">Gerard
Verbrugge</a> for setting me straight! :)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=eaa31c17-df2a-4d84-b0f8-0dc3899dd25b" />
      </body>
      <title>Sean O’Driscoll about the MVP program</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,eaa31c17-df2a-4d84-b0f8-0dc3899dd25b.aspx</guid>
      <link>http://blog.eliasen.dk/2009/11/17/SeanODriscollAboutTheMVPProgram.aspx</link>
      <pubDate>Tue, 17 Nov 2009 18:16:36 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I KNOW it is old, but I have just today finally taken the time to listen to an interview
on Channel 9 with Sean O’Driscoll, who is the general manager for community support
and the MVP program. You can find it &lt;a href="http://channel9.msdn.com/posts/Dan/Sean-ODriscoll-General-Manager-for-Community-Support-and-the-MVP-Program/" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Sean talks a lot about what the MVP program is, and I’d like to just take a couple
of really important points from his talk and list here
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The MVP award is a “Thank you” for your PAST efforts in the communities. There are
NO expectations to an MVP about what to do the next 12 months or the next day, even.&lt;/li&gt;
&lt;li&gt;
The MVP award lasts 12 months. After that you will have to be reevaluated to see if
your past 12 months of contributions to the community have been good enough to warrant
a reaward.&lt;/li&gt;
&lt;li&gt;
A true MVP gets the award not because he wants the award but because he wants to help
people. A true MVP would do exactly the same effort in communities even if there was
no MVP award.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Especially the third point is important to me. I mean.. the first time I was awarded
the MVP title, I got an email from MS stating that I had been nominated, and I had
to go search on the internet to find out what the MVP award was, because I had NO
idea…
&lt;/p&gt;
&lt;p&gt;
Anyway, it’s a good video – go watch it! :)
&lt;/p&gt;
&lt;p&gt;
Edit: Only 15 minutes after I posted it: Sean is no longer GM of community support.
Toby Richards is that now. Big thanks to my very fast MVP lead &lt;a href="http://www.gerver.com/blog/" target="_blank"&gt;Gerard
Verbrugge&lt;/a&gt; for setting me straight! :)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=eaa31c17-df2a-4d84-b0f8-0dc3899dd25b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,eaa31c17-df2a-4d84-b0f8-0dc3899dd25b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=2b623100-b8ca-47e0-8b49-5503f8ad8d07</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,2b623100-b8ca-47e0-8b49-5503f8ad8d07.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,2b623100-b8ca-47e0-8b49-5503f8ad8d07.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=2b623100-b8ca-47e0-8b49-5503f8ad8d07</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Here at Logica in Denmark, we have just been told that we have been chose as the Danish
Microsoft Partner of the year. We are naturally quite proud of this, and one of the
reasons for choosing us is, that despite the financial crisis we have gained market
shares.
</p>
        <p>
You can read Microsofts press release (only in Danish, I am afraid) here: <a title="http://www.logica.dk/file/18133" href="http://www.logica.dk/file/18133">http://www.logica.dk/file/18133</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2b623100-b8ca-47e0-8b49-5503f8ad8d07" />
      </body>
      <title>Logica is the Danish Microsoft partner of the year</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,2b623100-b8ca-47e0-8b49-5503f8ad8d07.aspx</guid>
      <link>http://blog.eliasen.dk/2009/11/14/LogicaIsTheDanishMicrosoftPartnerOfTheYear.aspx</link>
      <pubDate>Sat, 14 Nov 2009 13:59:25 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Here at Logica in Denmark, we have just been told that we have been chose as the Danish
Microsoft Partner of the year. We are naturally quite proud of this, and one of the
reasons for choosing us is, that despite the financial crisis we have gained market
shares.
&lt;/p&gt;
&lt;p&gt;
You can read Microsofts press release (only in Danish, I am afraid) here: &lt;a title="http://www.logica.dk/file/18133" href="http://www.logica.dk/file/18133"&gt;http://www.logica.dk/file/18133&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2b623100-b8ca-47e0-8b49-5503f8ad8d07" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,2b623100-b8ca-47e0-8b49-5503f8ad8d07.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=684905b6-b4c3-496e-a3b0-0a6410ef189d</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,684905b6-b4c3-496e-a3b0-0a6410ef189d.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,684905b6-b4c3-496e-a3b0-0a6410ef189d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=684905b6-b4c3-496e-a3b0-0a6410ef189d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just a quick note to let you all know that my friend and colleague Jakob Lund Krarup
has started a new blog about writing games using Microsofts XNA framework.
</p>
        <p>
So if this interests you, do follow it :-)
</p>
        <p>
 
</p>
        <p>
Edit (2009-11-04): The link to the blog is <a href="http://www.xnafan.net">http://www.xnafan.net</a> –
which I seem to have missed just before…
</p>
        <p>
 
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=684905b6-b4c3-496e-a3b0-0a6410ef189d" />
      </body>
      <title>New blog about XNA programming</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,684905b6-b4c3-496e-a3b0-0a6410ef189d.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/30/NewBlogAboutXNAProgramming.aspx</link>
      <pubDate>Fri, 30 Oct 2009 18:44:57 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just a quick note to let you all know that my friend and colleague Jakob Lund Krarup
has started a new blog about writing games using Microsofts XNA framework.
&lt;/p&gt;
&lt;p&gt;
So if this interests you, do follow it :-)
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Edit (2009-11-04): The link to the blog is &lt;a href="http://www.xnafan.net"&gt;http://www.xnafan.net&lt;/a&gt; –
which I seem to have missed just before…
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=684905b6-b4c3-496e-a3b0-0a6410ef189d" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,684905b6-b4c3-496e-a3b0-0a6410ef189d.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=aea06d21-ce17-45a6-bb4e-35576cf924c9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,aea06d21-ce17-45a6-bb4e-35576cf924c9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,aea06d21-ce17-45a6-bb4e-35576cf924c9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=aea06d21-ce17-45a6-bb4e-35576cf924c9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I tried playing with the “Fixed” property that can be set on an element or an
attribute in your schema. According to the documentation, this is then a value that
MUST be present in the element.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_thumb.png" width="295" height="183" />
          </a>
        </p>
        <p>
So the mapper is actually quite down with this – you cannot map anything to the field
that has a value in the “Fixed” property. And when expecting the XSLT that is generated
by the mapper you will find, that the mapper simply inserts the correct and hard coded
value into the field.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_thumb_1.png" width="249" height="57" />
          </a>
        </p>
        <p>
Great.
</p>
        <p>
Now, I created some links in the map just to test it, and chose that the mapper should
validate the input for my map, but not the output, since I hadn’t bothered dragging
all the necessary links.
</p>
        <p>
To my surprise I got this error:
</p>
        <p>
        </p>
        <div class="csharpcode">
          <pre class="alt">
            <span class="lnum"> 1: </span>Output validation error: The value
of the 'MiddleNames' element does not equal its fixed value.</pre>
        </div>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
An error validating the output of the map… but this surely must be a mistake, because
I turned validation of the output from the map off and besides; the value in “MiddleNames”
cannot be wrong, because the mapper has put it there it self, taken from the schema.
Very weird indeed.
</p>
        <p>
Only after quite a search, did I discover that the error was in validation of the
INPUT to the map and not the output. I had used the same schema as both input and
output, and my input instance did not have the correct value since it was an old test
instance.
</p>
        <p>
But really… Microsoft… that error message could be better! :-)
</p>
        <p>
Hope this helps someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=aea06d21-ce17-45a6-bb4e-35576cf924c9" />
      </body>
      <title>Testing a map when using the “Fixed” property on an element in your schema</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,aea06d21-ce17-45a6-bb4e-35576cf924c9.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/25/TestingAMapWhenUsingTheFixedPropertyOnAnElementInYourSchema.aspx</link>
      <pubDate>Sun, 25 Oct 2009 20:33:15 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I tried playing with the “Fixed” property that can be set on an element or an
attribute in your schema. According to the documentation, this is then a value that
MUST be present in the element.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_thumb.png" width="295" height="183" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So the mapper is actually quite down with this – you cannot map anything to the field
that has a value in the “Fixed” property. And when expecting the XSLT that is generated
by the mapper you will find, that the mapper simply inserts the correct and hard coded
value into the field.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TestingamapwhenusingtheFixedpropertyonan_12F1B/image_thumb_1.png" width="249" height="57" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Great.
&lt;/p&gt;
&lt;p&gt;
Now, I created some links in the map just to test it, and chose that the mapper should
validate the input for my map, but not the output, since I hadn’t bothered dragging
all the necessary links.
&lt;/p&gt;
&lt;p&gt;
To my surprise I got this error:
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;Output validation error: The value
of the 'MiddleNames' element does not equal its fixed value.&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
An error validating the output of the map… but this surely must be a mistake, because
I turned validation of the output from the map off and besides; the value in “MiddleNames”
cannot be wrong, because the mapper has put it there it self, taken from the schema.
Very weird indeed.
&lt;/p&gt;
&lt;p&gt;
Only after quite a search, did I discover that the error was in validation of the
INPUT to the map and not the output. I had used the same schema as both input and
output, and my input instance did not have the correct value since it was an old test
instance.
&lt;/p&gt;
&lt;p&gt;
But really… Microsoft… that error message could be better! :-)
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=aea06d21-ce17-45a6-bb4e-35576cf924c9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,aea06d21-ce17-45a6-bb4e-35576cf924c9.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=b64f44b8-499e-4822-a6ec-31725d64d115</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,b64f44b8-499e-4822-a6ec-31725d64d115.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,b64f44b8-499e-4822-a6ec-31725d64d115.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=b64f44b8-499e-4822-a6ec-31725d64d115</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
As many have noticed, I am co-authoring a <a href="http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx" target="_blank">book</a> and
right now I am writing all my stuff in Word 2007. 
</p>
        <p>
As you might have guessed, I have lots of sections, subsections, figures, tables and
other numbered items in my text, and naturally, they are there because I need to reference
them in my text.
</p>
        <p>
In order to insert a cross reference from some text to a given numbered item, I found
two options:
</p>
        <ol>
          <li>
Go to the “References” tab and click on “Cross-reference” in the “Captions” section.</li>
          <li>
Go to the “Insert” tab and click on “Cross-reference” in the “Links” section.</li>
        </ol>
        <p>
Both will give me this window:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb.png" width="436" height="349" />
          </a>
        </p>
        <p>
This is all very fine, but I need a quicker access point, since it appears that I
most often need both clicks to get to the dialog box, since I am usually not on either
the “Insert” or the “References” tab.
</p>
        <p>
So I discovered the “Quick Access Toolbar” by chance. This happened when I accidentally
right-clicked on the “Cross-reference” in stead of clicking on it. Here I could add
the functionality to the “Quick Access Toolbar” and also choose to show the “Quick
Access Toolbar”, as seen here:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_1.png" width="429" height="171" />
          </a>
        </p>
        <p>
The arrow points to the “Quick Access Toolbar” and the red square is around the “Cross-reference”
functionality. So now I always only need one click, which made me happy… for a while
:-)
</p>
        <p>
Because once I could do it with just one click, I started wondering about a keyboard
shortcut for it. I couldn’t find one, and I searched and searched… and finally just
after posting my question to a newsgroup, I found how to do it:
</p>
        <p>
Go to “Word Options”, which is a button at the lower right when clicking on the Start
button at the upper left of Word:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_8.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_3.png" width="507" height="703" />
          </a>
        </p>
        <p>
        </p>
        <p>
This will open up the Word Options. Go to “Customize” and click on “Customize…” as
seen in the image below:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_10.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_4.png" width="844" height="689" />
          </a>
        </p>
        <p>
After this you get a screen where you can change short cuts, as seen here:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_12.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_5.png" width="585" height="458" />
          </a>
        </p>
        <p>
Choose “Insert Tab” and then “InsertCrossReference” and click in the “Press new shortcut
key:” box. Now enter the shortcut you want (I entered Alt+Ctrl+Shift+C). Word will
tell you if the shortcut you have chosen is all ready assigned to another function
(Mine is “Unassigned” as you can see) and then you can click on “Assign” to complete
the task.
</p>
        <p>
So now, every time I need to insert a cross reference, I just pres Ctrl+Alt+Shift+C
and the dialog box comes up. 
</p>
        <p>
All that is left now is to get the “Only Label and number” as the default value for
the drop down that decides what to insert instead of “Entire Caption”, but a Word
MVP wrote in a post I found that this was not possible. Bummer. Keeping my fingers
crossed for Office 2010! :-)
</p>
        <p>
I hope this helps someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b64f44b8-499e-4822-a6ec-31725d64d115" />
      </body>
      <title>Keyboard Shortcut to insert a cross reference in Word 2007</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,b64f44b8-499e-4822-a6ec-31725d64d115.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/25/KeyboardShortcutToInsertACrossReferenceInWord2007.aspx</link>
      <pubDate>Sun, 25 Oct 2009 14:34:46 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
As many have noticed, I am co-authoring a &lt;a href="http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx" target="_blank"&gt;book&lt;/a&gt; and
right now I am writing all my stuff in Word 2007. 
&lt;/p&gt;
&lt;p&gt;
As you might have guessed, I have lots of sections, subsections, figures, tables and
other numbered items in my text, and naturally, they are there because I need to reference
them in my text.
&lt;/p&gt;
&lt;p&gt;
In order to insert a cross reference from some text to a given numbered item, I found
two options:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Go to the “References” tab and click on “Cross-reference” in the “Captions” section.&lt;/li&gt;
&lt;li&gt;
Go to the “Insert” tab and click on “Cross-reference” in the “Links” section.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Both will give me this window:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb.png" width="436" height="349" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
This is all very fine, but I need a quicker access point, since it appears that I
most often need both clicks to get to the dialog box, since I am usually not on either
the “Insert” or the “References” tab.
&lt;/p&gt;
&lt;p&gt;
So I discovered the “Quick Access Toolbar” by chance. This happened when I accidentally
right-clicked on the “Cross-reference” in stead of clicking on it. Here I could add
the functionality to the “Quick Access Toolbar” and also choose to show the “Quick
Access Toolbar”, as seen here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_1.png" width="429" height="171" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The arrow points to the “Quick Access Toolbar” and the red square is around the “Cross-reference”
functionality. So now I always only need one click, which made me happy… for a while
:-)
&lt;/p&gt;
&lt;p&gt;
Because once I could do it with just one click, I started wondering about a keyboard
shortcut for it. I couldn’t find one, and I searched and searched… and finally just
after posting my question to a newsgroup, I found how to do it:
&lt;/p&gt;
&lt;p&gt;
Go to “Word Options”, which is a button at the lower right when clicking on the Start
button at the upper left of Word:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_3.png" width="507" height="703" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
This will open up the Word Options. Go to “Customize” and click on “Customize…” as
seen in the image below:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_4.png" width="844" height="689" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
After this you get a screen where you can change short cuts, as seen here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/KeyboardShortcuttoinsertacrossreferencei_DB0A/image_thumb_5.png" width="585" height="458" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Choose “Insert Tab” and then “InsertCrossReference” and click in the “Press new shortcut
key:” box. Now enter the shortcut you want (I entered Alt+Ctrl+Shift+C). Word will
tell you if the shortcut you have chosen is all ready assigned to another function
(Mine is “Unassigned” as you can see) and then you can click on “Assign” to complete
the task.
&lt;/p&gt;
&lt;p&gt;
So now, every time I need to insert a cross reference, I just pres Ctrl+Alt+Shift+C
and the dialog box comes up. 
&lt;/p&gt;
&lt;p&gt;
All that is left now is to get the “Only Label and number” as the default value for
the drop down that decides what to insert instead of “Entire Caption”, but a Word
MVP wrote in a post I found that this was not possible. Bummer. Keeping my fingers
crossed for Office 2010! :-)
&lt;/p&gt;
&lt;p&gt;
I hope this helps someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b64f44b8-499e-4822-a6ec-31725d64d115" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,b64f44b8-499e-4822-a6ec-31725d64d115.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=1e96a881-06a9-47c0-ac61-ced9f603a1a0</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,1e96a881-06a9-47c0-ac61-ced9f603a1a0.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,1e96a881-06a9-47c0-ac61-ced9f603a1a0.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=1e96a881-06a9-47c0-ac61-ced9f603a1a0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
If you are also receiving this error when unit testing your schemas:
</p>
        <p>
TOMTreeGenerator.GetElementAbsoluteType: Object reference not set to an instance of
an object.
</p>
        <p>
then I can inform you that the reason is, that the built-in unit test framework does
not support schemas that include or import other schemas.
</p>
        <p>
To partially overcome this, take a look at the seventh issue of the BizTalk Hotrod
at <a title="http://biztalkhotrod.com/default.aspx" href="http://biztalkhotrod.com/default.aspx">http://biztalkhotrod.com/default.aspx</a>,
where it is explained how to write a small helper class that will allow you to do
unit testing on schemas that include and/or import other schemas.
</p>
        <p>
Unfortunately this does not cover native file formats, but one can hope that Microsoft
will improve the unit testing features in future versions of BizTalk.
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1e96a881-06a9-47c0-ac61-ced9f603a1a0" />
      </body>
      <title>Error using unit test of schemas</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,1e96a881-06a9-47c0-ac61-ced9f603a1a0.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/24/ErrorUsingUnitTestOfSchemas.aspx</link>
      <pubDate>Sat, 24 Oct 2009 19:51:56 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
If you are also receiving this error when unit testing your schemas:
&lt;/p&gt;
&lt;p&gt;
TOMTreeGenerator.GetElementAbsoluteType: Object reference not set to an instance of
an object.
&lt;/p&gt;
&lt;p&gt;
then I can inform you that the reason is, that the built-in unit test framework does
not support schemas that include or import other schemas.
&lt;/p&gt;
&lt;p&gt;
To partially overcome this, take a look at the seventh issue of the BizTalk Hotrod
at &lt;a title="http://biztalkhotrod.com/default.aspx" href="http://biztalkhotrod.com/default.aspx"&gt;http://biztalkhotrod.com/default.aspx&lt;/a&gt;,
where it is explained how to write a small helper class that will allow you to do
unit testing on schemas that include and/or import other schemas.
&lt;/p&gt;
&lt;p&gt;
Unfortunately this does not cover native file formats, but one can hope that Microsoft
will improve the unit testing features in future versions of BizTalk.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1e96a881-06a9-47c0-ac61-ced9f603a1a0" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,1e96a881-06a9-47c0-ac61-ced9f603a1a0.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=1f446bc6-e7f7-43e7-8e08-56fc9659a5c1</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,1f446bc6-e7f7-43e7-8e08-56fc9659a5c1.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,1f446bc6-e7f7-43e7-8e08-56fc9659a5c1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=1f446bc6-e7f7-43e7-8e08-56fc9659a5c1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
My apologies for writing something that is only relevant for the Danish audience.
</p>
        <p>
Anyway, my friend and former colleague Jesper Petersen and his wife, Helle Petersen
have started a new web site at <a href="http://www.delebarn.dk">http://www.delebarn.dk</a>.
The web site is a tool for parents that are divorced and need a some way of communicating
about their children. There are lots of features that a free and you can buy a VIP
membership quite cheap.
</p>
        <p>
The site is only in Danish.
</p>
        <p>
So if you are divorced and need some way of handling information about your children,
like; How did it go at the doctor? When is football practice? And lots, lots and lots
other stuff, then take a look at <a href="http://www.delebarn.dk">http://www.delebarn.dk</a>.
</p>
        <p>
Thanks
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1f446bc6-e7f7-43e7-8e08-56fc9659a5c1" />
      </body>
      <title>delebarn.dk</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,1f446bc6-e7f7-43e7-8e08-56fc9659a5c1.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/18/delebarndk.aspx</link>
      <pubDate>Sun, 18 Oct 2009 17:46:44 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
My apologies for writing something that is only relevant for the Danish audience.
&lt;/p&gt;
&lt;p&gt;
Anyway, my friend and former colleague Jesper Petersen and his wife, Helle Petersen
have started a new web site at &lt;a href="http://www.delebarn.dk"&gt;http://www.delebarn.dk&lt;/a&gt;.
The web site is a tool for parents that are divorced and need a some way of communicating
about their children. There are lots of features that a free and you can buy a VIP
membership quite cheap.
&lt;/p&gt;
&lt;p&gt;
The site is only in Danish.
&lt;/p&gt;
&lt;p&gt;
So if you are divorced and need some way of handling information about your children,
like; How did it go at the doctor? When is football practice? And lots, lots and lots
other stuff, then take a look at &lt;a href="http://www.delebarn.dk"&gt;http://www.delebarn.dk&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Thanks
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1f446bc6-e7f7-43e7-8e08-56fc9659a5c1" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,1f446bc6-e7f7-43e7-8e08-56fc9659a5c1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=19808e1b-b83b-4b5b-b59a-8de344bda3ac</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,19808e1b-b83b-4b5b-b59a-8de344bda3ac.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,19808e1b-b83b-4b5b-b59a-8de344bda3ac.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=19808e1b-b83b-4b5b-b59a-8de344bda3ac</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
The other day I ran into a strange error when compiling my BizTalk solution. It was
a simple solution, which I was fairly sure there was nothing wrong with. I had two
projects. In the first I had a public orchestration and in the second I had a schema
and an orchestration that calls the orchestration in the first project.
</p>
        <p>
So the project structure looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/project_structure_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="project_structure" border="0" alt="project_structure" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/project_structure_thumb.png" width="245" height="176" />
          </a>
        </p>
        <p>
So not something that would normally go wrong. Anyway, the “customer.biztalk.sendmail”
project compiles just fine. But when I compile the “eliasen.customer.test” project
it fails with these three errors:
</p>
        <ol>
          <li>
identifier 'biztalk' does not exist in 'eliasen.customer'; are you missing an assembly
reference?</li>
          <li>
cannot find symbol 'customer.biztalk.sendmail.Send_Receipt'</li>
          <li>
'biztalk.sendmail.Send_Receipt': can only call or exec a service</li>
        </ol>
        <p>
This was weird. Apparently the called orchestration (customer.biztalk.sendmail.Send_Receipt)
could not be found. Now since there has been a lot of issues with the copy local functionality
being broken, that was my first thought. But since my solution had never been deployed
and using Reflector on the customer.biztalk.sendmail assembly that was copied to the
bin folder of the eliasen.customer.test project had all the right classes, I skipped
that idea.
</p>
        <p>
Then, just to be sure, I checked that “biztalk”, “customer” and “sendmail” aren’t
reserved words in XLANG/s here: <a title="http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx">http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx</a> –
they weren’t.
</p>
        <p>
Then I googled the “can only call or exec a service” error and found a couple of hits,
but none that I could directly relate to my issue.
</p>
        <p>
Then, as if struck by divine intervention, I thought of changing the namespace of
the orchestration that was being called. Maybe in hindsight it makes sense, since
one of the errors is telling me that it is looking for “biztalk” in the “eliasen.customer”
namespace, which really doesn’t make sense at all.
</p>
        <p>
Anyway, I opened up the properties of the called orchestration and changed the namespace:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/new_namespace_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="new_namespace" border="0" alt="new_namespace" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/new_namespace_thumb_1.png" width="310" height="523" />
          </a>
        </p>
        <p>
and then it compiled… after re-choosing the called orchestration in my “Call Orchestration”
shape. This, of course, is not acceptable – I want to be able to have any namespace
I want. It seems that somehow the compiler matches the “customer” in “customer.biztalk.sendmail”
to the “customer” in “eliasen.customer.test” with each other.
</p>
        <p>
I have tried looking deeper into this, but I can’t seem to find the exact reason it
is failing, so I will probably just report it to Microsoft and then let them deal
with it :-)
</p>
        <p>
Hope this helps someone…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=19808e1b-b83b-4b5b-b59a-8de344bda3ac" />
      </body>
      <title>can only call or exec a service</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,19808e1b-b83b-4b5b-b59a-8de344bda3ac.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/17/canOnlyCallOrExecAService.aspx</link>
      <pubDate>Sat, 17 Oct 2009 20:59:34 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
The other day I ran into a strange error when compiling my BizTalk solution. It was
a simple solution, which I was fairly sure there was nothing wrong with. I had two
projects. In the first I had a public orchestration and in the second I had a schema
and an orchestration that calls the orchestration in the first project.
&lt;/p&gt;
&lt;p&gt;
So the project structure looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/project_structure_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="project_structure" border="0" alt="project_structure" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/project_structure_thumb.png" width="245" height="176" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So not something that would normally go wrong. Anyway, the “customer.biztalk.sendmail”
project compiles just fine. But when I compile the “eliasen.customer.test” project
it fails with these three errors:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
identifier 'biztalk' does not exist in 'eliasen.customer'; are you missing an assembly
reference?&lt;/li&gt;
&lt;li&gt;
cannot find symbol 'customer.biztalk.sendmail.Send_Receipt'&lt;/li&gt;
&lt;li&gt;
'biztalk.sendmail.Send_Receipt': can only call or exec a service&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
This was weird. Apparently the called orchestration (customer.biztalk.sendmail.Send_Receipt)
could not be found. Now since there has been a lot of issues with the copy local functionality
being broken, that was my first thought. But since my solution had never been deployed
and using Reflector on the customer.biztalk.sendmail assembly that was copied to the
bin folder of the eliasen.customer.test project had all the right classes, I skipped
that idea.
&lt;/p&gt;
&lt;p&gt;
Then, just to be sure, I checked that “biztalk”, “customer” and “sendmail” aren’t
reserved words in XLANG/s here: &lt;a title="http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa547020(BTS.10).aspx&lt;/a&gt; –
they weren’t.
&lt;/p&gt;
&lt;p&gt;
Then I googled the “can only call or exec a service” error and found a couple of hits,
but none that I could directly relate to my issue.
&lt;/p&gt;
&lt;p&gt;
Then, as if struck by divine intervention, I thought of changing the namespace of
the orchestration that was being called. Maybe in hindsight it makes sense, since
one of the errors is telling me that it is looking for “biztalk” in the “eliasen.customer”
namespace, which really doesn’t make sense at all.
&lt;/p&gt;
&lt;p&gt;
Anyway, I opened up the properties of the called orchestration and changed the namespace:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/new_namespace_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="new_namespace" border="0" alt="new_namespace" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/canonlycallorexecaservice_1188A/new_namespace_thumb_1.png" width="310" height="523" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
and then it compiled… after re-choosing the called orchestration in my “Call Orchestration”
shape. This, of course, is not acceptable – I want to be able to have any namespace
I want. It seems that somehow the compiler matches the “customer” in “customer.biztalk.sendmail”
to the “customer” in “eliasen.customer.test” with each other.
&lt;/p&gt;
&lt;p&gt;
I have tried looking deeper into this, but I can’t seem to find the exact reason it
is failing, so I will probably just report it to Microsoft and then let them deal
with it :-)
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=19808e1b-b83b-4b5b-b59a-8de344bda3ac" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,19808e1b-b83b-4b5b-b59a-8de344bda3ac.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f2166379-a617-4e72-aa96-b19dea9ecd35</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f2166379-a617-4e72-aa96-b19dea9ecd35.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f2166379-a617-4e72-aa96-b19dea9ecd35.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f2166379-a617-4e72-aa96-b19dea9ecd35</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I discovered something I was not expecting while documenting something else,
which I have just described <a href="http://blog.eliasen.dk/2009/10/16/CopyingContextBetweenMessagesInAnOrchestrationHowDoesM2M1Work.aspx" target="_blank">here</a>.
</p>
        <p>
I had a solution that involved this input schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputschema_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="inputschema" border="0" alt="inputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputschema_thumb_1.png" width="132" height="80" />
          </a>
        </p>
        <p>
and this output schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputschema_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="outputschema" border="0" alt="outputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputschema_thumb.png" width="124" height="76" />
          </a>
        </p>
        <p>
Field1 from the input schema and Field3 form the output schema are promoted to the
same property and Field2 form the input schema and Field4 from the output schema are
also promoted to the same property. Note, that Field4 is an attribute, whereas Field1,
Field2 and Field3 are elements.
</p>
        <p>
I then have a map that does not map anything from the input to the output. It just
creates empty elements/attributes in the output schema.
</p>
        <p>
I added a receive port and receive location to read in the input and used the XMLReceive
pipeline, because I needed the messagetype and I needed the property promotion. I
added my map to the receive port. I then created a send port that basically just took
everything that came in on the receive port and sent it out to a file. The send port
uses the XMLTransmit pipeline.
</p>
        <p>
The output from this was, as I expected. Given this input:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputinstance_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="inputinstance" border="0" alt="inputinstance" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputinstance_thumb.png" width="468" height="80" />
          </a>
        </p>
        <p>
I got this output:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="outputinstance" border="0" alt="outputinstance" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance_thumb.png" width="555" height="80" />
          </a>
        </p>
        <p>
What happens is, that demotion is not supported for attributes, which really seems
like a silly restriction, but that is just how it is.
</p>
        <p>
When, however, I implemented my solution using an orchestration, it worked! The value
of Field2 in the input was demoted into the value of Field4 in the output.
</p>
        <p>
My orchestration is very simple:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/orchestration_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="orchestration" border="0" alt="orchestration" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/orchestration_thumb.png" width="338" height="456" />
          </a>
        </p>
        <p>
Basically, I receive the input, transform it using the same map as was on the receive
port, copy over all the properties:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> OutputMessage(*)
= InputMessage(*);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> OutputMessage(DemotionTest.Property1)
= InputMessage(DemotionTest.Property1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> OutputMessage(DemotionTest.Property2)
= InputMessage(DemotionTest.Property2);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
        </p>
        <p>
The reason that I copy over Property1 and Property2 manually is, that they are marked
as MessageDataContextProperty in the property schema, and therefore, they are not
automatically copied over using the OutputMessage(*) = InputMessage(*) statement.
</p>
        <p>
After doing this, I just send out the message. The result is this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance2_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="outputinstance2" border="0" alt="outputinstance2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance2_thumb.png" width="604" height="87" />
          </a>
        </p>
        <p>
Now, this confused me… and what confused me more is, that I can actually do it with
the passthrough pipeline on the send port. This means, that the demotion is happening
as the orchestration publishes the message into the MessageBox for sending out the
message. 
</p>
        <p>
So the upside to this is, that demotion for attributes DOES work – but only when the
demotion occurs inside an orchestration upon sending out the message.
</p>
        <p>
The downside is, that the product team have managed to do things differently depending
on where in the process it happens, which really sounds like bad design. Hopefully
they will fix this at some point in time.
</p>
        <p>
Hope this helps someone
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f2166379-a617-4e72-aa96-b19dea9ecd35" />
      </body>
      <title>Demotion does not work for attributes… or does it?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f2166379-a617-4e72-aa96-b19dea9ecd35.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/16/DemotionDoesNotWorkForAttributesOrDoesIt.aspx</link>
      <pubDate>Fri, 16 Oct 2009 11:52:43 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I discovered something I was not expecting while documenting something else,
which I have just described &lt;a href="http://blog.eliasen.dk/2009/10/16/CopyingContextBetweenMessagesInAnOrchestrationHowDoesM2M1Work.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I had a solution that involved this input schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputschema_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="inputschema" border="0" alt="inputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputschema_thumb_1.png" width="132" height="80" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
and this output schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputschema_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="outputschema" border="0" alt="outputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputschema_thumb.png" width="124" height="76" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Field1 from the input schema and Field3 form the output schema are promoted to the
same property and Field2 form the input schema and Field4 from the output schema are
also promoted to the same property. Note, that Field4 is an attribute, whereas Field1,
Field2 and Field3 are elements.
&lt;/p&gt;
&lt;p&gt;
I then have a map that does not map anything from the input to the output. It just
creates empty elements/attributes in the output schema.
&lt;/p&gt;
&lt;p&gt;
I added a receive port and receive location to read in the input and used the XMLReceive
pipeline, because I needed the messagetype and I needed the property promotion. I
added my map to the receive port. I then created a send port that basically just took
everything that came in on the receive port and sent it out to a file. The send port
uses the XMLTransmit pipeline.
&lt;/p&gt;
&lt;p&gt;
The output from this was, as I expected. Given this input:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputinstance_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="inputinstance" border="0" alt="inputinstance" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/inputinstance_thumb.png" width="468" height="80" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I got this output:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="outputinstance" border="0" alt="outputinstance" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance_thumb.png" width="555" height="80" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
What happens is, that demotion is not supported for attributes, which really seems
like a silly restriction, but that is just how it is.
&lt;/p&gt;
&lt;p&gt;
When, however, I implemented my solution using an orchestration, it worked! The value
of Field2 in the input was demoted into the value of Field4 in the output.
&lt;/p&gt;
&lt;p&gt;
My orchestration is very simple:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/orchestration_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="orchestration" border="0" alt="orchestration" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/orchestration_thumb.png" width="338" height="456" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Basically, I receive the input, transform it using the same map as was on the receive
port, copy over all the properties:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; OutputMessage(*)
= InputMessage(*);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; OutputMessage(DemotionTest.Property1)
= InputMessage(DemotionTest.Property1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; OutputMessage(DemotionTest.Property2)
= InputMessage(DemotionTest.Property2);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The reason that I copy over Property1 and Property2 manually is, that they are marked
as MessageDataContextProperty in the property schema, and therefore, they are not
automatically copied over using the OutputMessage(*) = InputMessage(*) statement.
&lt;/p&gt;
&lt;p&gt;
After doing this, I just send out the message. The result is this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance2_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="outputinstance2" border="0" alt="outputinstance2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Demotiondoesnotworkforattributesordoesit_B126/outputinstance2_thumb.png" width="604" height="87" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now, this confused me… and what confused me more is, that I can actually do it with
the passthrough pipeline on the send port. This means, that the demotion is happening
as the orchestration publishes the message into the MessageBox for sending out the
message. 
&lt;/p&gt;
&lt;p&gt;
So the upside to this is, that demotion for attributes DOES work – but only when the
demotion occurs inside an orchestration upon sending out the message.
&lt;/p&gt;
&lt;p&gt;
The downside is, that the product team have managed to do things differently depending
on where in the process it happens, which really sounds like bad design. Hopefully
they will fix this at some point in time.
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f2166379-a617-4e72-aa96-b19dea9ecd35" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f2166379-a617-4e72-aa96-b19dea9ecd35.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c07b51e4-df46-4c84-979b-527b16a0616c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c07b51e4-df46-4c84-979b-527b16a0616c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c07b51e4-df46-4c84-979b-527b16a0616c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c07b51e4-df46-4c84-979b-527b16a0616c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
It is pretty common that developers want to assign one message to another inside and
orchestration. And as we all know, this must happen inside a “Construct Message” shape.
</p>
        <p>
Inside the “Construct Message” shape, you can have several shapes, but they must all
be either a “Transform” shape or a “Message Assignment” shape. The “Transform” shape
is used to execute a map, that will generate the message(s) that is/are to be constructed.
The “Message Assignment” shape on the other hand uses the expression editor to let
you specify how to assign a value to the message(s) that is/are to be constructed.
</p>
        <p>
Often, there is a need to basically copy a message and then change just a couple of
values in the copied message. This can’t be done by changing the values of the existing
message, as messages in an orchestration are immutable.
</p>
        <p>
Creating the copy is pretty simple; You just assign one message to another like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> OutputMessage
= InputMessage;</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Now, what many people realize after doing this and something does not work, like routing,
correlation or other is, that this assignment only copies the content of InputMessage
to OutputMessage. The context is not copied at all. So what you can do is to add another
line of code to your “Message Assignment” shape like this:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> OutputMessage
= InputMessage;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> OutputMessage(*)
= InputMessage(*);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
        </p>
        <p>
This will copy the context of a message from one message to another… but not the entire
context, as it turns out.
</p>
        <p>
I was trying out a demo for property demotion, and for this I let my orchestration
receive an input message, transform it to an output message and send this out.
</p>
        <p>
So what I did was that I created two schemas:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/inputschema_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="inputschema" border="0" alt="inputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/inputschema_thumb.png" width="132" height="80" />
          </a> and <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/outputschema_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="outputschema" border="0" alt="outputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/outputschema_thumb.png" width="124" height="76" /></a></p>
        <p>
I let Field1 and Field3 be promoted into the same promoted property from a custom
property schema, and I let Field2 and Field 4 be promoted into another property in
a custom property schema.
</p>
        <p>
        </p>
        <p>
and a map that does not map anything – it just created empty fields for Field3 and
Field4.
</p>
        <p>
In my “Construct Message” shape, I then added a “Transform” shape to do the transformation
and a “Message Assignment” shape that would copy the properties. I then wanted to
make sure the output of the send port had the demoted values inside it.
</p>
        <p>
What I expected to happen was this:
</p>
        <ol>
          <li>
The XMLReceive pipeline would receive the input, promote the two properties and publish
the message to the MessageBox.</li>
          <li>
The Orchestration would pick it up, perform the transformation, copy the context and
send the message out.</li>
          <li>
The XMLTransmit pipeline would demote the two values from context (that I had copied
from the input message) into Field3 and Field4</li>
        </ol>
        <p>
This didn’t happen, though. No values were demoted at all. Now, not demoting into
Field4 was expected, since demotion doesn’t work for attributes (or does it? See my
blog post coming up in a very short time :-) ), but I really expected something to
turn up in Field3.
</p>
        <p>
It turns out, that this statement from my code:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> OutputMessage(*)
= InputMessage(*);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
        </p>
        <p>
does not copy ALL the context, but only the promoted properties that are marked as
MessageContextPropertyBase. The ones that are marked as MessageDataPropertyBase (which
is the default) do not get copied over. Now, this actually makes sense, all though
it baffled me at first, since properties marked as MessageDataPropertyBase are based
on values inside the message, so they cannot just be copied to another message type,
since BizTalk cannot guarantee that this property exists on this message type and
that the element that points to the promoted property actually exists in the message.
Well, I guess BizTalk COULD guarantee that, but Microsoft have chosen not to implement
that.
</p>
        <p>
Also, distinguished fields, which are also in the context of the message are not copied
over – again, this makes sense, since these are tightly bound to the schema they come
from (This doesn’t stop the mapping engine of copying them over in maps on receive
ports, though, which is really silly – see <a href="http://blog.eliasen.dk/2009/06/10/PromotingValuesFromDestinationSchemaOfMapOnReceivePort.aspx" target="_blank">here</a>).
</p>
        <p>
SO, in order to get ALL the context copied form my input schema to the output schema,
I needed three lines of code:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> OutputMessage(*)
= InputMessage(*);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> OutputMessage(DemotionTest.Property1)
= InputMessage(DemotionTest.Property1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> OutputMessage(DemotionTest.Property2)
= InputMessage(DemotionTest.Property2);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
or I could mark the properties as MessageContextPropertyBase.
</p>
        <p>
Yes, indeed… So remember this from now on:
</p>
        <ol>
          <li>
Assigning one message to another does NOT copy over the context</li>
          <li>
Copying over context using M2(*) = M1(*) does NOT copy over custom properties that
are marked as the default (MessageDataContextBase)</li>
          <li>
In order to get the rest of the properties copied over, do it manually or change the
type of the properties, if applicable.</li>
        </ol>
        <p>
I hope this helps someone…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c07b51e4-df46-4c84-979b-527b16a0616c" />
      </body>
      <title>Copying context between messages in an orchestration – how does M2(*) = M1(*) work?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c07b51e4-df46-4c84-979b-527b16a0616c.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/16/CopyingContextBetweenMessagesInAnOrchestrationHowDoesM2M1Work.aspx</link>
      <pubDate>Fri, 16 Oct 2009 11:38:00 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
It is pretty common that developers want to assign one message to another inside and
orchestration. And as we all know, this must happen inside a “Construct Message” shape.
&lt;/p&gt;
&lt;p&gt;
Inside the “Construct Message” shape, you can have several shapes, but they must all
be either a “Transform” shape or a “Message Assignment” shape. The “Transform” shape
is used to execute a map, that will generate the message(s) that is/are to be constructed.
The “Message Assignment” shape on the other hand uses the expression editor to let
you specify how to assign a value to the message(s) that is/are to be constructed.
&lt;/p&gt;
&lt;p&gt;
Often, there is a need to basically copy a message and then change just a couple of
values in the copied message. This can’t be done by changing the values of the existing
message, as messages in an orchestration are immutable.
&lt;/p&gt;
&lt;p&gt;
Creating the copy is pretty simple; You just assign one message to another like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; OutputMessage
= InputMessage;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Now, what many people realize after doing this and something does not work, like routing,
correlation or other is, that this assignment only copies the content of InputMessage
to OutputMessage. The context is not copied at all. So what you can do is to add another
line of code to your “Message Assignment” shape like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; OutputMessage
= InputMessage;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; OutputMessage(*)
= InputMessage(*);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
This will copy the context of a message from one message to another… but not the entire
context, as it turns out.
&lt;/p&gt;
&lt;p&gt;
I was trying out a demo for property demotion, and for this I let my orchestration
receive an input message, transform it to an output message and send this out.
&lt;/p&gt;
&lt;p&gt;
So what I did was that I created two schemas:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/inputschema_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="inputschema" border="0" alt="inputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/inputschema_thumb.png" width="132" height="80" /&gt;&lt;/a&gt; and &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/outputschema_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="outputschema" border="0" alt="outputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Copyingcontextbetweenmessagesinanorchest_BFBA/outputschema_thumb.png" width="124" height="76" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I let Field1 and Field3 be promoted into the same promoted property from a custom
property schema, and I let Field2 and Field 4 be promoted into another property in
a custom property schema.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
and a map that does not map anything – it just created empty fields for Field3 and
Field4.
&lt;/p&gt;
&lt;p&gt;
In my “Construct Message” shape, I then added a “Transform” shape to do the transformation
and a “Message Assignment” shape that would copy the properties. I then wanted to
make sure the output of the send port had the demoted values inside it.
&lt;/p&gt;
&lt;p&gt;
What I expected to happen was this:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The XMLReceive pipeline would receive the input, promote the two properties and publish
the message to the MessageBox.&lt;/li&gt;
&lt;li&gt;
The Orchestration would pick it up, perform the transformation, copy the context and
send the message out.&lt;/li&gt;
&lt;li&gt;
The XMLTransmit pipeline would demote the two values from context (that I had copied
from the input message) into Field3 and Field4&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
This didn’t happen, though. No values were demoted at all. Now, not demoting into
Field4 was expected, since demotion doesn’t work for attributes (or does it? See my
blog post coming up in a very short time :-) ), but I really expected something to
turn up in Field3.
&lt;/p&gt;
&lt;p&gt;
It turns out, that this statement from my code:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; OutputMessage(*)
= InputMessage(*);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
does not copy ALL the context, but only the promoted properties that are marked as
MessageContextPropertyBase. The ones that are marked as MessageDataPropertyBase (which
is the default) do not get copied over. Now, this actually makes sense, all though
it baffled me at first, since properties marked as MessageDataPropertyBase are based
on values inside the message, so they cannot just be copied to another message type,
since BizTalk cannot guarantee that this property exists on this message type and
that the element that points to the promoted property actually exists in the message.
Well, I guess BizTalk COULD guarantee that, but Microsoft have chosen not to implement
that.
&lt;/p&gt;
&lt;p&gt;
Also, distinguished fields, which are also in the context of the message are not copied
over – again, this makes sense, since these are tightly bound to the schema they come
from (This doesn’t stop the mapping engine of copying them over in maps on receive
ports, though, which is really silly – see &lt;a href="http://blog.eliasen.dk/2009/06/10/PromotingValuesFromDestinationSchemaOfMapOnReceivePort.aspx" target="_blank"&gt;here&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
SO, in order to get ALL the context copied form my input schema to the output schema,
I needed three lines of code:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; OutputMessage(*)
= InputMessage(*);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; OutputMessage(DemotionTest.Property1)
= InputMessage(DemotionTest.Property1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; OutputMessage(DemotionTest.Property2)
= InputMessage(DemotionTest.Property2);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
or I could mark the properties as MessageContextPropertyBase.
&lt;/p&gt;
&lt;p&gt;
Yes, indeed… So remember this from now on:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Assigning one message to another does NOT copy over the context&lt;/li&gt;
&lt;li&gt;
Copying over context using M2(*) = M1(*) does NOT copy over custom properties that
are marked as the default (MessageDataContextBase)&lt;/li&gt;
&lt;li&gt;
In order to get the rest of the properties copied over, do it manually or change the
type of the properties, if applicable.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I hope this helps someone…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c07b51e4-df46-4c84-979b-527b16a0616c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c07b51e4-df46-4c84-979b-527b16a0616c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f8676603-6680-4158-9e58-2ef45b6ae8e4</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f8676603-6680-4158-9e58-2ef45b6ae8e4.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f8676603-6680-4158-9e58-2ef45b6ae8e4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f8676603-6680-4158-9e58-2ef45b6ae8e4</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
When developing BizTalk 2009 solutions using Visual Studio .NET 2008 on Windows Server
2008, you run into issues when deploying from within Visual Studio .NET.
</p>
        <p>
Now, first of all, as long as there are <a href="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx" target="_blank">issues
with BizTalk 2009 on Visual Studio .NET 2008</a>, you should refrain from deploying
from within Visual Studio .NET.
</p>
        <p>
Secondly, when deploying on Windows Server 2008, you might run into this series of
errors:
</p>
        <p>
          <strong>First error:</strong>
        </p>
        <p>
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), followed
by 
</p>
        <p>
          <strong>Second error:</strong>
        </p>
        <p>
at Microsoft.BizTalk.Gac.Fusion.IAssemblyCache.InstallAssembly(AssemblyCacheInstallFlag
flags, String manifestFilePath, FusionInstallReference referenceData) 
<br />
   at Microsoft.BizTalk.Gac.Gac.InstallAssembly(String assemblyPathname,
Boolean force) 
<br />
   at Microsoft.BizTalk.Deployment.BizTalkAssembly.GacInstall(String assemblyLocation) 
<br />
   at Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String
server, String database, String assemblyPathname, String applicationName) 
<br />
   at Microsoft.BizTalk.Deployment.BizTalkAssembly.Deploy(Boolean redeploy,
String server, String database, String assemblyPathname, String group, String applicationName,
ApplicationLog log)
</p>
        <p>
          <strong>Third error:</strong>
        </p>
        <p>
Unspecified exception: " 
<br />
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" 
</p>
        <p>
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
</p>
        <p>
          <strong>Fourth error: </strong>
        </p>
        <p>
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
</p>
        <p>
          <strong>Fifth error:</strong>
        </p>
        <p>
Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager
failed to complete end type change request. Access is denied. (Exception from HRESULT:
0x80070005 (E_ACCESSDENIED))
</p>
        <p>
 
</p>
        <p>
Now, usually, I must confess that my developer machines are usually virtual PCs, where
I just login as the local administrator. If you do that, everything works fine. But
in Windows Server 2008, Microsoft have introduced a new security system, where you
need to approve it every time you start up some program that requires administrator
rights – even if you are a member of the local administrators group.
</p>
        <p>
So for instance, starting up BizTalk Server Administration console will cause this
to appear:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Acc.ExceptionfromHRESULT0x80070005E_ACCE_13F0E/user%20account%20control_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="user account control" border="0" alt="user account control" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Acc.ExceptionfromHRESULT0x80070005E_ACCE_13F0E/user%20account%20control_thumb.png" width="430" height="224" />
          </a>
        </p>
        <p>
And you have to click “Continue” to start it up.
</p>
        <p>
The error above is because suddenly, even if you are a member of the local administrators
group, you cannot add assemblies to the GAC.
</p>
        <p>
You have three choices to fix it:
</p>
        <ol>
          <li>
Login with your username, but run Visual Studio .NET as an administrator. This is
done by right clicking on the short cut for VS.NET and choosing “Run as administrator”.</li>
          <li>
Login as administrator</li>
          <li>
Turn off the “User Account Control”. This is done by entering “Control Panel” =&gt;
“User Accounts”. Click on “Turn User Account Control on or off” – and in here you
can turn it off. Now, when logged in as a user that i not the administrator, but who
is a member of the local administrators group, you get the rights you usually have.</li>
        </ol>
        <p>
 
</p>
        <p>
Hope this helps someone
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f8676603-6680-4158-9e58-2ef45b6ae8e4" />
      </body>
      <title>Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f8676603-6680-4158-9e58-2ef45b6ae8e4.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/15/AccessIsDeniedExceptionFromHRESULT0x80070005EACCESSDENIED.aspx</link>
      <pubDate>Thu, 15 Oct 2009 20:41:16 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
When developing BizTalk 2009 solutions using Visual Studio .NET 2008 on Windows Server
2008, you run into issues when deploying from within Visual Studio .NET.
&lt;/p&gt;
&lt;p&gt;
Now, first of all, as long as there are &lt;a href="http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx" target="_blank"&gt;issues
with BizTalk 2009 on Visual Studio .NET 2008&lt;/a&gt;, you should refrain from deploying
from within Visual Studio .NET.
&lt;/p&gt;
&lt;p&gt;
Secondly, when deploying on Windows Server 2008, you might run into this series of
errors:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;First error:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), followed
by 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Second error:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
at Microsoft.BizTalk.Gac.Fusion.IAssemblyCache.InstallAssembly(AssemblyCacheInstallFlag
flags, String manifestFilePath, FusionInstallReference referenceData) 
&lt;br /&gt;
&amp;#160;&amp;#160; at Microsoft.BizTalk.Gac.Gac.InstallAssembly(String assemblyPathname,
Boolean force) 
&lt;br /&gt;
&amp;#160;&amp;#160; at Microsoft.BizTalk.Deployment.BizTalkAssembly.GacInstall(String assemblyLocation) 
&lt;br /&gt;
&amp;#160;&amp;#160; at Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String
server, String database, String assemblyPathname, String applicationName) 
&lt;br /&gt;
&amp;#160;&amp;#160; at Microsoft.BizTalk.Deployment.BizTalkAssembly.Deploy(Boolean redeploy,
String server, String database, String assemblyPathname, String group, String applicationName,
ApplicationLog log)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Third error:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Unspecified exception: &amp;quot; 
&lt;br /&gt;
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))&amp;quot; 
&lt;/p&gt;
&lt;p&gt;
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Fourth error: &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Fifth error:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager
failed to complete end type change request. Access is denied. (Exception from HRESULT:
0x80070005 (E_ACCESSDENIED))
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Now, usually, I must confess that my developer machines are usually virtual PCs, where
I just login as the local administrator. If you do that, everything works fine. But
in Windows Server 2008, Microsoft have introduced a new security system, where you
need to approve it every time you start up some program that requires administrator
rights – even if you are a member of the local administrators group.
&lt;/p&gt;
&lt;p&gt;
So for instance, starting up BizTalk Server Administration console will cause this
to appear:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Acc.ExceptionfromHRESULT0x80070005E_ACCE_13F0E/user%20account%20control_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="user account control" border="0" alt="user account control" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Acc.ExceptionfromHRESULT0x80070005E_ACCE_13F0E/user%20account%20control_thumb.png" width="430" height="224" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
And you have to click “Continue” to start it up.
&lt;/p&gt;
&lt;p&gt;
The error above is because suddenly, even if you are a member of the local administrators
group, you cannot add assemblies to the GAC.
&lt;/p&gt;
&lt;p&gt;
You have three choices to fix it:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Login with your username, but run Visual Studio .NET as an administrator. This is
done by right clicking on the short cut for VS.NET and choosing “Run as administrator”.&lt;/li&gt;
&lt;li&gt;
Login as administrator&lt;/li&gt;
&lt;li&gt;
Turn off the “User Account Control”. This is done by entering “Control Panel” =&amp;gt;
“User Accounts”. Click on “Turn User Account Control on or off” – and in here you
can turn it off. Now, when logged in as a user that i not the administrator, but who
is a member of the local administrators group, you get the rights you usually have.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f8676603-6680-4158-9e58-2ef45b6ae8e4" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f8676603-6680-4158-9e58-2ef45b6ae8e4.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d2b77e7d-d933-4faf-9c96-182921444245</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d2b77e7d-d933-4faf-9c96-182921444245.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d2b77e7d-d933-4faf-9c96-182921444245.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d2b77e7d-d933-4faf-9c96-182921444245</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just to let all you Danes know, Alan Smith (MVP) will be delivering the famous Quicklearn
courses in BizTalk Deep Dive and BizTalk for Administrators in Copenhagen this fall.
</p>
        <p>
You can see more about the courses at 
</p>
        <p>
          <a href="http://www.informator.se/product.aspx?ArticleNr=T2601" target="_blank">BizTalk
2009 Developer Deep Dive</a> – November 16’th
</p>
        <p>
          <a href="http://www.informator.se/Product.aspx?ArticleNr=T2764" target="_blank">BizTalk
2009 for Administrators</a> – November 30’th
</p>
        <p>
Both courses are 5 days.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d2b77e7d-d933-4faf-9c96-182921444245" />
      </body>
      <title>BizTalk courses in Denmark</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d2b77e7d-d933-4faf-9c96-182921444245.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/13/BizTalkCoursesInDenmark.aspx</link>
      <pubDate>Tue, 13 Oct 2009 19:12:12 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just to let all you Danes know, Alan Smith (MVP) will be delivering the famous Quicklearn
courses in BizTalk Deep Dive and BizTalk for Administrators in Copenhagen this fall.
&lt;/p&gt;
&lt;p&gt;
You can see more about the courses at 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.informator.se/product.aspx?ArticleNr=T2601" target="_blank"&gt;BizTalk
2009 Developer Deep Dive&lt;/a&gt; – November 16’th
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.informator.se/Product.aspx?ArticleNr=T2764" target="_blank"&gt;BizTalk
2009 for Administrators&lt;/a&gt; – November 30’th
&lt;/p&gt;
&lt;p&gt;
Both courses are 5 days.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d2b77e7d-d933-4faf-9c96-182921444245" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d2b77e7d-d933-4faf-9c96-182921444245.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=6187b353-7486-4f14-b4ef-d0039b8370b3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,6187b353-7486-4f14-b4ef-d0039b8370b3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,6187b353-7486-4f14-b4ef-d0039b8370b3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=6187b353-7486-4f14-b4ef-d0039b8370b3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I just discovered a funny “feature” of the Bing Search on the Connect site:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Bingsearchfeature_12B83/BingSearch_2.jpg">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="BingSearch" border="0" alt="BingSearch" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Bingsearchfeature_12B83/BingSearch_thumb.jpg" width="1015" height="539" />
          </a>
        </p>
        <p>
 
</p>
        <p>
So it is showing me results 1-0 of 0… 
</p>
        <p>
Funny, eh? No? Maybe? Oh, nevermind… :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6187b353-7486-4f14-b4ef-d0039b8370b3" />
      </body>
      <title>Bing search “feature”</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,6187b353-7486-4f14-b4ef-d0039b8370b3.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/12/BingSearchFeature.aspx</link>
      <pubDate>Mon, 12 Oct 2009 19:17:58 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I just discovered a funny “feature” of the Bing Search on the Connect site:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Bingsearchfeature_12B83/BingSearch_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="BingSearch" border="0" alt="BingSearch" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Bingsearchfeature_12B83/BingSearch_thumb.jpg" width="1015" height="539" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
So it is showing me results 1-0 of 0… 
&lt;/p&gt;
&lt;p&gt;
Funny, eh? No? Maybe? Oh, nevermind… :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6187b353-7486-4f14-b4ef-d0039b8370b3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,6187b353-7486-4f14-b4ef-d0039b8370b3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a4afad51-f907-4b7c-b6fc-8e5518ef7593</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a4afad51-f907-4b7c-b6fc-8e5518ef7593.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a4afad51-f907-4b7c-b6fc-8e5518ef7593.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a4afad51-f907-4b7c-b6fc-8e5518ef7593</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, the other day I had this requirement for a BizTalk pipeline component:
</p>
        <p>
Take an InfoPath formula and convert it into a PDF that is to be sent out via email.
This seemed easy enough. I searched a bit, and found that three simple steps were
needed:
</p>
        <ol>
          <li>
Install this: <a title="2007 Microsoft Office Add-in: Microsoft Save as PDF" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f1fc413c-6d89-4f15-991b-63b07ba5f2e5&amp;displaylang=en" target="_blank">2007
Microsoft Office Add-in: Microsoft Save as PDF</a>  
</li>
          <li>
In my code, reference Microsoft.Office.InfoPath.dll and Microsoft.Office.InfoPath.FormControl.dll 
</li>
          <li>
Write these lines of code: 
</li>
        </ol>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 81px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> FormControl
formControl = <span style="color: #0000ff">new</span> FormControl();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> formControl.Open(pInMsg.Data);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">string</span> output
= Path.GetTempFileName();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> formControl.XmlForm.CurrentView.Export(output,
Microsoft.Office.InfoPath.ExportFormat.Pdf);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Of course, this would also mean some code that would read the pdf file back in and
then create the output message. But hey, that was just the price I had to pay.
</p>
        <p>
BUT… I was being naive… As the more clever of my readers have probably all ready realized,
if something is called FORMcontrol, then it is for programs that have a UI. The code
crashed big time at runtime with some ActiveX exception :-(
</p>
        <p>
Then I remembered that I have a colleague who had previously told me that she had
done this at some point, so I emailed her for her code.
</p>
        <p>
Unfortunately, her code involved taking the form, extracting the XSL from the XSN
file, perform a transformation on the XML using the XSL which will generate HTML and
then using some utility to convert this into PDF. This was more complex than I had
hoped, but I saw no other way. Unfortunately, her code had this line in it:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; height: 32px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span> StreamReader
stream = <span style="color: #0000ff">new</span> StreamReader(XmlFormView.XmlForm.Template.OpenFileFromPackage(<span style="color: #006080">"View1.xsl"</span>));</pre>
            <!--CRLF-->
          </div>
        </div>
which, as you might have guessed also requires a UI, in this case it is used in a
web application. So no go. 
<p>
So, it seems that I will have to do a lot of dirty work myself :-(
</p><p>
This turned into quite a list of subtasks:
</p><ul><li>
Take the XML document that comes through the pipeline component 
</li><li>
Take the value of the processing instruction called “mso-infoPathSolution” This processing
instruction is always present in an InfoPath form and it looks something like this: <pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"><span style="color: #0000ff">&lt;?</span>mso-infoPathSolution
solutionVersion="1.0.0.2" productVersion="12.0.0" PIVersion="1.0.0.0"
href="http://path.to/form.xsn" name="urn:schemas-microsoft-com:office:infopath:MyForm:-myXSD-2009-09-21T15-43-10" <span style="color: #0000ff">?&gt;</span></pre></pre></li><li>
Take the value of the href “attribute” that is in the value of the processing instruction.
The href is a URI that points to the XSN that this XML is an instance of, you see. 
</li><li>
Get the XSN file that is located at the URI.</li><li>
Extract the XSL file that matches the view of the form you want to convert into PDF.</li><li>
Perform the transformation</li><li>
Convert into PDF</li></ul><p>
 
</p><p>
So I am now going from the few lines of code I was hoping for to a more complex solution…
so lets look at the code:
</p><p>
First of all, I need the value of the processing instruction. This is easily done:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span><span style="color: #0000ff">string</span> GetHrefFromXml(XmlDocument
infoPathForm)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> XmlNode
piNode = infoPathForm.SelectSingleNode(<span style="color: #006080">"/processing-instruction(\"mso-infoPathSolution\")"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span><span style="color: #0000ff">if</span> (piNode
!= <span style="color: #0000ff">null</span> &amp;&amp; piNode <span style="color: #0000ff">is</span> XmlProcessingInstruction)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> var
pi = (XmlProcessingInstruction)piNode;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span><span style="color: #0000ff">string</span> href
= pi.Value;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span><span style="color: #0000ff">int</span> location
= href.IndexOf(Href);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span><span style="color: #0000ff">if</span> (location
!= -1)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> href
= href.Substring(location + Href.Length);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> href
= href.Substring(0, href.IndexOf(<span style="color: #006080">"\""</span>));</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span><span style="color: #0000ff">return</span> href;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span><span style="color: #0000ff">throw</span><span style="color: #0000ff">new</span> ApplicationException(<span style="color: #006080">"No
href attribute was found in the procesing instruction (mso-infoPathSolution). Without
this, the location of the form cannot be detected and without the form no PDF can
be generated."</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span><span style="color: #0000ff">throw</span><span style="color: #0000ff">new</span> ApplicationException(<span style="color: #006080">"Required
XML processing instruction (mso-infoPathSolution) not found. Without this, the location
of the form cannot be detected and without the form no PDF can be generated."</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span> }</pre><!--CRLF--></div></div><p>
The most annoying part is, that the value of a processing instruction can be anything.
In this case, it appears to be a list of attributes like “normal” XML, but since this
is not guaranteed, there is no language support for getting the value of the href
“attribute”. So I chose to use string manipulation to get the value.
</p><p>
After getting the href, I need to get the XSN file from SharePoint Server, where the
form is published. This turned out to be a challenge also.
</p><p>
My first approach was quite simple:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span><span style="color: #0000ff">byte</span>[]
GetFormByUrl(<span style="color: #0000ff">string</span> href)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> var
wc = <span style="color: #0000ff">new</span> WebClient</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> Credentials
= CredentialCache.DefaultCredentials</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> };</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span><span style="color: #0000ff">return</span> wc.DownloadData(href);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> }</pre><!--CRLF--></div></div><p>
This turned out to be something silly, though. What happens when SharePoint and Forms
Server get a request for the XSN file, it assumes some one is trying to fill out the
form. So what I got back was the HTML that the Forms Server was sending a user that
wanted to fill out the form. Then I thought I’d try to do this:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span><span style="color: #0000ff">byte</span>[]
GetFormByUrl(<span style="color: #0000ff">string</span> href)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> HttpWebRequest
wr = (HttpWebRequest)HttpWebRequest.Create(href);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> wr.AllowAutoRedirect
= <span style="color: #0000ff">false</span>;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> WebResponse
resp = wr.GetResponse();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> Stream
stream = resp.GetResponseStream();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span><span style="color: #0000ff">using</span> (MemoryStream
ms = <span style="color: #0000ff">new</span> MemoryStream())</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span><span style="color: #0000ff">byte</span>[]
buffer = <span style="color: #0000ff">new</span><span style="color: #0000ff">byte</span>[1024];</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span><span style="color: #0000ff">int</span> bytes
= 0;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span><span style="color: #0000ff">while</span> ((bytes
= stream.Read(buffer,0, buffer.Length)) != -1)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> ms.Write(buffer,0,bytes);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span><span style="color: #0000ff">return</span> ms.ToArray();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> }</pre><!--CRLF--></div></div><p>
Basically, using an HttpWebRequest I could ask it to not redirect. This didn’t work
either, since what I then got back was some HTML that basically just said that the
page has moved. Bummer.
</p><p>
But then another colleague who apparently is better at searching than I am found out
that I can add a noredirect parameter to my request that will instruct SharePoint
to not redirect. This is different from my current approach because my current approach
instructs .NET to not follow redirects, whereas this new approach instructs SharePoint
to not ask me to redirect.
</p><p>
So I ended up with something as simple as this:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span><span style="color: #0000ff">byte</span>[]
GetFormByUrl(<span style="color: #0000ff">string</span> href)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span><span style="color: #0000ff">string</span> url
= href + <span style="color: #006080">"?noredirect=true"</span>;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> var
wc = <span style="color: #0000ff">new</span> WebClient</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> Credentials
= CredentialCache.DefaultCredentials</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> };</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span><span style="color: #0000ff">return</span> wc.DownloadData(url);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> }</pre><!--CRLF--></div></div><p>
Simple and beautiful :-)
</p><p>
Now I have the XSN file and the next issue pops up, naturally; How do I get the XSL
extracted from the XSN file. The XSN file is just a cabinet file with another extension,
so I thought this must be easy. I found out it is not. I searched and searched and
ended up finding all sorts of weird stuff where people used p/invoke to do stuff and
what not. I am confused that Microsoft have not added at least extraction functionality
to the .NET framework, but they haven’t.
</p><p>
I ended up doing this:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span><span style="color: #0000ff">string</span> ExtractCabFile(<span style="color: #0000ff">string</span> cabFile)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span><span style="color: #0000ff">string</span> destDir
= CreateTmp(<span style="color: #0000ff">true</span>, <span style="color: #006080">""</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> var
sh = <span style="color: #0000ff">new</span> Shell();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> Folder
fldr = sh.NameSpace(destDir);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span><span style="color: #0000ff">foreach</span> (FolderItem
f <span style="color: #0000ff">in</span> sh.NameSpace(cabFile).Items())</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> fldr.CopyHere(f,
0);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span><span style="color: #0000ff">return</span> destDir;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> }</pre><!--CRLF--></div></div><p>
This code assumes that the XSN file has been written to a temporary file with the
extension .CAB – this is very important, since the shell command will open up the
.CAB file with the default program, which is then the explorer. After that, all files
in the cabinet file is copied to “destDir” which is just a directory created in the
users Temp directory.
</p><p>
I am quite annoyed to have to go through all this, but that’s how things go sometimes.
</p><p>
So now I have found the href of the form, downloaded the form and extracted its files.
Time for the transformation:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span> MemoryStream
PerformTransformation(XmlDocument xmldoc, <span style="color: #0000ff">string</span> destDir, <span style="color: #0000ff">string</span> view)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> var
transform = <span style="color: #0000ff">new</span> XslCompiledTransform();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> var
stream = <span style="color: #0000ff">new</span> StreamReader(destDir + <span style="color: #006080">@"\"
+ view + "</span>.xsl");</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> XmlReader
xmlReader = XmlReader.Create(stream);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> transform.Load(xmlReader);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> var
outputMemStream = <span style="color: #0000ff">new</span> MemoryStream();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> transform.Transform(xmldoc, <span style="color: #0000ff">null</span>,
outputMemStream);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> stream.Close();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> xmlReader.Close();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> outputMemStream.Seek(0,
SeekOrigin.Begin);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span><span style="color: #0000ff">return</span> outputMemStream;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> }</pre><!--CRLF--></div></div><p>
So just a normal XSLT transformation, resulting in some HTML that is returned in a
stream.
</p><p>
After this, I need to convert it into PDF, which is really simple using a tool we
bought for this:
</p><div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"><div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span><span style="color: #0000ff">private</span><span style="color: #0000ff">static</span><span style="color: #0000ff">byte</span>[]
GetPdfFromHtml(Parameters param)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> var
pdfConverter = <span style="color: #0000ff">new</span> PdfConverter</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> LicenseKey
= <span style="color: #006080">"SomethingElse - You are not getting the correct
License Key :-)"</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> };</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span><span style="color: #0000ff">byte</span>[]
pdfBytes = pdfConverter.GetPdfBytesFromHtmlStream(param.HtmlStream, Encoding.UTF8,
param.DestDir.EndsWith(<span style="color: #006080">@"\") ? param.DestDir
: param.DestDir + @"</span>\");</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span><span style="color: #0000ff">return</span> pdfBytes;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> }</pre><!--CRLF--></div></div><p>
We are using the <a href="http://www.html-to-pdf.net/" target="_blank">ExpertPDF</a> library
for this. The third parameter for the GetPdfBytesFromHtmlStream method call is the
directory where the cabinet file was extracted to, since this is where all images
used in the form are also kept and they are needed for the PDF to include them.
</p><p>
All in all; the component now works, but it turned out to be a lot more difficult
than I had hoped.
</p><p>
As a last detail, I added a property to my pipeline component that the developer can
use to decide which view to use for the transformation form XML to HTML.
</p><p>
The complete code for the pipeline component will not be available for download, since
this was done for a customer, but I might do something a bit smaller and simpler and
add it to my <a href="http://eebiztalkpipelinecom.codeplex.com/" target="_blank">pipeline
component collection</a> later on.
</p><p>
-- 
</p><p>
eliasen
</p><img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a4afad51-f907-4b7c-b6fc-8e5518ef7593" /></body>
      <title>Converting InfoPath to PDF in BizTalk</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a4afad51-f907-4b7c-b6fc-8e5518ef7593.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/10/ConvertingInfoPathToPDFInBizTalk.aspx</link>
      <pubDate>Sat, 10 Oct 2009 14:32:03 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, the other day I had this requirement for a BizTalk pipeline component:
&lt;/p&gt;
&lt;p&gt;
Take an InfoPath formula and convert it into a PDF that is to be sent out via email.
This seemed easy enough. I searched a bit, and found that three simple steps were
needed:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Install this: &lt;a title="2007 Microsoft Office Add-in: Microsoft Save as PDF" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f1fc413c-6d89-4f15-991b-63b07ba5f2e5&amp;amp;displaylang=en" target="_blank"&gt;2007
Microsoft Office Add-in: Microsoft Save as PDF&lt;/a&gt;&amp;#160; 
&lt;/li&gt;
&lt;li&gt;
In my code, reference Microsoft.Office.InfoPath.dll and Microsoft.Office.InfoPath.FormControl.dll 
&lt;/li&gt;
&lt;li&gt;
Write these lines of code: 
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 81px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; FormControl
formControl = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; FormControl();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; formControl.Open(pInMsg.Data);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; output
= Path.GetTempFileName();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; formControl.XmlForm.CurrentView.Export(output,
Microsoft.Office.InfoPath.ExportFormat.Pdf);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Of course, this would also mean some code that would read the pdf file back in and
then create the output message. But hey, that was just the price I had to pay.
&lt;/p&gt;
&lt;p&gt;
BUT… I was being naive… As the more clever of my readers have probably all ready realized,
if something is called FORMcontrol, then it is for programs that have a UI. The code
crashed big time at runtime with some ActiveX exception :-(
&lt;/p&gt;
&lt;p&gt;
Then I remembered that I have a colleague who had previously told me that she had
done this at some point, so I emailed her for her code.
&lt;/p&gt;
&lt;p&gt;
Unfortunately, her code involved taking the form, extracting the XSL from the XSN
file, perform a transformation on the XML using the XSL which will generate HTML and
then using some utility to convert this into PDF. This was more complex than I had
hoped, but I saw no other way. Unfortunately, her code had this line in it:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 32px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; StreamReader
stream = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StreamReader(XmlFormView.XmlForm.Template.OpenFileFromPackage(&lt;span style="color: #006080"&gt;&amp;quot;View1.xsl&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
which, as you might have guessed also requires a UI, in this case it is used in a
web application. So no go. 
&lt;p&gt;
So, it seems that I will have to do a lot of dirty work myself :-(
&lt;/p&gt;
&lt;p&gt;
This turned into quite a list of subtasks:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Take the XML document that comes through the pipeline component 
&lt;/li&gt;
&lt;li&gt;
Take the value of the processing instruction called “mso-infoPathSolution” This processing
instruction is always present in an InfoPath form and it looks something like this: &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;mso-infoPathSolution
solutionVersion=&amp;quot;1.0.0.2&amp;quot; productVersion=&amp;quot;12.0.0&amp;quot; PIVersion=&amp;quot;1.0.0.0&amp;quot;
href=&amp;quot;http://path.to/form.xsn&amp;quot; name=&amp;quot;urn:schemas-microsoft-com:office:infopath:MyForm:-myXSD-2009-09-21T15-43-10&amp;quot; &lt;span style="color: #0000ff"&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Take the value of the href “attribute” that is in the value of the processing instruction.
The href is a URI that points to the XSN that this XML is an instance of, you see. 
&lt;/li&gt;
&lt;li&gt;
Get the XSN file that is located at the URI.&lt;/li&gt;
&lt;li&gt;
Extract the XSL file that matches the view of the form you want to convert into PDF.&lt;/li&gt;
&lt;li&gt;
Perform the transformation&lt;/li&gt;
&lt;li&gt;
Convert into PDF&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
So I am now going from the few lines of code I was hoping for to a more complex solution…
so lets look at the code:
&lt;/p&gt;
&lt;p&gt;
First of all, I need the value of the processing instruction. This is easily done:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetHrefFromXml(XmlDocument
infoPathForm)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; XmlNode
piNode = infoPathForm.SelectSingleNode(&lt;span style="color: #006080"&gt;&amp;quot;/processing-instruction(\&amp;quot;mso-infoPathSolution\&amp;quot;)&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (piNode
!= &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; piNode &lt;span style="color: #0000ff"&gt;is&lt;/span&gt; XmlProcessingInstruction)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; var
pi = (XmlProcessingInstruction)piNode;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; href
= pi.Value;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; location
= href.IndexOf(Href);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (location
!= -1)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; href
= href.Substring(location + Href.Length);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; href
= href.Substring(0, href.IndexOf(&lt;span style="color: #006080"&gt;&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; href;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ApplicationException(&lt;span style="color: #006080"&gt;&amp;quot;No
href attribute was found in the procesing instruction (mso-infoPathSolution). Without
this, the location of the form cannot be detected and without the form no PDF can
be generated.&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ApplicationException(&lt;span style="color: #006080"&gt;&amp;quot;Required
XML processing instruction (mso-infoPathSolution) not found. Without this, the location
of the form cannot be detected and without the form no PDF can be generated.&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The most annoying part is, that the value of a processing instruction can be anything.
In this case, it appears to be a list of attributes like “normal” XML, but since this
is not guaranteed, there is no language support for getting the value of the href
“attribute”. So I chose to use string manipulation to get the value.
&lt;/p&gt;
&lt;p&gt;
After getting the href, I need to get the XSN file from SharePoint Server, where the
form is published. This turned out to be a challenge also.
&lt;/p&gt;
&lt;p&gt;
My first approach was quite simple:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]
GetFormByUrl(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; href)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; var
wc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; WebClient&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; Credentials
= CredentialCache.DefaultCredentials&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; wc.DownloadData(href);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
This turned out to be something silly, though. What happens when SharePoint and Forms
Server get a request for the XSN file, it assumes some one is trying to fill out the
form. So what I got back was the HTML that the Forms Server was sending a user that
wanted to fill out the form. Then I thought I’d try to do this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]
GetFormByUrl(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; href)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; HttpWebRequest
wr = (HttpWebRequest)HttpWebRequest.Create(href);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; wr.AllowAutoRedirect
= &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; WebResponse
resp = wr.GetResponse();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; Stream
stream = resp.GetResponseStream();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (MemoryStream
ms = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MemoryStream())&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]
buffer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[1024];&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; bytes
= 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;while&lt;/span&gt; ((bytes
= stream.Read(buffer,0, buffer.Length)) != -1)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; ms.Write(buffer,0,bytes);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; ms.ToArray();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Basically, using an HttpWebRequest I could ask it to not redirect. This didn’t work
either, since what I then got back was some HTML that basically just said that the
page has moved. Bummer.
&lt;/p&gt;
&lt;p&gt;
But then another colleague who apparently is better at searching than I am found out
that I can add a noredirect parameter to my request that will instruct SharePoint
to not redirect. This is different from my current approach because my current approach
instructs .NET to not follow redirects, whereas this new approach instructs SharePoint
to not ask me to redirect.
&lt;/p&gt;
&lt;p&gt;
So I ended up with something as simple as this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]
GetFormByUrl(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; href)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; url
= href + &lt;span style="color: #006080"&gt;&amp;quot;?noredirect=true&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; var
wc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; WebClient&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; Credentials
= CredentialCache.DefaultCredentials&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; wc.DownloadData(url);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Simple and beautiful :-)
&lt;/p&gt;
&lt;p&gt;
Now I have the XSN file and the next issue pops up, naturally; How do I get the XSL
extracted from the XSN file. The XSN file is just a cabinet file with another extension,
so I thought this must be easy. I found out it is not. I searched and searched and
ended up finding all sorts of weird stuff where people used p/invoke to do stuff and
what not. I am confused that Microsoft have not added at least extraction functionality
to the .NET framework, but they haven’t.
&lt;/p&gt;
&lt;p&gt;
I ended up doing this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; ExtractCabFile(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; cabFile)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; destDir
= CreateTmp(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; var
sh = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Shell();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; Folder
fldr = sh.NameSpace(destDir);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (FolderItem
f &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; sh.NameSpace(cabFile).Items())&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; fldr.CopyHere(f,
0);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; destDir;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
This code assumes that the XSN file has been written to a temporary file with the
extension .CAB – this is very important, since the shell command will open up the
.CAB file with the default program, which is then the explorer. After that, all files
in the cabinet file is copied to “destDir” which is just a directory created in the
users Temp directory.
&lt;/p&gt;
&lt;p&gt;
I am quite annoyed to have to go through all this, but that’s how things go sometimes.
&lt;/p&gt;
&lt;p&gt;
So now I have found the href of the form, downloaded the form and extracted its files.
Time for the transformation:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; MemoryStream
PerformTransformation(XmlDocument xmldoc, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; destDir, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; view)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; var
transform = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XslCompiledTransform();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; var
stream = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StreamReader(destDir + &lt;span style="color: #006080"&gt;@&amp;quot;\&amp;quot;
+ view + &amp;quot;&lt;/span&gt;.xsl&amp;quot;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; XmlReader
xmlReader = XmlReader.Create(stream);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; transform.Load(xmlReader);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; var
outputMemStream = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MemoryStream();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; transform.Transform(xmldoc, &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,
outputMemStream);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; stream.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; xmlReader.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; outputMemStream.Seek(0,
SeekOrigin.Begin);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; outputMemStream;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
So just a normal XSLT transformation, resulting in some HTML that is returned in a
stream.
&lt;/p&gt;
&lt;p&gt;
After this, I need to convert it into PDF, which is really simple using a tool we
bought for this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]
GetPdfFromHtml(Parameters param)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; var
pdfConverter = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PdfConverter&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; LicenseKey
= &lt;span style="color: #006080"&gt;&amp;quot;SomethingElse - You are not getting the correct
License Key :-)&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]
pdfBytes = pdfConverter.GetPdfBytesFromHtmlStream(param.HtmlStream, Encoding.UTF8,
param.DestDir.EndsWith(&lt;span style="color: #006080"&gt;@&amp;quot;\&amp;quot;) ? param.DestDir
: param.DestDir + @&amp;quot;&lt;/span&gt;\&amp;quot;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; pdfBytes;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
We are using the &lt;a href="http://www.html-to-pdf.net/" target="_blank"&gt;ExpertPDF&lt;/a&gt; library
for this. The third parameter for the GetPdfBytesFromHtmlStream method call is the
directory where the cabinet file was extracted to, since this is where all images
used in the form are also kept and they are needed for the PDF to include them.
&lt;/p&gt;
&lt;p&gt;
All in all; the component now works, but it turned out to be a lot more difficult
than I had hoped.
&lt;/p&gt;
&lt;p&gt;
As a last detail, I added a property to my pipeline component that the developer can
use to decide which view to use for the transformation form XML to HTML.
&lt;/p&gt;
&lt;p&gt;
The complete code for the pipeline component will not be available for download, since
this was done for a customer, but I might do something a bit smaller and simpler and
add it to my &lt;a href="http://eebiztalkpipelinecom.codeplex.com/" target="_blank"&gt;pipeline
component collection&lt;/a&gt; later on.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;/p&gt;
&lt;p&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a4afad51-f907-4b7c-b6fc-8e5518ef7593" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a4afad51-f907-4b7c-b6fc-8e5518ef7593.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=32224898-84e4-4a6f-9614-23ca336a28dc</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,32224898-84e4-4a6f-9614-23ca336a28dc.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,32224898-84e4-4a6f-9614-23ca336a28dc.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=32224898-84e4-4a6f-9614-23ca336a28dc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
It has arrived – the first service pack for BizTalk 2006 R2.
</p>
        <p>
Get it here: <a title="https://connect.microsoft.com/site/sitehome.aspx?SiteID=65" href="https://connect.microsoft.com/site/sitehome.aspx?SiteID=65">https://connect.microsoft.com/site/sitehome.aspx?SiteID=65</a></p>
        <p>
For a list of fixes, see here: <a title="http://support.microsoft.com/kb/974563" href="http://support.microsoft.com/kb/974563">http://support.microsoft.com/kb/974563</a></p>
        <p>
New features, see here: <a title="http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx" href="http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx">http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx</a></p>
        <p>
Good luck with it.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=32224898-84e4-4a6f-9614-23ca336a28dc" />
      </body>
      <title>BizTalk Server 2006 R2 SP1 is released</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,32224898-84e4-4a6f-9614-23ca336a28dc.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/09/BizTalkServer2006R2SP1IsReleased.aspx</link>
      <pubDate>Fri, 09 Oct 2009 18:22:28 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
It has arrived – the first service pack for BizTalk 2006 R2.
&lt;/p&gt;
&lt;p&gt;
Get it here: &lt;a title="https://connect.microsoft.com/site/sitehome.aspx?SiteID=65" href="https://connect.microsoft.com/site/sitehome.aspx?SiteID=65"&gt;https://connect.microsoft.com/site/sitehome.aspx?SiteID=65&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
For a list of fixes, see here: &lt;a title="http://support.microsoft.com/kb/974563" href="http://support.microsoft.com/kb/974563"&gt;http://support.microsoft.com/kb/974563&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
New features, see here: &lt;a title="http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx" href="http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Good luck with it.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=32224898-84e4-4a6f-9614-23ca336a28dc" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,32224898-84e4-4a6f-9614-23ca336a28dc.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=9c9ebd97-022e-4c86-9d48-89abe344a4d7</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,9c9ebd97-022e-4c86-9d48-89abe344a4d7.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,9c9ebd97-022e-4c86-9d48-89abe344a4d7.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=9c9ebd97-022e-4c86-9d48-89abe344a4d7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Jon Skeet, who has been a C# MVP since 2003, as I understand it was to have his MVP
renewed on October 1’st 2009, but his employer Google advised him not to be renewed,
so he had to tell Microsoft to not consider him for renewal. You can see Jons blog
entry <a href="http://msmvps.com/blogs/jon_skeet/archive/2009/10/01/mvp-no-more.aspx" target="_blank">here</a>.
</p>
        <p>
To be honest, I think it is very petty way Google is thinking.
</p>
        <p>
So to Jon: Great work, keep it up, and hopefully either Google will come around or
you will find a better job and get your MVP status back.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9c9ebd97-022e-4c86-9d48-89abe344a4d7" />
      </body>
      <title>Jon Skeet is no longer a Microsoft MVP</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,9c9ebd97-022e-4c86-9d48-89abe344a4d7.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/03/JonSkeetIsNoLongerAMicrosoftMVP.aspx</link>
      <pubDate>Sat, 03 Oct 2009 12:40:03 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Jon Skeet, who has been a C# MVP since 2003, as I understand it was to have his MVP
renewed on October 1’st 2009, but his employer Google advised him not to be renewed,
so he had to tell Microsoft to not consider him for renewal. You can see Jons blog
entry &lt;a href="http://msmvps.com/blogs/jon_skeet/archive/2009/10/01/mvp-no-more.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
To be honest, I think it is very petty way Google is thinking.
&lt;/p&gt;
&lt;p&gt;
So to Jon: Great work, keep it up, and hopefully either Google will come around or
you will find a better job and get your MVP status back.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9c9ebd97-022e-4c86-9d48-89abe344a4d7" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,9c9ebd97-022e-4c86-9d48-89abe344a4d7.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=4a4a46e8-41c2-443b-acfc-0df8ced313a2</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,4a4a46e8-41c2-443b-acfc-0df8ced313a2.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,4a4a46e8-41c2-443b-acfc-0df8ced313a2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=4a4a46e8-41c2-443b-acfc-0df8ced313a2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Now, I am aware that people following my blog are probably very likely to follow <a href="http://seroter.wordpress.com/" target="_blank">Richard
Seroters blog</a> as well, but just in case you haven’t noticed, Richard tortured
me with his 4 questions this time :-)
</p>
        <p>
You can find his questions and my answers <a href="http://seroter.wordpress.com/2009/10/01/interview-series-four-questions-with-jan-eliasen/" target="_blank">here</a>.
</p>
        <p>
Now, being interviewed by Richard and thus having a link to my blog appear on his
blog entry is bound to generate some traffic to my blog from people who either didn’t
know me or didn’t visit my blog… So naturally, the first about 12 hour after Richard
posted his interview, my blog was down because the webhosting company that hosts eliasen.dk
had changed something… or something else, who knows? :-) 
</p>
        <p>
As you can see, though, my blog is again up and running and will hopefully stay this
way! :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=4a4a46e8-41c2-443b-acfc-0df8ced313a2" />
      </body>
      <title>I’ve been interviewed</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,4a4a46e8-41c2-443b-acfc-0df8ced313a2.aspx</guid>
      <link>http://blog.eliasen.dk/2009/10/03/IveBeenInterviewed.aspx</link>
      <pubDate>Sat, 03 Oct 2009 12:22:35 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Now, I am aware that people following my blog are probably very likely to follow &lt;a href="http://seroter.wordpress.com/" target="_blank"&gt;Richard
Seroters blog&lt;/a&gt; as well, but just in case you haven’t noticed, Richard tortured
me with his 4 questions this time :-)
&lt;/p&gt;
&lt;p&gt;
You can find his questions and my answers &lt;a href="http://seroter.wordpress.com/2009/10/01/interview-series-four-questions-with-jan-eliasen/" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Now, being interviewed by Richard and thus having a link to my blog appear on his
blog entry is bound to generate some traffic to my blog from people who either didn’t
know me or didn’t visit my blog… So naturally, the first about 12 hour after Richard
posted his interview, my blog was down because the webhosting company that hosts eliasen.dk
had changed something… or something else, who knows? :-) 
&lt;/p&gt;
&lt;p&gt;
As you can see, though, my blog is again up and running and will hopefully stay this
way! :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=4a4a46e8-41c2-443b-acfc-0df8ced313a2" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,4a4a46e8-41c2-443b-acfc-0df8ced313a2.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f91e9b1d-3648-4fb4-a457-a97ff3a71719</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f91e9b1d-3648-4fb4-a457-a97ff3a71719.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f91e9b1d-3648-4fb4-a457-a97ff3a71719.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f91e9b1d-3648-4fb4-a457-a97ff3a71719</wfw:commentRss>
      <slash:comments>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all 
</p>
        <p>
I am REALLY excited to announce, that I will be co-authoring a book on BizTalk. I
will be a part of a terrific team consisting of 
</p>
        <ul>
          <li>
Anush Kumar 
</li>
          <li>
Brian Loesgen 
</li>
          <li>
Charles Young 
</li>
          <li>
Jon Flanders 
</li>
          <li>
Scot Colestock 
</li>
          <li>
Tom Canter 
</li>
          <li>
Me :-) 
</li>
        </ul>
        <p>
Together we will be writing “BizTalk Server 2009 Unleashed”, which is so new, that
you cannot find it on the web page of the publisher or any other sites. It is so new,
that we haven’t even signed our contracts with the publisher yet, which may cause
someone to quit the project if they are not happy about the contract… so nothing promised
yet.
</p>
        <p>
But, needless to say, I am really excited, and giving the team, also feeling quite
humble :-).
</p>
        <p>
This will be my first book.
</p>
        <p>
Wohooo
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f91e9b1d-3648-4fb4-a457-a97ff3a71719" />
      </body>
      <title>BizTalk Server 2009 Unleashed</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f91e9b1d-3648-4fb4-a457-a97ff3a71719.aspx</guid>
      <link>http://blog.eliasen.dk/2009/09/18/BizTalkServer2009Unleashed.aspx</link>
      <pubDate>Fri, 18 Sep 2009 20:06:38 GMT</pubDate>
      <description>&lt;p&gt;
Hi all 
&lt;/p&gt;
&lt;p&gt;
I am REALLY excited to announce, that I will be co-authoring a book on BizTalk. I
will be a part of a terrific team consisting of 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Anush Kumar 
&lt;/li&gt;
&lt;li&gt;
Brian Loesgen 
&lt;/li&gt;
&lt;li&gt;
Charles Young 
&lt;/li&gt;
&lt;li&gt;
Jon Flanders 
&lt;/li&gt;
&lt;li&gt;
Scot Colestock 
&lt;/li&gt;
&lt;li&gt;
Tom Canter 
&lt;/li&gt;
&lt;li&gt;
Me :-) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Together we will be writing “BizTalk Server 2009 Unleashed”, which is so new, that
you cannot find it on the web page of the publisher or any other sites. It is so new,
that we haven’t even signed our contracts with the publisher yet, which may cause
someone to quit the project if they are not happy about the contract… so nothing promised
yet.
&lt;/p&gt;
&lt;p&gt;
But, needless to say, I am really excited, and giving the team, also feeling quite
humble :-).
&lt;/p&gt;
&lt;p&gt;
This will be my first book.
&lt;/p&gt;
&lt;p&gt;
Wohooo
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f91e9b1d-3648-4fb4-a457-a97ff3a71719" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f91e9b1d-3648-4fb4-a457-a97ff3a71719.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f26c9a3a-3782-40ea-8716-7760f356bda3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f26c9a3a-3782-40ea-8716-7760f356bda3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f26c9a3a-3782-40ea-8716-7760f356bda3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f26c9a3a-3782-40ea-8716-7760f356bda3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, sorry to see it, but it appears it has been almost two months since my last blog
post – hope to get back on track soon.
</p>
        <p>
Since the last time, I have installed Windows 7 RTM on my laptop, and one of the reasons
I haven’t blogged is, that I couldn’t get <a href="http://wlwbackup.codeplex.com/" target="_blank">Windows
Live Writer Backup</a> to restore my backup of Windows Live Writer from my old Windows
XP installation. That turned out to be a silly thing… For others; You cannot restore
using WLW Backup without having run Windows Live Writer first. It isn’t enough to
install it, it must have been run also. Oh well.
</p>
        <p>
 
</p>
        <p>
I hope to entertain you all some more from now on…
</p>
        <p>
 
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f26c9a3a-3782-40ea-8716-7760f356bda3" />
      </body>
      <title>It’s been a while</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f26c9a3a-3782-40ea-8716-7760f356bda3.aspx</guid>
      <link>http://blog.eliasen.dk/2009/09/18/ItsBeenAWhile.aspx</link>
      <pubDate>Fri, 18 Sep 2009 19:55:49 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, sorry to see it, but it appears it has been almost two months since my last blog
post – hope to get back on track soon.
&lt;/p&gt;
&lt;p&gt;
Since the last time, I have installed Windows 7 RTM on my laptop, and one of the reasons
I haven’t blogged is, that I couldn’t get &lt;a href="http://wlwbackup.codeplex.com/" target="_blank"&gt;Windows
Live Writer Backup&lt;/a&gt; to restore my backup of Windows Live Writer from my old Windows
XP installation. That turned out to be a silly thing… For others; You cannot restore
using WLW Backup without having run Windows Live Writer first. It isn’t enough to
install it, it must have been run also. Oh well.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
I hope to entertain you all some more from now on…
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f26c9a3a-3782-40ea-8716-7760f356bda3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f26c9a3a-3782-40ea-8716-7760f356bda3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=95e4c998-17fe-4478-9cc5-f9e7dc76d2b3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,95e4c998-17fe-4478-9cc5-f9e7dc76d2b3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,95e4c998-17fe-4478-9cc5-f9e7dc76d2b3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=95e4c998-17fe-4478-9cc5-f9e7dc76d2b3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Some weeks ago, I had a customer that had an Order XML and needed to fetch all the
names of the ordered items based on the item number that was in the XML.
</p>
        <p>
He contacted me because the solution he had thought of didn’t work. What he did was
that he mapped the Order XML to a SQL Adapter schema that called an SP in SQL Server
to get the item name based on the item number. The issue he ran into was, that the
SP got called multiple times – once for each item, and the SQL adapter didn’t seem
to batch all the results into one result for his orchestration.
</p>
        <p>
So, given this simplified Order:
</p>
        <p>
&lt;ns0:Order xmlns:ns0="<a href="http://MultipleCallsToSP.Order&quot;">http://MultipleCallsToSP.Order"</a>&gt; 
<br />
  &lt;Header&gt; 
<br />
    &lt;CustomerName&gt;CustomerName_0&lt;/CustomerName&gt; 
<br />
    &lt;OrderNumber&gt;OrderNumber_0&lt;/OrderNumber&gt; 
<br />
  &lt;/Header&gt; 
<br />
  &lt;OrderLines&gt; 
<br />
    &lt;OrderLine&gt; 
<br />
      &lt;ItemNumber&gt;21&lt;/ItemNumber&gt; 
<br />
      &lt;Quantity&gt;42&lt;/Quantity&gt; 
<br />
    &lt;/OrderLine&gt; 
<br />
    &lt;OrderLine&gt; 
<br />
      &lt;ItemNumber&gt;42&lt;/ItemNumber&gt; 
<br />
      &lt;Quantity&gt;21&lt;/Quantity&gt; 
<br />
    &lt;/OrderLine&gt; 
<br />
  &lt;/OrderLines&gt; 
<br />
&lt;/ns0:Order&gt;
</p>
        <p>
He mapped it to this XML:
</p>
        <p>
&lt;ns0:GetItemNameRequest xmlns:ns0="<a href="http://eliasen.dk&quot;">http://eliasen.dk"</a>&gt; 
<br />
  &lt;ns0:GetItemName ItemID="21" /&gt; 
<br />
  &lt;ns0:GetItemName ItemID="42" /&gt;  
<br />
&lt;/ns0:GetItemNameRequest&gt;
</p>
        <p>
This was then sent to SQL Server using the SQL Adapter to call a SP named “GetItemName”
which just takes an ItemID (int) as parameter and returns the ItemName hat matches
the ItemID.
</p>
        <p>
Now, the schema that is generated for the SQL Server request actually doesn’t allow
for multiple GetItemName elements to be created, but that is changeable :-) If you
set it to have maxOcurs = unbounded, then it can occur multiple times, and what happens
is that the SP is called multiple times. Unfortunately, only one of the ItemNames
is returned – the rest is ignored.
</p>
        <p>
So the customer came to me because naturally, he needed all the ItemNames and not
just one of them. I have suggested 5 possible solutions, which I will describe here.
</p>
        <p>
          <strong>First option 
<br /></strong>Use the pattern described at <a title="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx">http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx</a> to
loop around the order lines and build the resulting XML one order line at a time.
</p>
        <p>
          <strong>Second option 
<br /></strong>Use enveloping in the receive location in order to get one orchestration
started for each order line.
</p>
        <p>
          <strong>Third option</strong>
          <br />
Use the Database Lookup functoid to retrieve the ItemName based on the ItemID
</p>
        <p>
          <strong>Fourth option</strong>
          <br />
Generate a comma separated list of ItemID’s in the map, and let the stored procedure
use that list to return the relevant ItemNames. This has some consequences for the
stored procedure. Before it looked like this:
</p>
        <p>
SELECT ItemNumber, ItemName 
<br />
FROM Items 
<br />
WHERE Items.ItemNumber = @ItemID 
<br />
FOR XML AUTO, ELEMENTS
</p>
        <p>
Now, it looks like this:
</p>
        <p>
SELECT ItemNumber, ItemName 
<br />
FROM Items 
<br />
WHERE EXISTS (select * from dbo.Split(‘,’,@items) where [Items].ItemNumber = ID) 
<br />
FOR XML AUTO, ELEMENTS
</p>
        <p>
@items is the parameter for the SP, which is just an nvarchar that is to contain the
comma separated list.
</p>
        <p>
For this to work you need the Split function, which looks like this:
</p>
        <p>
CREATE FUNCTION [dbo].[Split] (@sep char(1), @s varchar(512)) 
<br />
RETURNS table 
<br />
AS 
<br />
RETURN 
<br />
(     
<br />
               
WITH Pieces(pn, start, stop) AS ( 
<br />
                     
SELECT 1, 1, CHARINDEX(@sep, @s) 
<br />
                     
UNION ALL       
<br />
                     
SELECT pn + 1, stop + 1, CHARINDEX(@sep, @s, stop + 1)       
<br />
                     
FROM Pieces       
<br />
                     
WHERE stop &gt; 0     
<br />
                
) 
<br />
                
SELECT pn, CONVERT(int, SUBSTRING(@s, start, CASE WHEN stop &gt; 0 THEN stop-start
ELSE 512 END)) AS ID 
<br />
FROM Pieces 
<br />
)
</p>
        <p>
In order to generate the comma separated list in your map, I have written two blog
posts about this issue, which you can find at <a title="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx" href="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx">http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx</a> and <a title="http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx" href="http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx">http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx</a></p>
        <p>
          <strong>Fifth option 
<br /></strong>The fifth and last option i want to mention is, that with the new SQL Server
LOB adapter from Adapter Pack 2.0, it appears that you can do it like the customer
wanted to do it in the first place with sending one XML to SQL Server and getting
an accumulated response back from SQL Server based on several calls to a stored procedure.
I haven’t had time to test this, but look out for another blog post about this :-)
</p>
        <p>
 
</p>
        <p>
Hope this helps someone.
</p>
        <p>
 
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=95e4c998-17fe-4478-9cc5-f9e7dc76d2b3" />
      </body>
      <title>Retrieving multiple item names based on lots of item numbers</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,95e4c998-17fe-4478-9cc5-f9e7dc76d2b3.aspx</guid>
      <link>http://blog.eliasen.dk/2009/09/18/RetrievingMultipleItemNamesBasedOnLotsOfItemNumbers.aspx</link>
      <pubDate>Fri, 18 Sep 2009 19:47:51 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Some weeks ago, I had a customer that had an Order XML and needed to fetch all the
names of the ordered items based on the item number that was in the XML.
&lt;/p&gt;
&lt;p&gt;
He contacted me because the solution he had thought of didn’t work. What he did was
that he mapped the Order XML to a SQL Adapter schema that called an SP in SQL Server
to get the item name based on the item number. The issue he ran into was, that the
SP got called multiple times – once for each item, and the SQL adapter didn’t seem
to batch all the results into one result for his orchestration.
&lt;/p&gt;
&lt;p&gt;
So, given this simplified Order:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:Order xmlns:ns0=&amp;quot;&lt;a href="http://MultipleCallsToSP.Order&amp;quot;"&gt;http://MultipleCallsToSP.Order&amp;quot;&lt;/a&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;Header&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;CustomerName&amp;gt;CustomerName_0&amp;lt;/CustomerName&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;OrderNumber&amp;gt;OrderNumber_0&amp;lt;/OrderNumber&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/Header&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;OrderLines&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;OrderLine&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ItemNumber&amp;gt;21&amp;lt;/ItemNumber&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Quantity&amp;gt;42&amp;lt;/Quantity&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/OrderLine&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;OrderLine&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ItemNumber&amp;gt;42&amp;lt;/ItemNumber&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Quantity&amp;gt;21&amp;lt;/Quantity&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/OrderLine&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/OrderLines&amp;gt; 
&lt;br /&gt;
&amp;lt;/ns0:Order&amp;gt;
&lt;/p&gt;
&lt;p&gt;
He mapped it to this XML:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:GetItemNameRequest xmlns:ns0=&amp;quot;&lt;a href="http://eliasen.dk&amp;quot;"&gt;http://eliasen.dk&amp;quot;&lt;/a&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;ns0:GetItemName ItemID=&amp;quot;21&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;ns0:GetItemName ItemID=&amp;quot;42&amp;quot; /&amp;gt;&amp;#160; 
&lt;br /&gt;
&amp;lt;/ns0:GetItemNameRequest&amp;gt;
&lt;/p&gt;
&lt;p&gt;
This was then sent to SQL Server using the SQL Adapter to call a SP named “GetItemName”
which just takes an ItemID (int) as parameter and returns the ItemName hat matches
the ItemID.
&lt;/p&gt;
&lt;p&gt;
Now, the schema that is generated for the SQL Server request actually doesn’t allow
for multiple GetItemName elements to be created, but that is changeable :-) If you
set it to have maxOcurs = unbounded, then it can occur multiple times, and what happens
is that the SP is called multiple times. Unfortunately, only one of the ItemNames
is returned – the rest is ignored.
&lt;/p&gt;
&lt;p&gt;
So the customer came to me because naturally, he needed all the ItemNames and not
just one of them. I have suggested 5 possible solutions, which I will describe here.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;First option 
&lt;br /&gt;
&lt;/strong&gt;Use the pattern described at &lt;a title="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx"&gt;http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx&lt;/a&gt; to
loop around the order lines and build the resulting XML one order line at a time.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Second option 
&lt;br /&gt;
&lt;/strong&gt;Use enveloping in the receive location in order to get one orchestration
started for each order line.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Third option&lt;/strong&gt; 
&lt;br /&gt;
Use the Database Lookup functoid to retrieve the ItemName based on the ItemID
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Fourth option&lt;/strong&gt; 
&lt;br /&gt;
Generate a comma separated list of ItemID’s in the map, and let the stored procedure
use that list to return the relevant ItemNames. This has some consequences for the
stored procedure. Before it looked like this:
&lt;/p&gt;
&lt;p&gt;
SELECT ItemNumber, ItemName 
&lt;br /&gt;
FROM Items 
&lt;br /&gt;
WHERE Items.ItemNumber = @ItemID 
&lt;br /&gt;
FOR XML AUTO, ELEMENTS
&lt;/p&gt;
&lt;p&gt;
Now, it looks like this:
&lt;/p&gt;
&lt;p&gt;
SELECT ItemNumber, ItemName 
&lt;br /&gt;
FROM Items 
&lt;br /&gt;
WHERE EXISTS (select * from dbo.Split(‘,’,@items) where [Items].ItemNumber = ID) 
&lt;br /&gt;
FOR XML AUTO, ELEMENTS
&lt;/p&gt;
&lt;p&gt;
@items is the parameter for the SP, which is just an nvarchar that is to contain the
comma separated list.
&lt;/p&gt;
&lt;p&gt;
For this to work you need the Split function, which looks like this:
&lt;/p&gt;
&lt;p&gt;
CREATE FUNCTION [dbo].[Split] (@sep char(1), @s varchar(512)) 
&lt;br /&gt;
RETURNS table 
&lt;br /&gt;
AS 
&lt;br /&gt;
RETURN 
&lt;br /&gt;
(&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
WITH Pieces(pn, start, stop) AS ( 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
SELECT 1, 1, CHARINDEX(@sep, @s) 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
UNION ALL&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
SELECT pn + 1, stop + 1, CHARINDEX(@sep, @s, stop + 1)&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
FROM Pieces&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
WHERE stop &amp;gt; 0&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
) 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
SELECT pn, CONVERT(int, SUBSTRING(@s, start, CASE WHEN stop &amp;gt; 0 THEN stop-start
ELSE 512 END)) AS ID 
&lt;br /&gt;
FROM Pieces 
&lt;br /&gt;
)
&lt;/p&gt;
&lt;p&gt;
In order to generate the comma separated list in your map, I have written two blog
posts about this issue, which you can find at &lt;a title="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx" href="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx"&gt;http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx&lt;/a&gt; and &lt;a title="http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx" href="http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx"&gt;http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Fifth option 
&lt;br /&gt;
&lt;/strong&gt;The fifth and last option i want to mention is, that with the new SQL Server
LOB adapter from Adapter Pack 2.0, it appears that you can do it like the customer
wanted to do it in the first place with sending one XML to SQL Server and getting
an accumulated response back from SQL Server based on several calls to a stored procedure.
I haven’t had time to test this, but look out for another blog post about this :-)
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=95e4c998-17fe-4478-9cc5-f9e7dc76d2b3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,95e4c998-17fe-4478-9cc5-f9e7dc76d2b3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f132e1f3-77f4-40f9-ad61-d4f6447711c9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f132e1f3-77f4-40f9-ad61-d4f6447711c9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f132e1f3-77f4-40f9-ad61-d4f6447711c9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f132e1f3-77f4-40f9-ad61-d4f6447711c9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just to let you know, I am now listed on <a href="http://www.biztalkblogs.com">http://www.biztalkblogs.com</a> along
with lots of other cool BizTalk bloggers :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f132e1f3-77f4-40f9-ad61-d4f6447711c9" />
      </body>
      <title>BizTalkblogs.com</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f132e1f3-77f4-40f9-ad61-d4f6447711c9.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/28/BizTalkblogscom.aspx</link>
      <pubDate>Tue, 28 Jul 2009 15:40:29 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just to let you know, I am now listed on &lt;a href="http://www.biztalkblogs.com"&gt;http://www.biztalkblogs.com&lt;/a&gt; along
with lots of other cool BizTalk bloggers :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f132e1f3-77f4-40f9-ad61-d4f6447711c9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f132e1f3-77f4-40f9-ad61-d4f6447711c9.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=2ba72448-6fec-4b28-bb2b-d82c4e5bacfb</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,2ba72448-6fec-4b28-bb2b-d82c4e5bacfb.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,2ba72448-6fec-4b28-bb2b-d82c4e5bacfb.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=2ba72448-6fec-4b28-bb2b-d82c4e5bacfb</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just released version 5 of my pipeline components library. 
</p>
        <p>
It has the following additions:
</p>
        <ul>
          <li>
SuspendAfterMap. In BizTalk 2009 (which is the only supported BizTalk version for
this pipeline component) there has been added support for recoverable interchanges
for errors occurring during mapping on receive ports after disassembling. This is
achieved by setting a specific promoted property to “true”. I have created a pipeline
component that will do this for you.</li>
          <li>
WriteProperties. This pipeline component serves almost NO purpose at all, except I
used it for debugging to see what properties existed on a message going through BizTalk.
It will write out all context of a message to the eventlog, one event at a time. 
</li>
        </ul>
        <p>
It has the following new features:
</p>
        <ul>
          <li>
Promote. The pipeline component used for promoting a value based on an XPath expression
and thereby enabling you to promote a specific instance of a reoccurring element has
been enhanced by a “constant”. So instead of having to set the value of some property
to the result of an XPath expression you can just enter a constant instead. If you
enter both a constant and an XPath expression the constant wins. This new feature
is quite handy if you need to set the value of for instance MIME.FileName to a specific
value or any other property for that matter.</li>
        </ul>
        <p>
You can find the newest versions at <a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/">http://eebiztalkpipelinecom.codeplex.com/</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2ba72448-6fec-4b28-bb2b-d82c4e5bacfb" />
      </body>
      <title>Version 5 of pipeline components library</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,2ba72448-6fec-4b28-bb2b-d82c4e5bacfb.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/22/Version5OfPipelineComponentsLibrary.aspx</link>
      <pubDate>Wed, 22 Jul 2009 22:26:18 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just released version 5 of my pipeline components library. 
&lt;/p&gt;
&lt;p&gt;
It has the following additions:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
SuspendAfterMap. In BizTalk 2009 (which is the only supported BizTalk version for
this pipeline component) there has been added support for recoverable interchanges
for errors occurring during mapping on receive ports after disassembling. This is
achieved by setting a specific promoted property to “true”. I have created a pipeline
component that will do this for you.&lt;/li&gt;
&lt;li&gt;
WriteProperties. This pipeline component serves almost NO purpose at all, except I
used it for debugging to see what properties existed on a message going through BizTalk.
It will write out all context of a message to the eventlog, one event at a time. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
It has the following new features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Promote. The pipeline component used for promoting a value based on an XPath expression
and thereby enabling you to promote a specific instance of a reoccurring element has
been enhanced by a “constant”. So instead of having to set the value of some property
to the result of an XPath expression you can just enter a constant instead. If you
enter both a constant and an XPath expression the constant wins. This new feature
is quite handy if you need to set the value of for instance MIME.FileName to a specific
value or any other property for that matter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You can find the newest versions at &lt;a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/"&gt;http://eebiztalkpipelinecom.codeplex.com/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2ba72448-6fec-4b28-bb2b-d82c4e5bacfb" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,2ba72448-6fec-4b28-bb2b-d82c4e5bacfb.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=650c5008-05e2-45e1-9b94-c866c4cddafb</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,650c5008-05e2-45e1-9b94-c866c4cddafb.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,650c5008-05e2-45e1-9b94-c866c4cddafb.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=650c5008-05e2-45e1-9b94-c866c4cddafb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just released version 9.1 of my functoid library. Actually, nothing much new
has appeared. I had accidentally left out the functoid I described at <a title="http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx" href="http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx">http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx</a> from
version 9, so now it is reintroduced – and it has also been added to the documentation.
</p>
        <p>
Find the newest version of the functoids library at <a href="http://eebiztalkfunctoids.codeplex.com">http://eebiztalkfunctoids.codeplex.com</a> –
thanks.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=650c5008-05e2-45e1-9b94-c866c4cddafb" />
      </body>
      <title>Version 9.1 of functoids library</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,650c5008-05e2-45e1-9b94-c866c4cddafb.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/22/Version91OfFunctoidsLibrary.aspx</link>
      <pubDate>Wed, 22 Jul 2009 21:59:05 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just released version 9.1 of my functoid library. Actually, nothing much new
has appeared. I had accidentally left out the functoid I described at &lt;a title="http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx" href="http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx"&gt;http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx&lt;/a&gt; from
version 9, so now it is reintroduced – and it has also been added to the documentation.
&lt;/p&gt;
&lt;p&gt;
Find the newest version of the functoids library at &lt;a href="http://eebiztalkfunctoids.codeplex.com"&gt;http://eebiztalkfunctoids.codeplex.com&lt;/a&gt; –
thanks.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=650c5008-05e2-45e1-9b94-c866c4cddafb" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,650c5008-05e2-45e1-9b94-c866c4cddafb.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=ab369b9a-0668-4edc-bf49-e39501b9be8c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,ab369b9a-0668-4edc-bf49-e39501b9be8c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,ab369b9a-0668-4edc-bf49-e39501b9be8c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=ab369b9a-0668-4edc-bf49-e39501b9be8c</wfw:commentRss>
      <slash:comments>12</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have been running into too many issues with BizTalk 2009 on VS.NET 2008 lately.
This post is just to mention them and let everyone else know that they are not the
only one – and that they will be reported to MS and hopefully fixed quickly.
</p>
        <p>
          <strong>Build action of schemas 
<br /></strong>Some times the “build action” of a schema in your BizTalk project is set
to “None” instead of “BtsCompile”. When this happens, the schema is not compiled into
the assembly and can therefore not be used for pipeline components, maps, orchestration
messages, and so on. It happens if you drag a schema from your explorer into your
project, but it also happens sometimes when you drag a schema between two projects
inside VS.NET.
</p>
        <p>
          <strong>More build action of schemas 
<br /></strong>The above error could be more easy to live with, if it weren’t absolutely
impossible to know when the “Build action” property of the schema in visible in VS.NET
– some times the property is visible and you can change the value. Other times it
is not. Quite confusing. I have found that if I add a schema to a project, then the
property is suddenly visible for all schemas in the project. Change the ones that
need changing and delete the schema you added.
</p>
        <p>
          <strong>Auto save a map before schemas are chosen 
<br /></strong>When you add a new map then at some point VS.NET auto saves the map, but
if this happens before you have chosen both the source and destination schema you
suddenly get an error, which you really do not expect, because you weren’t doing anything
at the time of the error. This also occurred in previous versions of BizTalk.
</p>
        <p>
          <strong>Map looses information about schemas 
<br /></strong>I have seen several times, that even after choosing source- and destination
schema for a map and dragging a couple of links in the map and saving it, then at
compile time, I get an error about the map not having source- and destination schemas.
So I need to choose them again, and redo all the links, because they have magically
disappeared. This happens for maps that uses both schemas from the same project as
schemas from referenced projects.
</p>
        <p>
          <strong>Output window 
<br /></strong>The output window seems to not always show all information when compiling/deploying.
Some times the information comes all at the end instead of being written to the output
windows as it happens. Other times, I can rebuild my entire solution and the output
windows will only show me the one warning that occurred during compilation.
</p>
        <p>
          <strong>Dragging elements in Schema Editor 
<br /></strong>Dragging elements inside the schema editor has had me baffled since BizTalk
2002. Some times, I need more than 20 tries to get an element to be dragged – and
sometimes it just works. Annoying? Indeed it is!
</p>
        <p>
          <strong>Copy local fails 
<br /></strong>If I have a project (P2) that references another project (P1), then after
I have added an item to P1 and recompiled it, everything seems OK. BUT, if I then
deploy from within V.NET, things start to go wrong. From then on, it seems that the
“Copy local” property of the project reference is ignored. Whenever I recompile P2,
I do NOT get the P1.dll copied to the local folder of P2. This causes all sorts of
stuff as also explained here by Ryan: <a title="http://dotnet.org.za/ryancrawcour/archive/2009/07/17/biztalk-2009-amp-visual-studio-2008-annoyance-2.aspx" href="http://dotnet.org.za/ryancrawcour/archive/2009/07/17/biztalk-2009-amp-visual-studio-2008-annoyance-2.aspx">http://dotnet.org.za/ryancrawcour/archive/2009/07/17/biztalk-2009-amp-visual-studio-2008-annoyance-2.aspx</a></p>
        <p>
          <strong>Setting properties for more than one project at the same time 
<br /></strong>See here: <a title="http://dotnet.org.za/ryancrawcour/archive/2009/07/15/biztalk-2009-feature-missing.aspx" href="http://dotnet.org.za/ryancrawcour/archive/2009/07/15/biztalk-2009-feature-missing.aspx">http://dotnet.org.za/ryancrawcour/archive/2009/07/15/biztalk-2009-feature-missing.aspx</a> for
Ryans thoughts on this.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ab369b9a-0668-4edc-bf49-e39501b9be8c" />
      </body>
      <title>Issues with BizTalk 2009 on VS.NET 2008</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,ab369b9a-0668-4edc-bf49-e39501b9be8c.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/21/IssuesWithBizTalk2009OnVSNET2008.aspx</link>
      <pubDate>Tue, 21 Jul 2009 20:22:24 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have been running into too many issues with BizTalk 2009 on VS.NET 2008 lately.
This post is just to mention them and let everyone else know that they are not the
only one – and that they will be reported to MS and hopefully fixed quickly.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Build action of schemas 
&lt;br /&gt;
&lt;/strong&gt;Some times the “build action” of a schema in your BizTalk project is set
to “None” instead of “BtsCompile”. When this happens, the schema is not compiled into
the assembly and can therefore not be used for pipeline components, maps, orchestration
messages, and so on. It happens if you drag a schema from your explorer into your
project, but it also happens sometimes when you drag a schema between two projects
inside VS.NET.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;More build action of schemas 
&lt;br /&gt;
&lt;/strong&gt;The above error could be more easy to live with, if it weren’t absolutely
impossible to know when the “Build action” property of the schema in visible in VS.NET
– some times the property is visible and you can change the value. Other times it
is not. Quite confusing. I have found that if I add a schema to a project, then the
property is suddenly visible for all schemas in the project. Change the ones that
need changing and delete the schema you added.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Auto save a map before schemas are chosen 
&lt;br /&gt;
&lt;/strong&gt;When you add a new map then at some point VS.NET auto saves the map, but
if this happens before you have chosen both the source and destination schema you
suddenly get an error, which you really do not expect, because you weren’t doing anything
at the time of the error. This also occurred in previous versions of BizTalk.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Map looses information about schemas 
&lt;br /&gt;
&lt;/strong&gt;I have seen several times, that even after choosing source- and destination
schema for a map and dragging a couple of links in the map and saving it, then at
compile time, I get an error about the map not having source- and destination schemas.
So I need to choose them again, and redo all the links, because they have magically
disappeared. This happens for maps that uses both schemas from the same project as
schemas from referenced projects.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Output window 
&lt;br /&gt;
&lt;/strong&gt;The output window seems to not always show all information when compiling/deploying.
Some times the information comes all at the end instead of being written to the output
windows as it happens. Other times, I can rebuild my entire solution and the output
windows will only show me the one warning that occurred during compilation.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Dragging elements in Schema Editor 
&lt;br /&gt;
&lt;/strong&gt;Dragging elements inside the schema editor has had me baffled since BizTalk
2002. Some times, I need more than 20 tries to get an element to be dragged – and
sometimes it just works. Annoying? Indeed it is!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Copy local fails 
&lt;br /&gt;
&lt;/strong&gt;If I have a project (P2) that references another project (P1), then after
I have added an item to P1 and recompiled it, everything seems OK. BUT, if I then
deploy from within V.NET, things start to go wrong. From then on, it seems that the
“Copy local” property of the project reference is ignored. Whenever I recompile P2,
I do NOT get the P1.dll copied to the local folder of P2. This causes all sorts of
stuff as also explained here by Ryan: &lt;a title="http://dotnet.org.za/ryancrawcour/archive/2009/07/17/biztalk-2009-amp-visual-studio-2008-annoyance-2.aspx" href="http://dotnet.org.za/ryancrawcour/archive/2009/07/17/biztalk-2009-amp-visual-studio-2008-annoyance-2.aspx"&gt;http://dotnet.org.za/ryancrawcour/archive/2009/07/17/biztalk-2009-amp-visual-studio-2008-annoyance-2.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Setting properties for more than one project at the same time 
&lt;br /&gt;
&lt;/strong&gt;See here: &lt;a title="http://dotnet.org.za/ryancrawcour/archive/2009/07/15/biztalk-2009-feature-missing.aspx" href="http://dotnet.org.za/ryancrawcour/archive/2009/07/15/biztalk-2009-feature-missing.aspx"&gt;http://dotnet.org.za/ryancrawcour/archive/2009/07/15/biztalk-2009-feature-missing.aspx&lt;/a&gt; for
Ryans thoughts on this.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ab369b9a-0668-4edc-bf49-e39501b9be8c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,ab369b9a-0668-4edc-bf49-e39501b9be8c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=65181529-a3ad-473c-9740-e5b6949a614d</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,65181529-a3ad-473c-9740-e5b6949a614d.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,65181529-a3ad-473c-9740-e5b6949a614d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=65181529-a3ad-473c-9740-e5b6949a614d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Microsoft have finally released some pricing information about Azure. Find it here: <a title="http://www.microsoft.com/azure/pricing.mspx" href="http://www.microsoft.com/azure/pricing.mspx">http://www.microsoft.com/azure/pricing.mspx</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=65181529-a3ad-473c-9740-e5b6949a614d" />
      </body>
      <title>Azure pricing</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,65181529-a3ad-473c-9740-e5b6949a614d.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/21/AzurePricing.aspx</link>
      <pubDate>Tue, 21 Jul 2009 15:43:40 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Microsoft have finally released some pricing information about Azure. Find it here: &lt;a title="http://www.microsoft.com/azure/pricing.mspx" href="http://www.microsoft.com/azure/pricing.mspx"&gt;http://www.microsoft.com/azure/pricing.mspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=65181529-a3ad-473c-9740-e5b6949a614d" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,65181529-a3ad-473c-9740-e5b6949a614d.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=6d196e26-482d-400f-82f5-c82f78f6f087</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,6d196e26-482d-400f-82f5-c82f78f6f087.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,6d196e26-482d-400f-82f5-c82f78f6f087.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=6d196e26-482d-400f-82f5-c82f78f6f087</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I did a <a href="http://blog.eliasen.dk/CommentView,guid,C8661E97-7712-49E0-97A4-574E5D353C26.aspx#2c4179ba-bd0c-41ed-8af5-e0461f4e71ca" target="_blank">follow
up</a> to my <a href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" target="_blank">old
post</a> about how to loop around the elements of a message a couple of days ago.
</p>
        <p>
As you can se from the comments to my followup, Thiago mentions that there isn’t any
performance hit because everything is done inside an atomic scope. Now, Thiago is
naturally correct when he states, that no persistence occurs inside an atomic scope.
But as you can also see from the comments, I wondered about what to do about using
a request-response port – so I just had to test it.
</p>
        <p>
For BizTalk 2009, just as the previous versions, you CAN’T have both the send shape
and corresponding receive shape used for a request-response port in the same atomic
scope. At compile time you will get this error: “an atomic scope may not contain or
call a service or scope that contains both the send and the corresponding receive
of a requestresponse operation on a 'uses' port or servicelink”.
</p>
        <p>
This may seem odd at first glance, but it is due to the fact, that in order to make
sure the <a href="http://en.wikipedia.org/wiki/ACID" target="_blank">ACID</a> properties
are respected at runtime the orchestration engine submits messages that are sent out
to the messagebox, but it doesn’t release them for the messagebox to route until the
atomic scope has finished. This way, if an error occurs inside the atomic scope, no
messages have actually been sent, and therefore, BizTalk can guarantee a consistent
state.
</p>
        <p>
So basically, if the message isn’t released until AFTER the atomic scope, then there
is no way you can receive the reply inside the same atomic scope. Makes sense.
</p>
        <p>
SO, if you want to loop around elements in a message by calling a receive pipeline
inside your orchestration, you can’t use request-response ports, as you can with other
patterns. Sorry, but that is the way it is.
</p>
        <p>
          <strong>Conclusion</strong>: 
<br />
If you want to loop around elements inside an orhestration, use a receive pipeline
if possible since this is done in an atomic scope and therefore no persistence points
occur. If not possible, use the pattern described <a href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" target="_blank">here</a>.
</p>
        <p>
Thanks, Thiago for pointing out that my post needed some more details…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6d196e26-482d-400f-82f5-c82f78f6f087" />
      </body>
      <title>Looping around elements of a message, follow-up part II</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,6d196e26-482d-400f-82f5-c82f78f6f087.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/15/LoopingAroundElementsOfAMessageFollowupPartII.aspx</link>
      <pubDate>Wed, 15 Jul 2009 17:45:03 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I did a &lt;a href="http://blog.eliasen.dk/CommentView,guid,C8661E97-7712-49E0-97A4-574E5D353C26.aspx#2c4179ba-bd0c-41ed-8af5-e0461f4e71ca" target="_blank"&gt;follow
up&lt;/a&gt; to my &lt;a href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" target="_blank"&gt;old
post&lt;/a&gt; about how to loop around the elements of a message a couple of days ago.
&lt;/p&gt;
&lt;p&gt;
As you can se from the comments to my followup, Thiago mentions that there isn’t any
performance hit because everything is done inside an atomic scope. Now, Thiago is
naturally correct when he states, that no persistence occurs inside an atomic scope.
But as you can also see from the comments, I wondered about what to do about using
a request-response port – so I just had to test it.
&lt;/p&gt;
&lt;p&gt;
For BizTalk 2009, just as the previous versions, you CAN’T have both the send shape
and corresponding receive shape used for a request-response port in the same atomic
scope. At compile time you will get this error: “an atomic scope may not contain or
call a service or scope that contains both the send and the corresponding receive
of a requestresponse operation on a 'uses' port or servicelink”.
&lt;/p&gt;
&lt;p&gt;
This may seem odd at first glance, but it is due to the fact, that in order to make
sure the &lt;a href="http://en.wikipedia.org/wiki/ACID" target="_blank"&gt;ACID&lt;/a&gt; properties
are respected at runtime the orchestration engine submits messages that are sent out
to the messagebox, but it doesn’t release them for the messagebox to route until the
atomic scope has finished. This way, if an error occurs inside the atomic scope, no
messages have actually been sent, and therefore, BizTalk can guarantee a consistent
state.
&lt;/p&gt;
&lt;p&gt;
So basically, if the message isn’t released until AFTER the atomic scope, then there
is no way you can receive the reply inside the same atomic scope. Makes sense.
&lt;/p&gt;
&lt;p&gt;
SO, if you want to loop around elements in a message by calling a receive pipeline
inside your orchestration, you can’t use request-response ports, as you can with other
patterns. Sorry, but that is the way it is.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;: 
&lt;br /&gt;
If you want to loop around elements inside an orhestration, use a receive pipeline
if possible since this is done in an atomic scope and therefore no persistence points
occur. If not possible, use the pattern described &lt;a href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Thanks, Thiago for pointing out that my post needed some more details…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6d196e26-482d-400f-82f5-c82f78f6f087" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,6d196e26-482d-400f-82f5-c82f78f6f087.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c3f95e27-cc9a-4f1f-aedf-6fb244cade76</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c3f95e27-cc9a-4f1f-aedf-6fb244cade76.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c3f95e27-cc9a-4f1f-aedf-6fb244cade76.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c3f95e27-cc9a-4f1f-aedf-6fb244cade76</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I faced a very peculiar problem. I was helping a customer split a BizTalk project
into two projects, because some of the schemas that were in the original project needed
to be common for other projects.
</p>
        <p>
So this is what i started out with:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalProject_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OriginalProject" border="0" alt="OriginalProject" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalProject_thumb.png" width="230" height="98" />
          </a>
        </p>
        <p>
which is: Two schemas and a map between them.
</p>
        <p>
And this is what I would like:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalAndNewProject_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OriginalAndNewProject" border="0" alt="OriginalAndNewProject" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalAndNewProject_thumb.png" width="230" height="149" />
          </a>
        </p>
        <p>
So basically, the common schema has been transferred to a common project. Now, naturally,
I need to reference the CommonProject from the OriginalProject and then reload the
schema in my map to make it work. But this is where the weird part starts. After compiling
the NewCommonProject and adding the reference, this is what showed up in the schema
browser when I wanted to reload the schema in the map:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/SchemaBrowser.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SchemaBrowser" border="0" alt="SchemaBrowser" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/SchemaBrowser_thumb.png" width="324" height="400" />
          </a>
        </p>
        <p>
Basically, my new project didn’t have any schemas inside it. After much troubleshooting,
thinking that the issue was something with the newly compiled dll didn’t get copied
to the bin folder of the OriginalProject and trying lots of stuff with that, I finally
figured it out.
</p>
        <p>
I just happened to notice that the file size of the NewCommonProject.dll was only
5kb which seemed to small. So I browsed the dll in the object browser and it was totally
empty. Weird. Then I went and looked at the properties of the schema, and didn’t see
anything unusual. So I added a new schema to the project just to see what would happen
with that. This new schema showed up in the schema browser. Even weirder. But then
I went and looked at the properties of the schemas again and that’s when this new
property suddenly showed up:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/NewProperty_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="NewProperty" border="0" alt="NewProperty" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/NewProperty_thumb.png" width="244" height="87" />
          </a>
        </p>
        <p>
I changed the build action on the schemas to be “BtsCompile” and this did the trick.
Now all the schemas showed up in the schema browser.
</p>
        <p>
Now, another strange side to this story is, that by now, the Build Action property
has disappeared again… I haven’t quite figured out when it appears and when it does
not.
</p>
        <p>
BUT, if you ever run into issues where your schemas just don’t show up anywhere… this
might be your issue.
</p>
        <p>
Hope this helps someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c3f95e27-cc9a-4f1f-aedf-6fb244cade76" />
      </body>
      <title>Schemas not compiled and do not show up anywhere</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c3f95e27-cc9a-4f1f-aedf-6fb244cade76.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/15/SchemasNotCompiledAndDoNotShowUpAnywhere.aspx</link>
      <pubDate>Wed, 15 Jul 2009 17:36:26 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I faced a very peculiar problem. I was helping a customer split a BizTalk project
into two projects, because some of the schemas that were in the original project needed
to be common for other projects.
&lt;/p&gt;
&lt;p&gt;
So this is what i started out with:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalProject_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OriginalProject" border="0" alt="OriginalProject" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalProject_thumb.png" width="230" height="98" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
which is: Two schemas and a map between them.
&lt;/p&gt;
&lt;p&gt;
And this is what I would like:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalAndNewProject_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OriginalAndNewProject" border="0" alt="OriginalAndNewProject" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/OriginalAndNewProject_thumb.png" width="230" height="149" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So basically, the common schema has been transferred to a common project. Now, naturally,
I need to reference the CommonProject from the OriginalProject and then reload the
schema in my map to make it work. But this is where the weird part starts. After compiling
the NewCommonProject and adding the reference, this is what showed up in the schema
browser when I wanted to reload the schema in the map:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/SchemaBrowser.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SchemaBrowser" border="0" alt="SchemaBrowser" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/SchemaBrowser_thumb.png" width="324" height="400" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Basically, my new project didn’t have any schemas inside it. After much troubleshooting,
thinking that the issue was something with the newly compiled dll didn’t get copied
to the bin folder of the OriginalProject and trying lots of stuff with that, I finally
figured it out.
&lt;/p&gt;
&lt;p&gt;
I just happened to notice that the file size of the NewCommonProject.dll was only
5kb which seemed to small. So I browsed the dll in the object browser and it was totally
empty. Weird. Then I went and looked at the properties of the schema, and didn’t see
anything unusual. So I added a new schema to the project just to see what would happen
with that. This new schema showed up in the schema browser. Even weirder. But then
I went and looked at the properties of the schemas again and that’s when this new
property suddenly showed up:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/NewProperty_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="NewProperty" border="0" alt="NewProperty" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Schemasnotcompiledanddonotshowupanywhere_113BE/NewProperty_thumb.png" width="244" height="87" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I changed the build action on the schemas to be “BtsCompile” and this did the trick.
Now all the schemas showed up in the schema browser.
&lt;/p&gt;
&lt;p&gt;
Now, another strange side to this story is, that by now, the Build Action property
has disappeared again… I haven’t quite figured out when it appears and when it does
not.
&lt;/p&gt;
&lt;p&gt;
BUT, if you ever run into issues where your schemas just don’t show up anywhere… this
might be your issue.
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c3f95e27-cc9a-4f1f-aedf-6fb244cade76" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c3f95e27-cc9a-4f1f-aedf-6fb244cade76.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c8661e97-7712-49e0-97a4-574e5d353c26</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c8661e97-7712-49e0-97a4-574e5d353c26.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c8661e97-7712-49e0-97a4-574e5d353c26.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c8661e97-7712-49e0-97a4-574e5d353c26</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
2 and a half year ago, I wrote a blog post about looping around elements, which can
be found here: <a title="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx">http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx</a>.
In this post, I mention two ways to do something per element in a message. One is
to use the XML (or flat file) disassembler to split the message into lots of messages
and have them handled individually, and the other is to do it inside an orchestration.
</p>
        <p>
Since then, BizTalk has been updated such that you can now call a receive pipeline
from within your orchestration, which gives you the another way of looping through
elements inside an orchestration.
</p>
        <p>
Often times, in the forums, users are suggested to loop through elements of a message
inside an orchestration. It is a fairly common approach if you want the subelements
of a message handled in the correct order, for instance.
</p>
        <p>
This post is to make sure people know that looping around a message inside an orchestration
can have a serious performance impact. 
</p>
        <p>
Say you receive a large message – 100MB. You start looping around it inside an orchestration
and split it up into, say, 1000 messages of 100k each. Then, for each message you
call a web service or send out the message to some system. What will happen is, that
the orchestration will persist its state after each send shape, meaning that the 100BM
is written 1000 times to the messagebox. Persistence points are something you always
need to be aware of when designing your orchestrations, and with messages of 100MB,
even more so.
</p>
        <p>
SO, don’t just loop around a message inside an orchestration because you can… do it
when you absolutely have to.
</p>
        <p>
Thanks
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c8661e97-7712-49e0-97a4-574e5d353c26" />
      </body>
      <title>Looping around elements of a message, followup</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c8661e97-7712-49e0-97a4-574e5d353c26.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/08/LoopingAroundElementsOfAMessageFollowup.aspx</link>
      <pubDate>Wed, 08 Jul 2009 20:07:07 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
2 and a half year ago, I wrote a blog post about looping around elements, which can
be found here: &lt;a title="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx" href="http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx"&gt;http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx&lt;/a&gt;.
In this post, I mention two ways to do something per element in a message. One is
to use the XML (or flat file) disassembler to split the message into lots of messages
and have them handled individually, and the other is to do it inside an orchestration.
&lt;/p&gt;
&lt;p&gt;
Since then, BizTalk has been updated such that you can now call a receive pipeline
from within your orchestration, which gives you the another way of looping through
elements inside an orchestration.
&lt;/p&gt;
&lt;p&gt;
Often times, in the forums, users are suggested to loop through elements of a message
inside an orchestration. It is a fairly common approach if you want the subelements
of a message handled in the correct order, for instance.
&lt;/p&gt;
&lt;p&gt;
This post is to make sure people know that looping around a message inside an orchestration
can have a serious performance impact. 
&lt;/p&gt;
&lt;p&gt;
Say you receive a large message – 100MB. You start looping around it inside an orchestration
and split it up into, say, 1000 messages of 100k each. Then, for each message you
call a web service or send out the message to some system. What will happen is, that
the orchestration will persist its state after each send shape, meaning that the 100BM
is written 1000 times to the messagebox. Persistence points are something you always
need to be aware of when designing your orchestrations, and with messages of 100MB,
even more so.
&lt;/p&gt;
&lt;p&gt;
SO, don’t just loop around a message inside an orchestration because you can… do it
when you absolutely have to.
&lt;/p&gt;
&lt;p&gt;
Thanks
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c8661e97-7712-49e0-97a4-574e5d353c26" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c8661e97-7712-49e0-97a4-574e5d353c26.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=5fe19dfb-9726-4367-9492-492b610abde3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,5fe19dfb-9726-4367-9492-492b610abde3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,5fe19dfb-9726-4367-9492-492b610abde3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=5fe19dfb-9726-4367-9492-492b610abde3</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Upon reading a forum post today, I stopped to think about the usage of custom XSLT
to completely replace the mapper, custom scripting functoids and the built-in functoids.
</p>
        <p>
Some people can’t be bothered using the mapper and go straight to custom xslt whenever
a mapping is to be created. Others use the built-in functoids whenever possible. And
the rest go for some path in the middle, with functoids and the occasional scripting
functoid whenever the built-in functoids either can’t get the job done or seem to
be too troublesome to use.
</p>
        <p>
          <strong>The advantages of custom XSLT</strong>
        </p>
        <ol>
          <li>
            <strong>Performance</strong>. It seems rather obvious that automatically generated
XSLT can’t perform as well as custom XSLT. So if you really need high performance,
use your own XSLT. 
</li>
          <li>
            <strong>Maintainability</strong>. I will be using this argument against custom XSLT
as well :-) but in essence, some people think that having a map with perhaps 200 functoids
is too difficult to maintain. Sometimes you need lots of functoids in order to complete
some mapping task that can be easily done in XSLT. In that case, the XSLT can be more
readable and hence maintainable than using functoids. 
</li>
        </ol>
        <p>
          <strong>The advantages of using the built-in functoids</strong>
        </p>
        <ol>
          <li>
            <strong>Overview. </strong>Using the functoids can give a developer an overview of
what functionality a map provides, whereas custom xslt needs to be gone through and
“parsed” by a developer before he can understand what is happening. 
</li>
          <li>
            <strong>Maintainability</strong>. (See, there it is again – in the opposite direction).
A BizTalk developer knows about maps and functoids. He does snot necessarily know
about xslt – and even if he does, he is not guaranteed to very proficient in it. By
staying with the functoids you give a BizTalk developer the best possible opportunity
to understand a new map he is going to maintain. 
</li>
        </ol>
        <p>
          <strong>The advantages of using functoids and the scripting functoids</strong>
        </p>
        <ol>
          <li>
            <strong>Everything is possible :-)</strong>. Basically you can do what you want. Use
built-in functoids as much as you prefer and throw in scripting functoids if you think
the solution either can’t be done with the built-in functoids or is too troublesome
to do. 
</li>
        </ol>
        <p>
          <strong>My preference</strong>
        </p>
        <p>
Well, those that read my blog regularly wont be surprised when I say that my preference
is to use the built-in functoids whenever possible. I turn to XSLT only when I cannot
solve my problem with the built-in functoids. And when I need XSLT, I always use custom
scripting functoids to supplement the other functoids, so I let as much of the job
as possible be handles by built-in functoids. I never use custom XSLT to replace the
map. My main reasons for this are:
</p>
        <ol>
          <li>
            <strong>Maintainability</strong>. I truly believe that it is easier for a new BizTalk
developer to troubleshoot and/or change an existing map if only built-in functoids
are used. 
</li>
          <li>
            <strong>Overview</strong>. If a BizTalk developer opens up a map and sees lots of
scripting functoids, he needs to open them all up and examine the code inside it in
order to know what the map does. And after looking at 5 different scripting functoids,
he needs to go back and look at the first again. Really annoying! 
</li>
        </ol>
        <p>
If I am doing a rally complex map where the number of custom scripting functoids is
larger than the number of built-in functoids, I might consider using a custom XSLT
script… but this haven’t happened yet :-) And also, if i run into really serious performance
issues, I will consider it as well, off course.
</p>
        <p>
Just my thoughts.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=5fe19dfb-9726-4367-9492-492b610abde3" />
      </body>
      <title>Custom XSLT, Scripting functoid, or built-in functoids – a question about religion?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,5fe19dfb-9726-4367-9492-492b610abde3.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/08/CustomXSLTScriptingFunctoidOrBuiltinFunctoidsAQuestionAboutReligion.aspx</link>
      <pubDate>Wed, 08 Jul 2009 19:36:39 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Upon reading a forum post today, I stopped to think about the usage of custom XSLT
to completely replace the mapper, custom scripting functoids and the built-in functoids.
&lt;/p&gt;
&lt;p&gt;
Some people can’t be bothered using the mapper and go straight to custom xslt whenever
a mapping is to be created. Others use the built-in functoids whenever possible. And
the rest go for some path in the middle, with functoids and the occasional scripting
functoid whenever the built-in functoids either can’t get the job done or seem to
be too troublesome to use.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The advantages of custom XSLT&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;. It seems rather obvious that automatically generated
XSLT can’t perform as well as custom XSLT. So if you really need high performance,
use your own XSLT. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt;. I will be using this argument against custom XSLT
as well :-) but in essence, some people think that having a map with perhaps 200 functoids
is too difficult to maintain. Sometimes you need lots of functoids in order to complete
some mapping task that can be easily done in XSLT. In that case, the XSLT can be more
readable and hence maintainable than using functoids. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;The advantages of using the built-in functoids&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Overview. &lt;/strong&gt;Using the functoids can give a developer an overview of
what functionality a map provides, whereas custom xslt needs to be gone through and
“parsed” by a developer before he can understand what is happening. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt;. (See, there it is again – in the opposite direction).
A BizTalk developer knows about maps and functoids. He does snot necessarily know
about xslt – and even if he does, he is not guaranteed to very proficient in it. By
staying with the functoids you give a BizTalk developer the best possible opportunity
to understand a new map he is going to maintain. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;The advantages of using functoids and the scripting functoids&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Everything is possible :-)&lt;/strong&gt;. Basically you can do what you want. Use
built-in functoids as much as you prefer and throw in scripting functoids if you think
the solution either can’t be done with the built-in functoids or is too troublesome
to do. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;My preference&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Well, those that read my blog regularly wont be surprised when I say that my preference
is to use the built-in functoids whenever possible. I turn to XSLT only when I cannot
solve my problem with the built-in functoids. And when I need XSLT, I always use custom
scripting functoids to supplement the other functoids, so I let as much of the job
as possible be handles by built-in functoids. I never use custom XSLT to replace the
map. My main reasons for this are:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt;. I truly believe that it is easier for a new BizTalk
developer to troubleshoot and/or change an existing map if only built-in functoids
are used. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overview&lt;/strong&gt;. If a BizTalk developer opens up a map and sees lots of
scripting functoids, he needs to open them all up and examine the code inside it in
order to know what the map does. And after looking at 5 different scripting functoids,
he needs to go back and look at the first again. Really annoying! 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
If I am doing a rally complex map where the number of custom scripting functoids is
larger than the number of built-in functoids, I might consider using a custom XSLT
script… but this haven’t happened yet :-) And also, if i run into really serious performance
issues, I will consider it as well, off course.
&lt;/p&gt;
&lt;p&gt;
Just my thoughts.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=5fe19dfb-9726-4367-9492-492b610abde3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,5fe19dfb-9726-4367-9492-492b610abde3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=cb9f61bd-72e5-4b85-ae8f-4228424b2bbc</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,cb9f61bd-72e5-4b85-ae8f-4228424b2bbc.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,cb9f61bd-72e5-4b85-ae8f-4228424b2bbc.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=cb9f61bd-72e5-4b85-ae8f-4228424b2bbc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
When trying to help the guy I wrote about in <a title="http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx" href="http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx">http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx</a> getting
his distinguished field working, another guy suggested that he just used he xpath
function instead of trying to get the distinguished field working. Now, he actually
ended up using the xpath function because he had a reserved word in the xpath statement
to the field he needed to access the field, but I thought I’d just write a post about
why the xpath function should be avoided and perhaps generalize the post to the usage
of promoted properties, distinguished fields and the xpath function. When to use what
and why…
</p>
        <p>
          <strong>Why use distinguished fields over the xpath function</strong>
        </p>
        <ol>
          <li>
            <strong>Readability</strong>. Inside an expression shape, it is much easier for a
BizTalk developer to look at “Message.MyElement.MyField” than it is to look at “xpath(Message,
“string(/*[local-name()=’MyElement’ and namespace-uri()=’http://mynamespace.com/something/somethingmore’]/*[local-name()=’Myfield’
and namespace-uri()=’’])”)”</li>
          <li>
            <strong>Maintainability</strong>. If you need to change a schema at some point, the
distinguished field is automatically updated to correspond to the new xpath expression
that points to the relevant field (if you are using the BizTalk Editor, that is).
If you use the xpath function, you need to find ALL occurrences of the xpath function
in your entire solution that has an xpath expression that needs to be updated.</li>
          <li>
            <strong>Performance</strong>. If you use the xpath expression to get values form a
message, then the entire message needs to be loaded from the database and the xpath
expression is then evaluated. Distinguished fields, on the other hand, are kept in
the context of the message and is therefore loaded quickly at runtime.</li>
        </ol>
        <p>
          <strong>Why use promoted properties over distinguished fields</strong>
        </p>
        <ol>
          <li>
            <strong>Routing</strong>. Only promoted properties can be used for routing in the
internal publish/subscribe engine if you need to route based on the content of a message.</li>
          <li>
            <strong>Correlation</strong>. If you need to correlate a received message into a specific
instance of your orchestrations, then you need to do this using promoted properties,
as these are the only properties that can be added to a correlation type. This makes
sense when you think of it, because correlation is really just runtime routing - setting
up the correct subscriptions at runtime that will make the message hit the correct
orchestration instance. And routing can only be done with promoted properties, hence
these are needed for correlation.</li>
          <li>
            <strong>Tracking</strong>. You cannot track distinguished fields – for tracking, you
need promoted properties.</li>
        </ol>
        <p>
          <strong>Why use the xpath function</strong>
        </p>
        <ol>
          <li>
Distinguished fields cannot be used because there is a reserved word in the path of
the xpath expression</li>
          <li>
Distinguished fields cannot be used because you need to set or read a value from a
reoccurring element</li>
        </ol>
        <p>
          <strong>Why use distinguished fields over promoted properties</strong>
        </p>
        <ol>
          <li>
            <strong>Performance</strong>. You want to keep the number of promoted properties as
low as possible, since the messaging engine really needs as few promoted properties
as possible to evaluate when finding out which subscriptions match an incoming message
that is published to the MessageBox.</li>
        </ol>
        <p>
So, to sum up: Use distinguished fields whenever possible, switching only to xpath
function or promoted properties if really needed.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=cb9f61bd-72e5-4b85-ae8f-4228424b2bbc" />
      </body>
      <title>Why use distinguished fields?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,cb9f61bd-72e5-4b85-ae8f-4228424b2bbc.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/07/WhyUseDistinguishedFields.aspx</link>
      <pubDate>Tue, 07 Jul 2009 21:36:10 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
When trying to help the guy I wrote about in &lt;a title="http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx" href="http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx"&gt;http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx&lt;/a&gt; getting
his distinguished field working, another guy suggested that he just used he xpath
function instead of trying to get the distinguished field working. Now, he actually
ended up using the xpath function because he had a reserved word in the xpath statement
to the field he needed to access the field, but I thought I’d just write a post about
why the xpath function should be avoided and perhaps generalize the post to the usage
of promoted properties, distinguished fields and the xpath function. When to use what
and why…
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Why use distinguished fields over the xpath function&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Readability&lt;/strong&gt;. Inside an expression shape, it is much easier for a
BizTalk developer to look at “Message.MyElement.MyField” than it is to look at “xpath(Message,
“string(/*[local-name()=’MyElement’ and namespace-uri()=’http://mynamespace.com/something/somethingmore’]/*[local-name()=’Myfield’
and namespace-uri()=’’])”)”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt;. If you need to change a schema at some point, the
distinguished field is automatically updated to correspond to the new xpath expression
that points to the relevant field (if you are using the BizTalk Editor, that is).
If you use the xpath function, you need to find ALL occurrences of the xpath function
in your entire solution that has an xpath expression that needs to be updated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;. If you use the xpath expression to get values form a
message, then the entire message needs to be loaded from the database and the xpath
expression is then evaluated. Distinguished fields, on the other hand, are kept in
the context of the message and is therefore loaded quickly at runtime.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Why use promoted properties over distinguished fields&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Routing&lt;/strong&gt;. Only promoted properties can be used for routing in the
internal publish/subscribe engine if you need to route based on the content of a message.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlation&lt;/strong&gt;. If you need to correlate a received message into a specific
instance of your orchestrations, then you need to do this using promoted properties,
as these are the only properties that can be added to a correlation type. This makes
sense when you think of it, because correlation is really just runtime routing - setting
up the correct subscriptions at runtime that will make the message hit the correct
orchestration instance. And routing can only be done with promoted properties, hence
these are needed for correlation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tracking&lt;/strong&gt;. You cannot track distinguished fields – for tracking, you
need promoted properties.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Why use the xpath function&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Distinguished fields cannot be used because there is a reserved word in the path of
the xpath expression&lt;/li&gt;
&lt;li&gt;
Distinguished fields cannot be used because you need to set or read a value from a
reoccurring element&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Why use distinguished fields over promoted properties&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;. You want to keep the number of promoted properties as
low as possible, since the messaging engine really needs as few promoted properties
as possible to evaluate when finding out which subscriptions match an incoming message
that is published to the MessageBox.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So, to sum up: Use distinguished fields whenever possible, switching only to xpath
function or promoted properties if really needed.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=cb9f61bd-72e5-4b85-ae8f-4228424b2bbc" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,cb9f61bd-72e5-4b85-ae8f-4228424b2bbc.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=0b1ae20b-5359-4b72-901a-a3b4e472a6f4</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,0b1ae20b-5359-4b72-901a-a3b4e472a6f4.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,0b1ae20b-5359-4b72-901a-a3b4e472a6f4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=0b1ae20b-5359-4b72-901a-a3b4e472a6f4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A guy on the forums posted a very small schema, in which he had promoted an element
as a distinguished field. 
</p>
        <p>
His schema was this:
</p>
        <p>
&lt;?xml version="1.0" encoding="utf-16" ?&gt; 
<br />
&lt;xsd:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified"
elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; 
<br />
  &lt;xsd:element name="outbound_task"&gt; 
<br />
    &lt;xsd:annotation&gt; 
<br />
      &lt;xsd:appinfo&gt; 
<br />
        &lt;properties xmlns="http://schemas.microsoft.com/BizTalk/2003"&gt; 
<br />
          &lt;property distinguished="true"
xpath="/*[local-name()='outbound_task' and namespace-uri()='']/*[local-name()='task'
and namespace-uri()='']/*[local-name()='task_id' and namespace-uri()='']" /&gt; 
<br />
        &lt;/properties&gt; 
<br />
      &lt;/xsd:appinfo&gt; 
<br />
    &lt;/xsd:annotation&gt; 
<br />
    &lt;xsd:complexType&gt; 
<br />
      &lt;xsd:sequence&gt; 
<br />
        &lt;xsd:element name="task"&gt; 
<br />
          &lt;xsd:complexType&gt; 
<br />
            &lt;xsd:sequence&gt; 
<br />
              &lt;xsd:element
minOccurs="0" name="task_id" type="xsd:decimal" /&gt; 
<br />
            &lt;/xsd:sequence&gt; 
<br />
          &lt;/xsd:complexType&gt; 
<br />
        &lt;/xsd:element&gt; 
<br />
      &lt;/xsd:sequence&gt; 
<br />
    &lt;/xsd:complexType&gt; 
<br />
  &lt;/xsd:element&gt; 
<br />
&lt;/xsd:schema&gt;
</p>
        <p>
His issue was, that when he tried using the distinguished field in an orchestration,
the task_id field just didn’t show up in intellisense. And if he just entered the
complete value in the expression shape (like this: Message.task.task_id) then he got
a compile time error.
</p>
        <p>
I messed around with it a lot, trying all sorts of stuff, but ended up with a quite
simple solution: the word “task” is a reserved word. For a complete list of the reserved
words, take a look at <a title="http://msdn.microsoft.com/en-us/library/aa547020.aspx" href="http://msdn.microsoft.com/en-us/library/aa547020.aspx">http://msdn.microsoft.com/en-us/library/aa547020.aspx</a>.
So, basically, renaming the “task” element to “Task” or something completely different
(but still avoiding any reserved words) will work.
</p>
        <p>
Hope this helps.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=0b1ae20b-5359-4b72-901a-a3b4e472a6f4" />
      </body>
      <title>Distinguished field not working</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,0b1ae20b-5359-4b72-901a-a3b4e472a6f4.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/07/DistinguishedFieldNotWorking.aspx</link>
      <pubDate>Tue, 07 Jul 2009 20:27:16 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A guy on the forums posted a very small schema, in which he had promoted an element
as a distinguished field. 
&lt;/p&gt;
&lt;p&gt;
His schema was this:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-16&amp;quot; ?&amp;gt; 
&lt;br /&gt;
&amp;lt;xsd:schema xmlns:b=&amp;quot;http://schemas.microsoft.com/BizTalk/2003&amp;quot; attributeFormDefault=&amp;quot;unqualified&amp;quot;
elementFormDefault=&amp;quot;qualified&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;xsd:element name=&amp;quot;outbound_task&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:annotation&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:appinfo&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;properties xmlns=&amp;quot;http://schemas.microsoft.com/BizTalk/2003&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;property distinguished=&amp;quot;true&amp;quot;
xpath=&amp;quot;/*[local-name()='outbound_task' and namespace-uri()='']/*[local-name()='task'
and namespace-uri()='']/*[local-name()='task_id' and namespace-uri()='']&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/properties&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:appinfo&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:annotation&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:complexType&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:sequence&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:element name=&amp;quot;task&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:complexType&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:sequence&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsd:element
minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;task_id&amp;quot; type=&amp;quot;xsd:decimal&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:sequence&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:complexType&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:element&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:sequence&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsd:complexType&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/xsd:element&amp;gt; 
&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;
&lt;/p&gt;
&lt;p&gt;
His issue was, that when he tried using the distinguished field in an orchestration,
the task_id field just didn’t show up in intellisense. And if he just entered the
complete value in the expression shape (like this: Message.task.task_id) then he got
a compile time error.
&lt;/p&gt;
&lt;p&gt;
I messed around with it a lot, trying all sorts of stuff, but ended up with a quite
simple solution: the word “task” is a reserved word. For a complete list of the reserved
words, take a look at &lt;a title="http://msdn.microsoft.com/en-us/library/aa547020.aspx" href="http://msdn.microsoft.com/en-us/library/aa547020.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa547020.aspx&lt;/a&gt;.
So, basically, renaming the “task” element to “Task” or something completely different
(but still avoiding any reserved words) will work.
&lt;/p&gt;
&lt;p&gt;
Hope this helps.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=0b1ae20b-5359-4b72-901a-a3b4e472a6f4" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,0b1ae20b-5359-4b72-901a-a3b4e472a6f4.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=ae1c6c12-47fb-4d12-8737-993aa2a11d8b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,ae1c6c12-47fb-4d12-8737-993aa2a11d8b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,ae1c6c12-47fb-4d12-8737-993aa2a11d8b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=ae1c6c12-47fb-4d12-8737-993aa2a11d8b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A long time ago, I had a post about the toolbox in Visual Studio keeping old functoids
on it and crashing and stuff.
</p>
        <p>
The post can be found here: <a title="http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx" href="http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx">http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx</a> (Note
the comments).
</p>
        <p>
With this post I just wanted all to know that the path to the toolbox* file that should
be deleted on a Windows Server 2008 with visual Studio 2008 is C:\Users\&lt;User&gt;\AppData\Local\Microsoft\VisualStudio\9.0
</p>
        <p>
Hope it helps
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ae1c6c12-47fb-4d12-8737-993aa2a11d8b" />
      </body>
      <title>Toolbox failing to clear up in Visual Studio 2008</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,ae1c6c12-47fb-4d12-8737-993aa2a11d8b.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/06/ToolboxFailingToClearUpInVisualStudio2008.aspx</link>
      <pubDate>Mon, 06 Jul 2009 19:11:22 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A long time ago, I had a post about the toolbox in Visual Studio keeping old functoids
on it and crashing and stuff.
&lt;/p&gt;
&lt;p&gt;
The post can be found here: &lt;a title="http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx" href="http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx"&gt;http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx&lt;/a&gt; (Note
the comments).
&lt;/p&gt;
&lt;p&gt;
With this post I just wanted all to know that the path to the toolbox* file that should
be deleted on a Windows Server 2008 with visual Studio 2008 is C:\Users\&amp;lt;User&amp;gt;\AppData\Local\Microsoft\VisualStudio\9.0
&lt;/p&gt;
&lt;p&gt;
Hope it helps
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ae1c6c12-47fb-4d12-8737-993aa2a11d8b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,ae1c6c12-47fb-4d12-8737-993aa2a11d8b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, yesterday I had to loop through all properties on a message inside a pipeline
component.
</p>
        <p>
When you program a general pipeline component, you get an Execute method that looks
like this:
</p>
        <p>
public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
</p>
        <p>
Now, in order to loop through the properties, the common solution is like this (and
you can find this in many many blog posts around the great internet):
</p>
        <p>
for (int i = 0; i &lt;= pInMsg.CountProperties; i++) 
<br />
{ 
<br />
  string name; 
<br />
  string ns; 
<br />
  object value = pInMsg.Context.ReadAt(i, out name, out ns); 
<br />
  // Do something with the vale, name and namespace 
<br />
}
</p>
        <p>
Now, this is quite all right as it is, but there is one small pitfall that I don’t
think most people realize; The CountProperties property is a uint, meaning that it
can contain values up to 2^32 = 4294967296. Unfortunately, the first parameter to
the ReadAt method is an int, which only holds values up to (2^31) – 1 = 2147483647.
So, if there are, say 3000000000 properties, then the CountProperties property will
return the correct number of properties, but there is no way of calling the ReadAt
method to get the property.
</p>
        <p>
This is kind of silly. 
</p>
        <p>
Now, to be fair, I think that the most properties I have seen on a message ever may
have been around 40-50 properties. So there is a looooong way to 2 billion properties
:-) So in real life, I don’t expect anyone to run into this limitation – if you do,
I’ll buy you a beer! :-)
</p>
        <p>
BUT, just to be sure, what you should do to be absolutely correct in your code is
this:
</p>
        <p>
uint counter = pInMsg.CountProperties; 
<br />
string name; 
<br />
string ns; 
<br />
if (counter &gt; int.MaxValue) 
<br />
{ 
<br />
  counter = int.MaxValue; 
<br />
} 
<br />
for (int i = 0; i &lt; counter; i++) 
<br />
{ 
<br />
  object value = pInMsg.Context.ReadAt(i, out name, out ns); 
<br />
  // Do something with the vale, name and namespace 
<br />
}
</p>
        <p>
And then, off course, you should somehow notify someone that there were more properties
than you could handle – like a Debug statement, an error in the eventlog or the such…
perhaps even throw an exception BEFORE trying to enumerate the properties, sine it
would be useless, the result you get.
</p>
        <p>
Anyway… hope this is somehow a help to someone… not sure how, though :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071" />
      </body>
      <title>Weird API for MessageContext</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/06/WeirdAPIForMessageContext.aspx</link>
      <pubDate>Mon, 06 Jul 2009 17:20:41 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, yesterday I had to loop through all properties on a message inside a pipeline
component.
&lt;/p&gt;
&lt;p&gt;
When you program a general pipeline component, you get an Execute method that looks
like this:
&lt;/p&gt;
&lt;p&gt;
public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
&lt;/p&gt;
&lt;p&gt;
Now, in order to loop through the properties, the common solution is like this (and
you can find this in many many blog posts around the great internet):
&lt;/p&gt;
&lt;p&gt;
for (int i = 0; i &amp;lt;= pInMsg.CountProperties; i++) 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160; string name; 
&lt;br /&gt;
&amp;#160; string ns; 
&lt;br /&gt;
&amp;#160; object value = pInMsg.Context.ReadAt(i, out name, out ns); 
&lt;br /&gt;
&amp;#160; // Do something with the vale, name and namespace 
&lt;br /&gt;
}
&lt;/p&gt;
&lt;p&gt;
Now, this is quite all right as it is, but there is one small pitfall that I don’t
think most people realize; The CountProperties property is a uint, meaning that it
can contain values up to 2^32 = 4294967296. Unfortunately, the first parameter to
the ReadAt method is an int, which only holds values up to (2^31) – 1 = 2147483647.
So, if there are, say 3000000000 properties, then the CountProperties property will
return the correct number of properties, but there is no way of calling the ReadAt
method to get the property.
&lt;/p&gt;
&lt;p&gt;
This is kind of silly. 
&lt;/p&gt;
&lt;p&gt;
Now, to be fair, I think that the most properties I have seen on a message ever may
have been around 40-50 properties. So there is a looooong way to 2 billion properties
:-) So in real life, I don’t expect anyone to run into this limitation – if you do,
I’ll buy you a beer! :-)
&lt;/p&gt;
&lt;p&gt;
BUT, just to be sure, what you should do to be absolutely correct in your code is
this:
&lt;/p&gt;
&lt;p&gt;
uint counter = pInMsg.CountProperties; 
&lt;br /&gt;
string name; 
&lt;br /&gt;
string ns; 
&lt;br /&gt;
if (counter &amp;gt; int.MaxValue) 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160; counter = int.MaxValue; 
&lt;br /&gt;
} 
&lt;br /&gt;
for (int i = 0; i &amp;lt; counter; i++) 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160; object value = pInMsg.Context.ReadAt(i, out name, out ns); 
&lt;br /&gt;
&amp;#160; // Do something with the vale, name and namespace 
&lt;br /&gt;
}
&lt;/p&gt;
&lt;p&gt;
And then, off course, you should somehow notify someone that there were more properties
than you could handle – like a Debug statement, an error in the eventlog or the such…
perhaps even throw an exception BEFORE trying to enumerate the properties, sine it
would be useless, the result you get.
&lt;/p&gt;
&lt;p&gt;
Anyway… hope this is somehow a help to someone… not sure how, though :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,ebaecbaf-e2f6-4ed7-b6a6-71f465b1d071.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c859c8f0-05c4-434e-a79c-a111938420b6</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c859c8f0-05c4-434e-a79c-a111938420b6.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c859c8f0-05c4-434e-a79c-a111938420b6.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c859c8f0-05c4-434e-a79c-a111938420b6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
During my years on the forums, I have seen plenty, plenty and plenty more posts about
the SQL Server Adapter schema generator closing unexpectedly, without any errors or
any artifacts created.
</p>
        <p>
Today I ran into it myself for the very first time with a BizTalk 2009 installation.
I did some searching and found this post: <a title="http://support.microsoft.com/kb/917847" href="http://support.microsoft.com/kb/917847">http://support.microsoft.com/kb/917847</a> –
which only applies to BizTalk 2004 and BizTalk 2006.
</p>
        <p>
This blog post is just to let everyone know that it applies to BizTalk 2009 as well.
</p>
        <p>
Good luck out there…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c859c8f0-05c4-434e-a79c-a111938420b6" />
      </body>
      <title>SQL Server Adapter Add Generated Item Wizard closes unexpectedly</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c859c8f0-05c4-434e-a79c-a111938420b6.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/03/SQLServerAdapterAddGeneratedItemWizardClosesUnexpectedly.aspx</link>
      <pubDate>Fri, 03 Jul 2009 20:24:56 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
During my years on the forums, I have seen plenty, plenty and plenty more posts about
the SQL Server Adapter schema generator closing unexpectedly, without any errors or
any artifacts created.
&lt;/p&gt;
&lt;p&gt;
Today I ran into it myself for the very first time with a BizTalk 2009 installation.
I did some searching and found this post: &lt;a title="http://support.microsoft.com/kb/917847" href="http://support.microsoft.com/kb/917847"&gt;http://support.microsoft.com/kb/917847&lt;/a&gt; –
which only applies to BizTalk 2004 and BizTalk 2006.
&lt;/p&gt;
&lt;p&gt;
This blog post is just to let everyone know that it applies to BizTalk 2009 as well.
&lt;/p&gt;
&lt;p&gt;
Good luck out there…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c859c8f0-05c4-434e-a79c-a111938420b6" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c859c8f0-05c4-434e-a79c-a111938420b6.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=657419e8-f726-446f-b7b7-fd6bf02dc966</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,657419e8-f726-446f-b7b7-fd6bf02dc966.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,657419e8-f726-446f-b7b7-fd6bf02dc966.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=657419e8-f726-446f-b7b7-fd6bf02dc966</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all.
</p>
        <p>
So, I am very proud to be able to publish that I have been awarded the MVP title again
as of July 1’st. This, naturally is a great honor and I am rally happy about it.
</p>
        <p>
Not sure I am as happy about it as <a href="http://biztalkmessages.vansplunteren.net/" target="_blank">Randal
van Splunteren</a>, though – because he promised some weeks ago, that if I didn’t
get reawarded he would eat his shorts, shoes, hat or something – can’t remember which
one, but it is in my log! :-)
</p>
        <p>
The MVP title has lots of advantages, naturally – the title, the prestige, the gifts,
the monthly webcasts and what not, but mainly I am happy that I do not have to bother
removing the MVP logo from my blog, web site, business cards, et cetera .-)
</p>
        <p>
Anyway, this is my third MVP title – going for the fourth in a year! :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=657419e8-f726-446f-b7b7-fd6bf02dc966" />
      </body>
      <title>MVP once again :-)</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,657419e8-f726-446f-b7b7-fd6bf02dc966.aspx</guid>
      <link>http://blog.eliasen.dk/2009/07/02/MVPOnceAgain.aspx</link>
      <pubDate>Thu, 02 Jul 2009 04:35:50 GMT</pubDate>
      <description>&lt;p&gt;
Hi all.
&lt;/p&gt;
&lt;p&gt;
So, I am very proud to be able to publish that I have been awarded the MVP title again
as of July 1’st. This, naturally is a great honor and I am rally happy about it.
&lt;/p&gt;
&lt;p&gt;
Not sure I am as happy about it as &lt;a href="http://biztalkmessages.vansplunteren.net/" target="_blank"&gt;Randal
van Splunteren&lt;/a&gt;, though – because he promised some weeks ago, that if I didn’t
get reawarded he would eat his shorts, shoes, hat or something – can’t remember which
one, but it is in my log! :-)
&lt;/p&gt;
&lt;p&gt;
The MVP title has lots of advantages, naturally – the title, the prestige, the gifts,
the monthly webcasts and what not, but mainly I am happy that I do not have to bother
removing the MVP logo from my blog, web site, business cards, et cetera .-)
&lt;/p&gt;
&lt;p&gt;
Anyway, this is my third MVP title – going for the fourth in a year! :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=657419e8-f726-446f-b7b7-fd6bf02dc966" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,657419e8-f726-446f-b7b7-fd6bf02dc966.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A friend and colleague of mine has just release SolZip version 1.1 on CodePlex – Find
it here: <a title="http://solzip.codeplex.com/" href="http://solzip.codeplex.com/">http://solzip.codeplex.com/</a>.
</p>
        <p>
Basically, it is a nifty way of zipping a Visual Studio 2008 C# solution. The utility
is pointed towards the .sln file and then zips all files in the solution and projects
into one zip file.
</p>
        <p>
To me this is really nice, because as of BizTalk 2009, the project files are just
specialized C# projects and therefore, it seems to work just fine for BizTalk 2009
solutions as well. I can use it when blogging to quickly zip up a solution to attach
to a blog post without having to zip the entire folder and then deleting the large
dll files and other silly stuff. SolZip just takes what is necessary.
</p>
        <p>
I was the very first downloader of the 1.1 version – you should go download it now!
:-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1" />
      </body>
      <title>SolZip version 1.1 has been released</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1.aspx</guid>
      <link>http://blog.eliasen.dk/2009/06/30/SolZipVersion11HasBeenReleased.aspx</link>
      <pubDate>Tue, 30 Jun 2009 20:02:39 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A friend and colleague of mine has just release SolZip version 1.1 on CodePlex – Find
it here: &lt;a title="http://solzip.codeplex.com/" href="http://solzip.codeplex.com/"&gt;http://solzip.codeplex.com/&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Basically, it is a nifty way of zipping a Visual Studio 2008 C# solution. The utility
is pointed towards the .sln file and then zips all files in the solution and projects
into one zip file.
&lt;/p&gt;
&lt;p&gt;
To me this is really nice, because as of BizTalk 2009, the project files are just
specialized C# projects and therefore, it seems to work just fine for BizTalk 2009
solutions as well. I can use it when blogging to quickly zip up a solution to attach
to a blog post without having to zip the entire folder and then deleting the large
dll files and other silly stuff. SolZip just takes what is necessary.
&lt;/p&gt;
&lt;p&gt;
I was the very first downloader of the 1.1 version – you should go download it now!
:-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,9dcdce26-e1c9-4a44-89b6-69e6b0afdbd1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f491e150-12fe-48b1-8f35-da81535d5b0f</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f491e150-12fe-48b1-8f35-da81535d5b0f.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f491e150-12fe-48b1-8f35-da81535d5b0f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f491e150-12fe-48b1-8f35-da81535d5b0f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Recently, I posted a post about handling mapping to and from a comma separated list.
You can find it at <a title="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx" href="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx">http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx</a></p>
        <p>
I came to think that this was actually also a great opportunity for me to develop
my first cumulative functoid. The functoid is then supposed to take the values as
input and output the list of values with a comma in between them.
</p>
        <p>
The functoid has been developed and added to my functoid library at <a href="http://eebiztalkfunctoids.codeplex.com">http://eebiztalkfunctoids.codeplex.com</a> –
free to download. Also another functoid in the library, which has been there for a
while is the “CSV Extract” functoid which extracts a specific position from a separated
list.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f491e150-12fe-48b1-8f35-da81535d5b0f" />
      </body>
      <title>Handling comma separated values inside a map, part II</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f491e150-12fe-48b1-8f35-da81535d5b0f.aspx</guid>
      <link>http://blog.eliasen.dk/2009/06/27/HandlingCommaSeparatedValuesInsideAMapPartII.aspx</link>
      <pubDate>Sat, 27 Jun 2009 22:58:34 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Recently, I posted a post about handling mapping to and from a comma separated list.
You can find it at &lt;a title="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx" href="http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx"&gt;http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I came to think that this was actually also a great opportunity for me to develop
my first cumulative functoid. The functoid is then supposed to take the values as
input and output the list of values with a comma in between them.
&lt;/p&gt;
&lt;p&gt;
The functoid has been developed and added to my functoid library at &lt;a href="http://eebiztalkfunctoids.codeplex.com"&gt;http://eebiztalkfunctoids.codeplex.com&lt;/a&gt; –
free to download. Also another functoid in the library, which has been there for a
while is the “CSV Extract” functoid which extracts a specific position from a separated
list.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f491e150-12fe-48b1-8f35-da81535d5b0f" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f491e150-12fe-48b1-8f35-da81535d5b0f.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=26844fc8-d179-4048-ab48-184dade0ffd9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,26844fc8-d179-4048-ab48-184dade0ffd9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,26844fc8-d179-4048-ab48-184dade0ffd9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=26844fc8-d179-4048-ab48-184dade0ffd9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Some times people need to convert a list of elements into a comma separated list of
values. In the forums this questions arises every now and then, so here goes a solution.
</p>
        <p>
Suppose this input:
</p>
        <p>
&lt;ns0:MultipleElementsRoot xmlns:ns0="<a href="http://MapCommaSeparatedValue.MultipleElementsSchema&quot;">http://MapCommaSeparatedValue.MultipleElementsSchema"</a>&gt; 
<br />
  &lt;MyField&gt;Jan&lt;/MyField&gt; 
<br />
  &lt;MyField&gt;Eliasen&lt;/MyField&gt; 
<br />
  &lt;MyField&gt;BizTalk&lt;/MyField&gt; 
<br />
&lt;/ns0:MultipleElementsRoot&gt;
</p>
        <p>
And I want this output:
</p>
        <p>
&lt;ns0:CommaSeparatedRoot xmlns:ns0="<a href="http://MapCommaSeparatedValue.CommaSeparatedSchema&quot;">http://MapCommaSeparatedValue.CommaSeparatedSchema"</a>&gt; 
<br />
  &lt;CommaField&gt;Jan,Eliasen,BizTalk&lt;/CommaField&gt; 
<br />
&lt;/ns0:CommaSeparatedRoot&gt;
</p>
        <p>
Inside a map I would handle it like this (2 approached, that share the first two functoids):
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/multipletocomma_1.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="multipletocomma" border="0" alt="multipletocomma" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/multipletocomma_thumb_1.jpg" width="647" height="129" />
          </a>
        </p>
        <p>
The reoccurring element is used as input to a string concatenate functoid. The functoid
takes a comma as the second input. The output of the concatenate functoid is then
used as input for a cumulative concatenate functoid, effectively creating a comma
separated list of values. The issue with this list is, that it will have a comma at
the end of the line, which needs to be removed.
</p>
        <p>
One way of doing this is to use three functoids to pull this last comma away. First,
I take the length of the string, then I subtract one from that, and use the string
extract functoid to extract the string beginning at position 1 and ending at (length
- 1) and send that to the destination element. Works like a charm.
</p>
        <p>
Now, plenty of people out there (Henrik, you know who you are) would have no moral
qualms using a C# scripting functoid to get rid of the extra comma. Like this: 
</p>
        <p>
public string RemoveLastComma(string input) 
<br />
{ 
<br />
  return input.Substring(0, input.Length-1); 
<br />
}
</p>
        <p>
That one scripting functoid would eliminate the last three functoids I added to remove
the last comma. But I still prefer the functoid way of doing it, mostly for maintenance
reasons. A new BizTalk developer looking at a map with lots of scripting functoids
has no idea what is happening, and even after looking at the code in all the scripting
functoids, he can’t remember what is happening in more than a couple of them. In my
opinion; Always use the built-in functoids if possible.
</p>
        <p>
Now, just for the kick, I thought that some times the opposite could be the case –
going from a comma separated list to lots of elements. This, I cannot solve using
built-in functoids, unfortunately, so the map ended up like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/commatomultiple.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="commatomultiple" border="0" alt="commatomultiple" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/commatomultiple_thumb.jpg" width="501" height="101" />
          </a>
        </p>
        <p>
Just one scripting functoid. The type is an “Inline XSLT Call Template” and the script
is:
</p>
        <p>
&lt;xsl:template name="MyXsltSplitTemplate"&gt; 
<br />
  &lt;xsl:param name="param1" /&gt; 
<br />
  &lt;xsl:if test="$param1 != ''"&gt; 
<br />
    &lt;xsl:element name="MyField"&gt; 
<br />
      &lt;xsl:choose&gt; 
<br />
        &lt;xsl:when test="contains($param1,
',')"&gt; 
<br />
          &lt;xsl:value-of select="substring-before($param1,
',')" /&gt; 
<br />
        &lt;/xsl:when&gt; 
<br />
        &lt;xsl:otherwise&gt; 
<br />
          &lt;xsl:value-of select="$param1"
/&gt; 
<br />
        &lt;/xsl:otherwise&gt; 
<br />
      &lt;/xsl:choose&gt; 
<br />
    &lt;/xsl:element&gt; 
<br />
    &lt;xsl:call-template name="MyXsltSplitTemplate"&gt; 
<br />
      &lt;xsl:with-param name="param1" select="substring-after($param1,
',')" /&gt; 
<br />
    &lt;/xsl:call-template&gt; 
<br />
  &lt;/xsl:if&gt; 
<br />
&lt;/xsl:template&gt;
</p>
        <p>
Basically, the function substring-before is used to get any string before a comma
and output it. If no comma is in the string, the string is output. The string to the
right of a comma is then used as a recursive call to the same template. Again; Works
like a charm :-)
</p>
        <p>
So, with any luck, this question can be answered by googling soon instead of asking
in the forums :-)
</p>
        <p>
Edit on 27’th June: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:11517035-f269-4b8a-b4a1-317d9ea632c0" class="wlWriterEditableSmartContent">
          <p>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/MapCommaSeparatedValue.zip" target="_blank">Project
download</a>
          </p>
        </div>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=26844fc8-d179-4048-ab48-184dade0ffd9" />
      </body>
      <title>Handling comma separated values inside a map, part I</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,26844fc8-d179-4048-ab48-184dade0ffd9.aspx</guid>
      <link>http://blog.eliasen.dk/2009/06/22/HandlingCommaSeparatedValuesInsideAMapPartI.aspx</link>
      <pubDate>Mon, 22 Jun 2009 20:55:08 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Some times people need to convert a list of elements into a comma separated list of
values. In the forums this questions arises every now and then, so here goes a solution.
&lt;/p&gt;
&lt;p&gt;
Suppose this input:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:MultipleElementsRoot xmlns:ns0=&amp;quot;&lt;a href="http://MapCommaSeparatedValue.MultipleElementsSchema&amp;quot;"&gt;http://MapCommaSeparatedValue.MultipleElementsSchema&amp;quot;&lt;/a&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;MyField&amp;gt;Jan&amp;lt;/MyField&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;MyField&amp;gt;Eliasen&amp;lt;/MyField&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;MyField&amp;gt;BizTalk&amp;lt;/MyField&amp;gt; 
&lt;br /&gt;
&amp;lt;/ns0:MultipleElementsRoot&amp;gt;
&lt;/p&gt;
&lt;p&gt;
And I want this output:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:CommaSeparatedRoot xmlns:ns0=&amp;quot;&lt;a href="http://MapCommaSeparatedValue.CommaSeparatedSchema&amp;quot;"&gt;http://MapCommaSeparatedValue.CommaSeparatedSchema&amp;quot;&lt;/a&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;CommaField&amp;gt;Jan,Eliasen,BizTalk&amp;lt;/CommaField&amp;gt; 
&lt;br /&gt;
&amp;lt;/ns0:CommaSeparatedRoot&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Inside a map I would handle it like this (2 approached, that share the first two functoids):
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/multipletocomma_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="multipletocomma" border="0" alt="multipletocomma" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/multipletocomma_thumb_1.jpg" width="647" height="129" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The reoccurring element is used as input to a string concatenate functoid. The functoid
takes a comma as the second input. The output of the concatenate functoid is then
used as input for a cumulative concatenate functoid, effectively creating a comma
separated list of values. The issue with this list is, that it will have a comma at
the end of the line, which needs to be removed.
&lt;/p&gt;
&lt;p&gt;
One way of doing this is to use three functoids to pull this last comma away. First,
I take the length of the string, then I subtract one from that, and use the string
extract functoid to extract the string beginning at position 1 and ending at (length
- 1) and send that to the destination element. Works like a charm.
&lt;/p&gt;
&lt;p&gt;
Now, plenty of people out there (Henrik, you know who you are) would have no moral
qualms using a C# scripting functoid to get rid of the extra comma. Like this: 
&lt;/p&gt;
&lt;p&gt;
public string RemoveLastComma(string input) 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160; return input.Substring(0, input.Length-1); 
&lt;br /&gt;
}
&lt;/p&gt;
&lt;p&gt;
That one scripting functoid would eliminate the last three functoids I added to remove
the last comma. But I still prefer the functoid way of doing it, mostly for maintenance
reasons. A new BizTalk developer looking at a map with lots of scripting functoids
has no idea what is happening, and even after looking at the code in all the scripting
functoids, he can’t remember what is happening in more than a couple of them. In my
opinion; Always use the built-in functoids if possible.
&lt;/p&gt;
&lt;p&gt;
Now, just for the kick, I thought that some times the opposite could be the case –
going from a comma separated list to lots of elements. This, I cannot solve using
built-in functoids, unfortunately, so the map ended up like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/commatomultiple.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="commatomultiple" border="0" alt="commatomultiple" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/commatomultiple_thumb.jpg" width="501" height="101" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Just one scripting functoid. The type is an “Inline XSLT Call Template” and the script
is:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;xsl:template name=&amp;quot;MyXsltSplitTemplate&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;xsl:param name=&amp;quot;param1&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;xsl:if test=&amp;quot;$param1 != ''&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:element name=&amp;quot;MyField&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:choose&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:when test=&amp;quot;contains($param1,
',')&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:value-of select=&amp;quot;substring-before($param1,
',')&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsl:when&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:otherwise&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:value-of select=&amp;quot;$param1&amp;quot;
/&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsl:otherwise&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsl:choose&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:call-template name=&amp;quot;MyXsltSplitTemplate&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xsl:with-param name=&amp;quot;param1&amp;quot; select=&amp;quot;substring-after($param1,
',')&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xsl:call-template&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/xsl:if&amp;gt; 
&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Basically, the function substring-before is used to get any string before a comma
and output it. If no comma is in the string, the string is output. The string to the
right of a comma is then used as a recursive call to the same template. Again; Works
like a charm :-)
&lt;/p&gt;
&lt;p&gt;
So, with any luck, this question can be answered by googling soon instead of asking
in the forums :-)
&lt;/p&gt;
&lt;p&gt;
Edit on 27’th June: 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:11517035-f269-4b8a-b4a1-317d9ea632c0" class="wlWriterEditableSmartContent"&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Handlingcommaseparatedvaluesinsideamappa_1424A/MapCommaSeparatedValue.zip" target="_blank"&gt;Project
download&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=26844fc8-d179-4048-ab48-184dade0ffd9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,26844fc8-d179-4048-ab48-184dade0ffd9.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=19e325a5-ff8e-47a6-9fbd-d35ef3ac4313</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,19e325a5-ff8e-47a6-9fbd-d35ef3ac4313.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,19e325a5-ff8e-47a6-9fbd-d35ef3ac4313.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=19e325a5-ff8e-47a6-9fbd-d35ef3ac4313</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have received numeral questions from people getting a compile time error when compiling
an orchestration that assigns a distinguished field of type xs:integer to a variable
of type int32. Without looking into anything, you would expect this would work.
</p>
        <p>
So lets say that we have a schema like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Assigningthevalueofanxsintegertoanintege_13164/schema.jpg">
            <img title="schema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="90" alt="schema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Assigningthevalueofanxsintegertoanintege_13164/schema_thumb.jpg" width="135" border="0" />
          </a>
        </p>
        <p>
with this XSD:
</p>
        <p>
&lt;?xml version="1.0" encoding="utf-16"?&gt; 
<br />
&lt;xs:schema xmlns:b="<a href="http://schemas.microsoft.com/BizTalk/2003&quot;">http://schemas.microsoft.com/BizTalk/2003"</a> xmlns="<a href="http://IntegerDecimal.InputSchema&quot;">http://IntegerDecimal.InputSchema"</a> targetNamespace="<a href="http://IntegerDecimal.InputSchema&quot;">http://IntegerDecimal.InputSchema"</a> xmlns:xs="<a href="http://www.w3.org/2001/XMLSchema&quot;">http://www.w3.org/2001/XMLSchema"</a>&gt; 
<br />
  &lt;xs:element name="InputRoot"&gt; 
<br />
    &lt;xs:annotation&gt; 
<br />
      &lt;xs:appinfo&gt; 
<br />
        &lt;b:properties&gt; 
<br />
          &lt;b:property distinguished="true"
xpath="/*[local-name()='InputRoot' and namespace-uri()='<a href="http://IntegerDecimal.InputSchema']/*[local-name()='MyInteger'">http://IntegerDecimal.InputSchema']/*[local-name()='MyInteger'</a> and
namespace-uri()='']" /&gt; 
<br />
        &lt;/b:properties&gt; 
<br />
      &lt;/xs:appinfo&gt; 
<br />
    &lt;/xs:annotation&gt; 
<br />
    &lt;xs:complexType&gt; 
<br />
      &lt;xs:sequence&gt; 
<br />
        &lt;xs:element name="MyInteger"
type="xs:integer" /&gt; 
<br />
      &lt;/xs:sequence&gt; 
<br />
    &lt;/xs:complexType&gt; 
<br />
  &lt;/xs:element&gt; 
<br />
&lt;/xs:schema&gt;
</p>
        <p>
As you can see, it is a simple schema and the “MyInteger” field is of type xs:integer
and it is marked as a distinguished field.
</p>
        <p>
In my orchestration, I have a variable of type int32 called “MyInt” and in an expression
shape I do this:
</p>
        <p>
MyInt = InputMessage.MyInteger;
</p>
        <p>
and it fails, which is quite surprising at first glance. At compile time I just get
this: "The expression that you have entered is not valid.". That doesn’t
help, so looking at my expression shape and reading the mouse over on the error in
the expression shape I get this: “cannot implicitly convert type ‘System.Decimal’
to ‘System.Int32’”. Changing the line in the expression shape to this:
</p>
        <p>
MyInt = System.Convert.ToInt32(InputMessage.MyInteger); 
</p>
        <p>
will make it work, because now you are explicitly casting the value to an integer.
</p>
        <p>
The first times I saw this error, I thought that the compiler had an error, because
I thought I was assigning an integer the value of another integer. It turns out, though,
that I wasn’t really – only sort of…
</p>
        <p>
If you look here: <a title="http://www.w3.org/TR/xmlschema-2/#integer" href="http://www.w3.org/TR/xmlschema-2/#integer">http://www.w3.org/TR/xmlschema-2/#integer</a> you
can see that the xs:integer type is actually a decimal type restricted to whole numbers.
So the compiler actually thinks the field is a decimal and not an integer.
</p>
        <p>
This is kind of silly, since the data type IS restricted to whole numbers. The actual
error should be that the xs:integer can contain the number 4567234987623409763546387623476149823497862354845
which really is way to large for an int variable in an orchestration.
</p>
        <p>
Anyway, the way to handle this is, naturally, to avoid the xs:integer type if possible
and use the xs:int (or variants of this) instead. Sometimes it is needed, though,
and in that case you just need to declare your variables of a type that will be able
to contain all the possible values you receive. This can be an Int16 sometimes, if
the people who have created the schema just didn’t know what the xs:integer type is.
Sometimes the values received will be too large even for an Int64 variable, then consider
using a decimal, a string or some other data type.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=19e325a5-ff8e-47a6-9fbd-d35ef3ac4313" />
      </body>
      <title>Assigning the value of an xs:integer to an integer faling</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,19e325a5-ff8e-47a6-9fbd-d35ef3ac4313.aspx</guid>
      <link>http://blog.eliasen.dk/2009/06/13/AssigningTheValueOfAnXsintegerToAnIntegerFaling.aspx</link>
      <pubDate>Sat, 13 Jun 2009 19:43:03 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have received numeral questions from people getting a compile time error when compiling
an orchestration that assigns a distinguished field of type xs:integer to a variable
of type int32. Without looking into anything, you would expect this would work.
&lt;/p&gt;
&lt;p&gt;
So lets say that we have a schema like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Assigningthevalueofanxsintegertoanintege_13164/schema.jpg"&gt;&lt;img title="schema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="90" alt="schema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Assigningthevalueofanxsintegertoanintege_13164/schema_thumb.jpg" width="135" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
with this XSD:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-16&amp;quot;?&amp;gt; 
&lt;br /&gt;
&amp;lt;xs:schema xmlns:b=&amp;quot;&lt;a href="http://schemas.microsoft.com/BizTalk/2003&amp;quot;"&gt;http://schemas.microsoft.com/BizTalk/2003&amp;quot;&lt;/a&gt; xmlns=&amp;quot;&lt;a href="http://IntegerDecimal.InputSchema&amp;quot;"&gt;http://IntegerDecimal.InputSchema&amp;quot;&lt;/a&gt; targetNamespace=&amp;quot;&lt;a href="http://IntegerDecimal.InputSchema&amp;quot;"&gt;http://IntegerDecimal.InputSchema&amp;quot;&lt;/a&gt; xmlns:xs=&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema&amp;quot;"&gt;http://www.w3.org/2001/XMLSchema&amp;quot;&lt;/a&gt;&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;xs:element name=&amp;quot;InputRoot&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:annotation&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:appinfo&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;b:properties&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;b:property distinguished=&amp;quot;true&amp;quot;
xpath=&amp;quot;/*[local-name()='InputRoot' and namespace-uri()='&lt;a href="http://IntegerDecimal.InputSchema']/*[local-name()='MyInteger'"&gt;http://IntegerDecimal.InputSchema']/*[local-name()='MyInteger'&lt;/a&gt; and
namespace-uri()='']&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/b:properties&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:appinfo&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:annotation&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:complexType&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:sequence&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;xs:element name=&amp;quot;MyInteger&amp;quot;
type=&amp;quot;xs:integer&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:sequence&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;/xs:complexType&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/xs:element&amp;gt; 
&lt;br /&gt;
&amp;lt;/xs:schema&amp;gt;
&lt;/p&gt;
&lt;p&gt;
As you can see, it is a simple schema and the “MyInteger” field is of type xs:integer
and it is marked as a distinguished field.
&lt;/p&gt;
&lt;p&gt;
In my orchestration, I have a variable of type int32 called “MyInt” and in an expression
shape I do this:
&lt;/p&gt;
&lt;p&gt;
MyInt = InputMessage.MyInteger;
&lt;/p&gt;
&lt;p&gt;
and it fails, which is quite surprising at first glance. At compile time I just get
this: &amp;quot;The expression that you have entered is not valid.&amp;quot;. That doesn’t
help, so looking at my expression shape and reading the mouse over on the error in
the expression shape I get this: “cannot implicitly convert type ‘System.Decimal’
to ‘System.Int32’”. Changing the line in the expression shape to this:
&lt;/p&gt;
&lt;p&gt;
MyInt = System.Convert.ToInt32(InputMessage.MyInteger); 
&lt;/p&gt;
&lt;p&gt;
will make it work, because now you are explicitly casting the value to an integer.
&lt;/p&gt;
&lt;p&gt;
The first times I saw this error, I thought that the compiler had an error, because
I thought I was assigning an integer the value of another integer. It turns out, though,
that I wasn’t really – only sort of…
&lt;/p&gt;
&lt;p&gt;
If you look here: &lt;a title="http://www.w3.org/TR/xmlschema-2/#integer" href="http://www.w3.org/TR/xmlschema-2/#integer"&gt;http://www.w3.org/TR/xmlschema-2/#integer&lt;/a&gt; you
can see that the xs:integer type is actually a decimal type restricted to whole numbers.
So the compiler actually thinks the field is a decimal and not an integer.
&lt;/p&gt;
&lt;p&gt;
This is kind of silly, since the data type IS restricted to whole numbers. The actual
error should be that the xs:integer can contain the number 4567234987623409763546387623476149823497862354845
which really is way to large for an int variable in an orchestration.
&lt;/p&gt;
&lt;p&gt;
Anyway, the way to handle this is, naturally, to avoid the xs:integer type if possible
and use the xs:int (or variants of this) instead. Sometimes it is needed, though,
and in that case you just need to declare your variables of a type that will be able
to contain all the possible values you receive. This can be an Int16 sometimes, if
the people who have created the schema just didn’t know what the xs:integer type is.
Sometimes the values received will be too large even for an Int64 variable, then consider
using a decimal, a string or some other data type.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=19e325a5-ff8e-47a6-9fbd-d35ef3ac4313" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,19e325a5-ff8e-47a6-9fbd-d35ef3ac4313.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=fb7978f5-c0a8-4efa-bf27-6492124847b2</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,fb7978f5-c0a8-4efa-bf27-6492124847b2.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,fb7978f5-c0a8-4efa-bf27-6492124847b2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=fb7978f5-c0a8-4efa-bf27-6492124847b2</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, the other day, a guy asked a question on the online forums, and another guy tried
helping out by stating, among other things, that the maps on receive ports are executed
before the receive pipeline. This isn’t true, and I posted a post, where I tried to
explain how things work. This ended up being slightly wrong, so I posted a correction,
but now it seems I need to post another correction… and I ended up writing this post
to explain how stuff works.
</p>
        <p>
First of all, let me set one thing straight; When a message arrives on a receive location
it is first sent through the receive pipeline that is specified on the receive location.
This is needed before the map for several reasons, including converting the input
to XML and promoting the MessageType, so the receive port can choose the correct map
to execute. The receive pipeline also promotes all the distinguished fields and promoted
properties that are specified on the schema.
</p>
        <p>
Now, after the map has finished executing, the transformation engine will look up
the schema for the output and it will instantiate the XMLDisassembler with this particular
schema, so the disassembler doesn’t have to find the correct schema itself. After
instantiating it, it will call it, so the XMLDisassembler will read the output from
the map and promote all distinguished fields and promoted properties to the context
of the message. Also, before doing the promotion, it will copy all the context from
the original message, so you get all the properties from the adapter and so on copied
to the destination message.
</p>
        <p>
Now, there are a couple of issues to this, which most people don’t realize – mostly
because they will only affect you on very very rare occasions:
</p>
        <p>
          <strong>Distinguished fields 
<br /></strong>I found that if you have an input message with a field marked as a distinguished
field and then look at the context of the output from the map, then the output message
also has the distinguished field from the input message in its context which really
doesn't make sense, since you can't use it in any way. This has NO influence at runtime
and NO influence at design time, so you will go through your life not realizing it.
Also, usually we don’t set distinguished fields on the external schemas, because we
don’t want to change them and because we don’t want to use schemas exposed to trading
partners in our business processes, which is the only place we can use the distinguished
fields.
</p>
        <p>
          <strong>Promoted Properties 
<br /></strong>If you have promoted a field from both input and destination schema to the
same property, the value from input schema in the properties is overwritten by the
value from the destination schema after the map. For the same reasons as for the distinguished
fields, we rarely have promoted properties on the external schemas, and therefore
you probably will never have an issue with this.
</p>
        <p>
          <strong>Envelopes 
<br /></strong>IF the schema for the destination message is marked as an envelope, the message
will fail. This is because the disassembler will recognize the schema is an envelope
and it will then debatch the message into several messages. Only the first is returned
though, since the mapping engine which is calling the disassembler assumes this is
not an envelope and therefore will only call the GetNext method once, whereas normally
the GetNext emthod is called until it returns null. This first message is then looked
at, but in the properties for the disassembler, the transformation engine has all
ready set the only allowed schema, which was the envelope schema. So the disassembler
only has the envelope schema as a possible schema, and the instance that comes out
after debatching is not the output from the map anymore, meaning that it will fail
with the standard error message “Details:"Document type "http://MyNameSpace.com#Record"
does not match any of the given schemas."” As with the first to issues about
distinguished fields and promoted properties, this should practically never happen,
since you are most likely mapping the incoming message to some internal schema, for
which there is usually no reason to mark as an envelope.
</p>
        <p>
          <strong>Conclusion 
<br /></strong>So, basically, when a message arrives, the receive pipeline is executed,
then the map is executed and at the end, the XML disassembler is executed by the transformation
engine to get all promoted fields in the destination message promoted. There are a
couple of known issues with this, but they are either totally unimportant or very
unlikely to occur.
</p>
        <p>
I hope this helps someone out there.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=fb7978f5-c0a8-4efa-bf27-6492124847b2" />
      </body>
      <title>Promoting values from destination schema of map on receive port</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,fb7978f5-c0a8-4efa-bf27-6492124847b2.aspx</guid>
      <link>http://blog.eliasen.dk/2009/06/10/PromotingValuesFromDestinationSchemaOfMapOnReceivePort.aspx</link>
      <pubDate>Wed, 10 Jun 2009 23:30:19 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, the other day, a guy asked a question on the online forums, and another guy tried
helping out by stating, among other things, that the maps on receive ports are executed
before the receive pipeline. This isn’t true, and I posted a post, where I tried to
explain how things work. This ended up being slightly wrong, so I posted a correction,
but now it seems I need to post another correction… and I ended up writing this post
to explain how stuff works.
&lt;/p&gt;
&lt;p&gt;
First of all, let me set one thing straight; When a message arrives on a receive location
it is first sent through the receive pipeline that is specified on the receive location.
This is needed before the map for several reasons, including converting the input
to XML and promoting the MessageType, so the receive port can choose the correct map
to execute. The receive pipeline also promotes all the distinguished fields and promoted
properties that are specified on the schema.
&lt;/p&gt;
&lt;p&gt;
Now, after the map has finished executing, the transformation engine will look up
the schema for the output and it will instantiate the XMLDisassembler with this particular
schema, so the disassembler doesn’t have to find the correct schema itself. After
instantiating it, it will call it, so the XMLDisassembler will read the output from
the map and promote all distinguished fields and promoted properties to the context
of the message. Also, before doing the promotion, it will copy all the context from
the original message, so you get all the properties from the adapter and so on copied
to the destination message.
&lt;/p&gt;
&lt;p&gt;
Now, there are a couple of issues to this, which most people don’t realize – mostly
because they will only affect you on very very rare occasions:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Distinguished fields 
&lt;br /&gt;
&lt;/strong&gt;I found that if you have an input message with a field marked as a distinguished
field and then look at the context of the output from the map, then the output message
also has the distinguished field from the input message in its context which really
doesn't make sense, since you can't use it in any way. This has NO influence at runtime
and NO influence at design time, so you will go through your life not realizing it.
Also, usually we don’t set distinguished fields on the external schemas, because we
don’t want to change them and because we don’t want to use schemas exposed to trading
partners in our business processes, which is the only place we can use the distinguished
fields.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Promoted Properties 
&lt;br /&gt;
&lt;/strong&gt;If you have promoted a field from both input and destination schema to the
same property, the value from input schema in the properties is overwritten by the
value from the destination schema after the map. For the same reasons as for the distinguished
fields, we rarely have promoted properties on the external schemas, and therefore
you probably will never have an issue with this.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Envelopes 
&lt;br /&gt;
&lt;/strong&gt;IF the schema for the destination message is marked as an envelope, the message
will fail. This is because the disassembler will recognize the schema is an envelope
and it will then debatch the message into several messages. Only the first is returned
though, since the mapping engine which is calling the disassembler assumes this is
not an envelope and therefore will only call the GetNext method once, whereas normally
the GetNext emthod is called until it returns null. This first message is then looked
at, but in the properties for the disassembler, the transformation engine has all
ready set the only allowed schema, which was the envelope schema. So the disassembler
only has the envelope schema as a possible schema, and the instance that comes out
after debatching is not the output from the map anymore, meaning that it will fail
with the standard error message “Details:&amp;quot;Document type &amp;quot;http://MyNameSpace.com#Record&amp;quot;
does not match any of the given schemas.&amp;quot;” As with the first to issues about
distinguished fields and promoted properties, this should practically never happen,
since you are most likely mapping the incoming message to some internal schema, for
which there is usually no reason to mark as an envelope.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Conclusion 
&lt;br /&gt;
&lt;/strong&gt;So, basically, when a message arrives, the receive pipeline is executed,
then the map is executed and at the end, the XML disassembler is executed by the transformation
engine to get all promoted fields in the destination message promoted. There are a
couple of known issues with this, but they are either totally unimportant or very
unlikely to occur.
&lt;/p&gt;
&lt;p&gt;
I hope this helps someone out there.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=fb7978f5-c0a8-4efa-bf27-6492124847b2" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,fb7978f5-c0a8-4efa-bf27-6492124847b2.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=b45787d9-f2dc-46d2-89ab-0dbe219ca999</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,b45787d9-f2dc-46d2-89ab-0dbe219ca999.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,b45787d9-f2dc-46d2-89ab-0dbe219ca999.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=b45787d9-f2dc-46d2-89ab-0dbe219ca999</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just a quick book review, since I have just read the “<a href="http://www.whomovedmycheese.com/" target="_blank">Who
moved my Cheese</a>” book.
</p>
        <p>
It only takes like an hour to read, and it is the story of two mice and two people
who are searching for cheese, where the cheese is a metaphor for something you really
want to have. At some point, they run out of cheese, and the four characters take
very different approaches to the changes in the environment. The point of the story
is, naturally, that you can most likely identify yourself as one of the characters
and after reading the book, perhaps you have learnt something about how you react
to changes and how you <strong>should</strong> react – and hopefully improve your
life.
</p>
        <p>
Easily read with lots of points. Read it…
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b45787d9-f2dc-46d2-89ab-0dbe219ca999" />
      </body>
      <title>Who moved my cheese?</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,b45787d9-f2dc-46d2-89ab-0dbe219ca999.aspx</guid>
      <link>http://blog.eliasen.dk/2009/06/06/WhoMovedMyCheese.aspx</link>
      <pubDate>Sat, 06 Jun 2009 16:49:05 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just a quick book review, since I have just read the “&lt;a href="http://www.whomovedmycheese.com/" target="_blank"&gt;Who
moved my Cheese&lt;/a&gt;” book.
&lt;/p&gt;
&lt;p&gt;
It only takes like an hour to read, and it is the story of two mice and two people
who are searching for cheese, where the cheese is a metaphor for something you really
want to have. At some point, they run out of cheese, and the four characters take
very different approaches to the changes in the environment. The point of the story
is, naturally, that you can most likely identify yourself as one of the characters
and after reading the book, perhaps you have learnt something about how you react
to changes and how you &lt;strong&gt;should&lt;/strong&gt; react – and hopefully improve your
life.
&lt;/p&gt;
&lt;p&gt;
Easily read with lots of points. Read it…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b45787d9-f2dc-46d2-89ab-0dbe219ca999" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,b45787d9-f2dc-46d2-89ab-0dbe219ca999.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=5ca4581e-288f-435b-843b-16a1cb23ddc1</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,5ca4581e-288f-435b-843b-16a1cb23ddc1.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,5ca4581e-288f-435b-843b-16a1cb23ddc1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=5ca4581e-288f-435b-843b-16a1cb23ddc1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just to let you all know, I have updated the documentation for my pipeline component
library at <a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/">http://eebiztalkpipelinecom.codeplex.com/</a> and
the documentation for my functoid library at <a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/">http://eebiztalkfunctoids.codeplex.com/</a></p>
        <p>
Happy reading :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=5ca4581e-288f-435b-843b-16a1cb23ddc1" />
      </body>
      <title>Updated documentation for my BizTalk artifacts</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,5ca4581e-288f-435b-843b-16a1cb23ddc1.aspx</guid>
      <link>http://blog.eliasen.dk/2009/05/24/UpdatedDocumentationForMyBizTalkArtifacts.aspx</link>
      <pubDate>Sun, 24 May 2009 18:48:59 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just to let you all know, I have updated the documentation for my pipeline component
library at &lt;a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/"&gt;http://eebiztalkpipelinecom.codeplex.com/&lt;/a&gt; and
the documentation for my functoid library at &lt;a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/"&gt;http://eebiztalkfunctoids.codeplex.com/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Happy reading :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=5ca4581e-288f-435b-843b-16a1cb23ddc1" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,5ca4581e-288f-435b-843b-16a1cb23ddc1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=59ebbf36-5511-489f-9a89-0e77367f0555</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,59ebbf36-5511-489f-9a89-0e77367f0555.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,59ebbf36-5511-489f-9a89-0e77367f0555.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=59ebbf36-5511-489f-9a89-0e77367f0555</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Saravana Kumar has launched version two of his great site <a href="http://www.biztalk247.com">http://www.biztalk247.com</a> –
it has loads of nice information about BizTalk, so go check it out.
</p>
        <p>
Also, while you are checking it out, take a look at his other new site: <a title="http://blogdoc.biztalk247.com/" href="http://blogdoc.biztalk247.com/">http://blogdoc.biztalk247.com/</a> which
is collecting information from lots of blog entries about BizTalk.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=59ebbf36-5511-489f-9a89-0e77367f0555" />
      </body>
      <title>BizTalk 24x7</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,59ebbf36-5511-489f-9a89-0e77367f0555.aspx</guid>
      <link>http://blog.eliasen.dk/2009/05/23/BizTalk24x7.aspx</link>
      <pubDate>Sat, 23 May 2009 19:36:39 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Saravana Kumar has launched version two of his great site &lt;a href="http://www.biztalk247.com"&gt;http://www.biztalk247.com&lt;/a&gt; –
it has loads of nice information about BizTalk, so go check it out.
&lt;/p&gt;
&lt;p&gt;
Also, while you are checking it out, take a look at his other new site: &lt;a title="http://blogdoc.biztalk247.com/" href="http://blogdoc.biztalk247.com/"&gt;http://blogdoc.biztalk247.com/&lt;/a&gt; which
is collecting information from lots of blog entries about BizTalk.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=59ebbf36-5511-489f-9a89-0e77367f0555" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,59ebbf36-5511-489f-9a89-0e77367f0555.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f22f3f87-76c7-49c1-a172-dd24fe1d53ce</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f22f3f87-76c7-49c1-a172-dd24fe1d53ce.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f22f3f87-76c7-49c1-a172-dd24fe1d53ce.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f22f3f87-76c7-49c1-a172-dd24fe1d53ce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today I encountered something I have never seen before, when creating a map.
</p>
        <p>
The issue occurs because my customer had a schema that imports two other schemas,
both of which have an element called “metadata” – but naturally the two schemas have
different target namespaces.
</p>
        <p>
The main schema imports both, and has two records just below the root, and these two
records reference each of the two metadata elements in the two imported schemas.
</p>
        <p>
So the first schema could look like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataOne_2.jpg">
            <img title="MetadataOne" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="230" alt="MetadataOne" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataOne_thumb.jpg" width="579" border="0" />
          </a>
        </p>
        <p>
And the second schema could look like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataTwo.jpg">
            <img title="MetadataTwo" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="230" alt="MetadataTwo" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataTwo_thumb.jpg" width="594" border="0" />
          </a>
        </p>
        <p>
        </p>
        <p>
So both have an element named “metadata” but one is in the namespace “http://TwoElementsDifferentNamespace.MetadataOne”
and the other is in the namespace “http://TwoElementsDifferentNamespace.MetadataTwo”.
</p>
        <p>
After that, I create the schema that impors both:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/BigSchema_2.jpg">
            <img title="BigSchema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="557" alt="BigSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/BigSchema_thumb.jpg" width="687" border="0" />
          </a>
        </p>
        <p>
As you can see it imports the first two schemas, and has to elements that reference
each of the metadata elements form the two first schemas.
</p>
        <p>
Also, I crated an output schema that just has three elements and then I created this
map:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/map_2.jpg">
            <img title="map" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="194" alt="map" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/map_thumb.jpg" width="444" border="0" />
          </a>
        </p>
        <p>
        </p>
        <p>
Pretty simple. Now, the issue comes when compiling, because I get this error:
</p>
        <p>
Exception Caught: The map contains a reference to a schema node that is not valid. 
Perhaps the schema has changed.  Try reloading the map in the BizTalk Mapper. 
The XSD XPath of the node is: /*[local-name()='&lt;Schema&gt;']/*[local-name()='Root']/*[local-name()='metadata']/*[local-name()='Field2']
</p>
        <p>
o the first try was to reload the schema – but that didn’t help – it just broke one
of my links.
</p>
        <p>
In he end I found out, that the issue is that the links are stored like this in the
.BTM file:
</p>
        <p>
&lt;Link LinkID="1" LinkFrom="/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='Root']/*[local-name()='metadata']/*[local-name()='Field1']"
LinkTo="/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='OutputRoot']/*[local-name()='Field1']"
Label="" /&gt;
</p>
        <p>
&lt;Link LinkID="2" LinkFrom="/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='Root']/*[local-name()='SomeFields']/*[local-name()='Field3']"
LinkTo="/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='OutputRoot']/*[local-name()='Field2']"
Label="" /&gt;
</p>
        <p>
&lt;Link LinkID="3" LinkFrom="/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='Root']/*[local-name()='metadata']/*[local-name()='Field2']"
LinkTo="/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='OutputRoot']/*[local-name()='Field3']"
Label="" /&gt;
</p>
        <p>
So. basically, the .BTM file saves links as XPath expressions WITHOUT the namespaces.
So naturally, this has to go wrong, when there are two “metadata” elements on the
same level in the schema.
</p>
        <p>
The way to solve this is to choose the properties of the map and disable the “Ignore
Namespaces for Links” like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/property_2.jpg">
            <img title="property" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="311" alt="property" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/property_thumb.jpg" width="396" border="0" />
          </a>
        </p>
        <p>
After setting this property, the links change having namespaces inside the .BTM file
and everything is just fine.
</p>
        <p>
One might wonder why the namespaces are not enabled as the default, since they do
make the solution more robust. Well, the reason is simple; If the namespaces are in
all the links, and you change for instance the namespace of the root node, then ALL
links in the map gets broken. So actually, not having the namespaces in the links
make the solution more robust.
</p>
        <p>
So… I hope this can help someone.
</p>
        <p>
You can download the solution here:
</p>
        <div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c5e08942-1516-4006-a57c-61b0143ee904" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/TwoElementsDifferentNamespace.zip" target="_blank">TwoElementsDifferentNamespace.zip</a>
          </p>
        </div>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f22f3f87-76c7-49c1-a172-dd24fe1d53ce" />
      </body>
      <title>Two nodes on same level with same name but different namespace</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f22f3f87-76c7-49c1-a172-dd24fe1d53ce.aspx</guid>
      <link>http://blog.eliasen.dk/2009/05/06/TwoNodesOnSameLevelWithSameNameButDifferentNamespace.aspx</link>
      <pubDate>Wed, 06 May 2009 22:36:16 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today I encountered something I have never seen before, when creating a map.
&lt;/p&gt;
&lt;p&gt;
The issue occurs because my customer had a schema that imports two other schemas,
both of which have an element called “metadata” – but naturally the two schemas have
different target namespaces.
&lt;/p&gt;
&lt;p&gt;
The main schema imports both, and has two records just below the root, and these two
records reference each of the two metadata elements in the two imported schemas.
&lt;/p&gt;
&lt;p&gt;
So the first schema could look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataOne_2.jpg"&gt;&lt;img title="MetadataOne" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="230" alt="MetadataOne" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataOne_thumb.jpg" width="579" border="0" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
And the second schema could look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataTwo.jpg"&gt;&lt;img title="MetadataTwo" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="230" alt="MetadataTwo" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/MetadataTwo_thumb.jpg" width="594" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
So both have an element named “metadata” but one is in the namespace “http://TwoElementsDifferentNamespace.MetadataOne”
and the other is in the namespace “http://TwoElementsDifferentNamespace.MetadataTwo”.
&lt;/p&gt;
&lt;p&gt;
After that, I create the schema that impors both:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/BigSchema_2.jpg"&gt;&lt;img title="BigSchema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="557" alt="BigSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/BigSchema_thumb.jpg" width="687" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see it imports the first two schemas, and has to elements that reference
each of the metadata elements form the two first schemas.
&lt;/p&gt;
&lt;p&gt;
Also, I crated an output schema that just has three elements and then I created this
map:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/map_2.jpg"&gt;&lt;img title="map" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="194" alt="map" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/map_thumb.jpg" width="444" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Pretty simple. Now, the issue comes when compiling, because I get this error:
&lt;/p&gt;
&lt;p&gt;
Exception Caught: The map contains a reference to a schema node that is not valid.&amp;#160;
Perhaps the schema has changed.&amp;#160; Try reloading the map in the BizTalk Mapper.&amp;#160;
The XSD XPath of the node is: /*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='Root']/*[local-name()='metadata']/*[local-name()='Field2']
&lt;/p&gt;
&lt;p&gt;
o the first try was to reload the schema – but that didn’t help – it just broke one
of my links.
&lt;/p&gt;
&lt;p&gt;
In he end I found out, that the issue is that the links are stored like this in the
.BTM file:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;Link LinkID=&amp;quot;1&amp;quot; LinkFrom=&amp;quot;/*[local-name()='&amp;amp;lt;Schema&amp;amp;gt;']/*[local-name()='Root']/*[local-name()='metadata']/*[local-name()='Field1']&amp;quot;
LinkTo=&amp;quot;/*[local-name()='&amp;amp;lt;Schema&amp;amp;gt;']/*[local-name()='OutputRoot']/*[local-name()='Field1']&amp;quot;
Label=&amp;quot;&amp;quot; /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
&amp;lt;Link LinkID=&amp;quot;2&amp;quot; LinkFrom=&amp;quot;/*[local-name()='&amp;amp;lt;Schema&amp;amp;gt;']/*[local-name()='Root']/*[local-name()='SomeFields']/*[local-name()='Field3']&amp;quot;
LinkTo=&amp;quot;/*[local-name()='&amp;amp;lt;Schema&amp;amp;gt;']/*[local-name()='OutputRoot']/*[local-name()='Field2']&amp;quot;
Label=&amp;quot;&amp;quot; /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
&amp;lt;Link LinkID=&amp;quot;3&amp;quot; LinkFrom=&amp;quot;/*[local-name()='&amp;amp;lt;Schema&amp;amp;gt;']/*[local-name()='Root']/*[local-name()='metadata']/*[local-name()='Field2']&amp;quot;
LinkTo=&amp;quot;/*[local-name()='&amp;amp;lt;Schema&amp;amp;gt;']/*[local-name()='OutputRoot']/*[local-name()='Field3']&amp;quot;
Label=&amp;quot;&amp;quot; /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
So. basically, the .BTM file saves links as XPath expressions WITHOUT the namespaces.
So naturally, this has to go wrong, when there are two “metadata” elements on the
same level in the schema.
&lt;/p&gt;
&lt;p&gt;
The way to solve this is to choose the properties of the map and disable the “Ignore
Namespaces for Links” like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/property_2.jpg"&gt;&lt;img title="property" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="311" alt="property" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/property_thumb.jpg" width="396" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
After setting this property, the links change having namespaces inside the .BTM file
and everything is just fine.
&lt;/p&gt;
&lt;p&gt;
One might wonder why the namespaces are not enabled as the default, since they do
make the solution more robust. Well, the reason is simple; If the namespaces are in
all the links, and you change for instance the namespace of the root node, then ALL
links in the map gets broken. So actually, not having the namespaces in the links
make the solution more robust.
&lt;/p&gt;
&lt;p&gt;
So… I hope this can help someone.
&lt;/p&gt;
&lt;p&gt;
You can download the solution here:
&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c5e08942-1516-4006-a57c-61b0143ee904" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Twonodesonsamelevelwithsamenamebutdiffer_873/TwoElementsDifferentNamespace.zip" target="_blank"&gt;TwoElementsDifferentNamespace.zip&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f22f3f87-76c7-49c1-a172-dd24fe1d53ce" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f22f3f87-76c7-49c1-a172-dd24fe1d53ce.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=0b7b2724-11b1-4265-95bd-1af82dd06763</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,0b7b2724-11b1-4265-95bd-1af82dd06763.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,0b7b2724-11b1-4265-95bd-1af82dd06763.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=0b7b2724-11b1-4265-95bd-1af82dd06763</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Just as i have started developing a functoid library (found at <a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/">http://eebiztalkfunctoids.codeplex.com/</a>)
I have also started developing a pipeline component library. Right now it contains
three components:
</p>
        <ul>
          <li>
DevNull. This pipeline component is quite simple. It will "swallow" everything
that comes as input. This enables performance testing of stuff without concerns about
adapter transport time at send port for instance.</li>
          <li>
SearchAndReplace. This component will perform a search and replace on the incoming
stream, replacing some string with some other string. Optionally, you can decide to
let the input string be a regular expression and replace based on that instead of
normal string search and replace.</li>
          <li>
Promote. This component has three parameters, the name of a property, the namespace
of the property and an XPath expression. The component will read in the value that
corresponds to the XPath expression at runtime and promote it to the property given
by the name and name space. This enables you to promote reoccurring elements.</li>
        </ul>
        <p>
You can find it at <a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/">http://eebiztalkpipelinecom.codeplex.com/</a> –
the url is weird, I know. But there is a limit to the length of the urls at codeplex,
unfortunately.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=0b7b2724-11b1-4265-95bd-1af82dd06763" />
      </body>
      <title>Now also a pipeline component library</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,0b7b2724-11b1-4265-95bd-1af82dd06763.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/25/NowAlsoAPipelineComponentLibrary.aspx</link>
      <pubDate>Sat, 25 Apr 2009 21:08:40 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Just as i have started developing a functoid library (found at &lt;a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/"&gt;http://eebiztalkfunctoids.codeplex.com/&lt;/a&gt;)
I have also started developing a pipeline component library. Right now it contains
three components:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
DevNull. This pipeline component is quite simple. It will &amp;quot;swallow&amp;quot; everything
that comes as input. This enables performance testing of stuff without concerns about
adapter transport time at send port for instance.&lt;/li&gt;
&lt;li&gt;
SearchAndReplace. This component will perform a search and replace on the incoming
stream, replacing some string with some other string. Optionally, you can decide to
let the input string be a regular expression and replace based on that instead of
normal string search and replace.&lt;/li&gt;
&lt;li&gt;
Promote. This component has three parameters, the name of a property, the namespace
of the property and an XPath expression. The component will read in the value that
corresponds to the XPath expression at runtime and promote it to the property given
by the name and name space. This enables you to promote reoccurring elements.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You can find it at &lt;a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/"&gt;http://eebiztalkpipelinecom.codeplex.com/&lt;/a&gt; –
the url is weird, I know. But there is a limit to the length of the urls at codeplex,
unfortunately.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=0b7b2724-11b1-4265-95bd-1af82dd06763" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,0b7b2724-11b1-4265-95bd-1af82dd06763.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=2cd717f2-7bf7-4b67-aa37-2995053d0578</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,2cd717f2-7bf7-4b67-aa37-2995053d0578.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,2cd717f2-7bf7-4b67-aa37-2995053d0578.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=2cd717f2-7bf7-4b67-aa37-2995053d0578</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, first I had a <a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank">post</a> about
promoting reoccurring elements where I discussed 4 options for promoting an element
that can occur multiple times in the input. Then I had a <a href="http://blog.eliasen.dk/2009/04/13/PromotingReoccurringElementsPartII.aspx" target="_blank">post</a> about
how you can pseudo do it in BizTalk 2000/2002.
</p>
        <p>
This post is about two things:
</p>
        <ol>
          <li>
Another way of doing it that doesn’t work 
</li>
          <li>
Writing the custom pipeline component that was my second suggestion in my <a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank">first
post</a>. 
</li>
        </ol>
        <p>
          <strong>First issue</strong>
        </p>
        <p>
As discussed in my <a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank">first
post</a>, if you change the XPath of the promoted property in the schema (either by
clicking the ellipsis as I wrote about or manually editing the XSD) to add the “[1]”,
you get this compilation error:
</p>
        <p>
Node "ElementWhereNumber1IsPromoted" - The promoted property field or one
of its parents has Max Occurs greater than 1. Only nodes that are guaranteed to be
unique can be promoted as property fields.
</p>
        <p>
But, since I couldn’t get the “[1]” to work in BizTalk 2000/2002 when editing my <a href="http://blog.eliasen.dk/2009/04/13/PromotingReoccurringElementsPartII.aspx" target="_blank">second
post</a> I used the position function instead. So i started wondering if that might
work in BizTalk 2006 R2. It doesn’t, though. It compiles just fine, and I really had
my hopes up, but at runtime you get this error:
</p>
        <p>
There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Source: "XML disassembler" Receive Port: "ReceivePort3" URI: "C:\Projects\Blog
Entries\PrommotingReoccurringElementsEditXSD\Instances\In\*.xml" Reason: Unexpected
XPath format:
</p>
        <p>
So i had to drop that idea again.
</p>
        <p>
          <strong>Second issue</strong>
        </p>
        <p>
I decided to write the custom pipeline component that I discussed in my <a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank">first
post</a>.
</p>
        <p>
The main code is easy – just three properties:
</p>
        <ol>
          <li>
Name of the property</li>
          <li>
Namespace of the property</li>
          <li>
XPath</li>
        </ol>
        <p>
You can download it at <a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/">http://eebiztalkpipelinecom.codeplex.com/</a> where
I have just made my initial release.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2cd717f2-7bf7-4b67-aa37-2995053d0578" />
      </body>
      <title>Promoting reoccurring elements – Part III</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,2cd717f2-7bf7-4b67-aa37-2995053d0578.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/25/PromotingReoccurringElementsPartIII.aspx</link>
      <pubDate>Sat, 25 Apr 2009 21:02:07 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, first I had a &lt;a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank"&gt;post&lt;/a&gt; about
promoting reoccurring elements where I discussed 4 options for promoting an element
that can occur multiple times in the input. Then I had a &lt;a href="http://blog.eliasen.dk/2009/04/13/PromotingReoccurringElementsPartII.aspx" target="_blank"&gt;post&lt;/a&gt; about
how you can pseudo do it in BizTalk 2000/2002.
&lt;/p&gt;
&lt;p&gt;
This post is about two things:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Another way of doing it that doesn’t work 
&lt;/li&gt;
&lt;li&gt;
Writing the custom pipeline component that was my second suggestion in my &lt;a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank"&gt;first
post&lt;/a&gt;. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;First issue&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
As discussed in my &lt;a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank"&gt;first
post&lt;/a&gt;, if you change the XPath of the promoted property in the schema (either by
clicking the ellipsis as I wrote about or manually editing the XSD) to add the “[1]”,
you get this compilation error:
&lt;/p&gt;
&lt;p&gt;
Node &amp;quot;ElementWhereNumber1IsPromoted&amp;quot; - The promoted property field or one
of its parents has Max Occurs greater than 1. Only nodes that are guaranteed to be
unique can be promoted as property fields.
&lt;/p&gt;
&lt;p&gt;
But, since I couldn’t get the “[1]” to work in BizTalk 2000/2002 when editing my &lt;a href="http://blog.eliasen.dk/2009/04/13/PromotingReoccurringElementsPartII.aspx" target="_blank"&gt;second
post&lt;/a&gt; I used the position function instead. So i started wondering if that might
work in BizTalk 2006 R2. It doesn’t, though. It compiles just fine, and I really had
my hopes up, but at runtime you get this error:
&lt;/p&gt;
&lt;p&gt;
There was a failure executing the receive pipeline: &amp;quot;Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot;
Source: &amp;quot;XML disassembler&amp;quot; Receive Port: &amp;quot;ReceivePort3&amp;quot; URI: &amp;quot;C:\Projects\Blog
Entries\PrommotingReoccurringElementsEditXSD\Instances\In\*.xml&amp;quot; Reason: Unexpected
XPath format:
&lt;/p&gt;
&lt;p&gt;
So i had to drop that idea again.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Second issue&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I decided to write the custom pipeline component that I discussed in my &lt;a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank"&gt;first
post&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The main code is easy – just three properties:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Name of the property&lt;/li&gt;
&lt;li&gt;
Namespace of the property&lt;/li&gt;
&lt;li&gt;
XPath&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
You can download it at &lt;a title="http://eebiztalkpipelinecom.codeplex.com/" href="http://eebiztalkpipelinecom.codeplex.com/"&gt;http://eebiztalkpipelinecom.codeplex.com/&lt;/a&gt; where
I have just made my initial release.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=2cd717f2-7bf7-4b67-aa37-2995053d0578" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,2cd717f2-7bf7-4b67-aa37-2995053d0578.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=52c1271a-fb9a-4bab-a581-1fa835cde82b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,52c1271a-fb9a-4bab-a581-1fa835cde82b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,52c1271a-fb9a-4bab-a581-1fa835cde82b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=52c1271a-fb9a-4bab-a581-1fa835cde82b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have had posts about the context accessor functoid <a href="http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx" target="_blank">here</a> and <a href="http://blog.eliasen.dk/2009/04/15/TheContextAccessorFunctoidPartII.aspx" target="_blank">here</a>.
</p>
        <p>
Just a couple of notes about the context accessor functoids (plural - because there
are two functoids at <a href="http://contextaccessor.codeplex.com/" target="_blank">codeplex</a>):
</p>
        <ul>
          <li>
One of the functoids will <strong>only</strong> work when called from a map that is
executed inside an orchestration. 
</li>
          <li>
The other functoid will <strong>only</strong> work when called from a map in a receive
port <strong>AND</strong> only if the pipeline component that ships with the functoid
has been used in the receive pipeline. 
</li>
        </ul>
        <p>
As you can see, creating a map based on either of these functoids makes your map impossible
to use in either an orchestration or a receive port based on which functoid you chose.
So you are creating a pretty hard coupling between your map and where it should be
used. This can be ok, but if other developers mess around with your solution in a
year or so, they wont know that and things can start breaking up.
</p>
        <p>
My self: I am a user of the functoids - I would use them instead of assigning values
inside an orchestration using a message assignment shape.. but this discussion is
pretty much academic and about religion :-) 
</p>
        <p>
Anyway, beware the limitations!
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=52c1271a-fb9a-4bab-a581-1fa835cde82b" />
      </body>
      <title>The Context Accessor functoid, part III</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,52c1271a-fb9a-4bab-a581-1fa835cde82b.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/15/TheContextAccessorFunctoidPartIII.aspx</link>
      <pubDate>Wed, 15 Apr 2009 22:17:30 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have had posts about the context accessor functoid &lt;a href="http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://blog.eliasen.dk/2009/04/15/TheContextAccessorFunctoidPartII.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Just a couple of notes about the context accessor functoids (plural - because there
are two functoids at &lt;a href="http://contextaccessor.codeplex.com/" target="_blank"&gt;codeplex&lt;/a&gt;):
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
One of the functoids will &lt;strong&gt;only&lt;/strong&gt; work when called from a map that is
executed inside an orchestration. 
&lt;/li&gt;
&lt;li&gt;
The other functoid will &lt;strong&gt;only&lt;/strong&gt; work when called from a map in a receive
port &lt;strong&gt;AND&lt;/strong&gt; only if the pipeline component that ships with the functoid
has been used in the receive pipeline. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
As you can see, creating a map based on either of these functoids makes your map impossible
to use in either an orchestration or a receive port based on which functoid you chose.
So you are creating a pretty hard coupling between your map and where it should be
used. This can be ok, but if other developers mess around with your solution in a
year or so, they wont know that and things can start breaking up.
&lt;/p&gt;
&lt;p&gt;
My self: I am a user of the functoids - I would use them instead of assigning values
inside an orchestration using a message assignment shape.. but this discussion is
pretty much academic and about religion :-) 
&lt;/p&gt;
&lt;p&gt;
Anyway, beware the limitations!
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=52c1271a-fb9a-4bab-a581-1fa835cde82b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,52c1271a-fb9a-4bab-a581-1fa835cde82b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=0fc12829-3ce3-4388-a534-4348375b29fb</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,0fc12829-3ce3-4388-a534-4348375b29fb.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,0fc12829-3ce3-4388-a534-4348375b29fb.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=0fc12829-3ce3-4388-a534-4348375b29fb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I had a post about one of the <a href="http://www.codeplex.com/ContextAccessor" target="_blank">context
accessor functoids</a> which can be seen here: <a title="http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx" href="http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx">http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx</a></p>
        <p>
This post is about the other one – the one that can only be used in a map that is
used in a receive port.
</p>
        <p>
Basically, the functoid takes in three inputs:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartII_DB2/GetReceivedFilename_2.jpg">
            <img title="GetReceivedFilename" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="443" alt="GetReceivedFilename" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartII_DB2/GetReceivedFilename_thumb.jpg" width="349" border="0" />
          </a>
        </p>
        <p>
        </p>
        <p>
The first is the name of the property and the second parameter is the namespace of
the property schema this property belongs to. The third parameter is an optional string
that is returned in case the promoted property could not be read.
</p>
        <p>
This functoid <strong>only</strong> works in a map that is called in a receive port
and only if the receive location uses a pipeline that uses the ContextAccessorProvider
pipeline component that is included in he same DLL as the functoids.
</p>
        <p>
What the pipeline component does is, that it takes the context of the incoming message
and saves it in a public static member. This way, the functoid can access this static
member of the pipeline component and read the promoted properties this way.
</p>
        <p>
Good luck using it.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=0fc12829-3ce3-4388-a534-4348375b29fb" />
      </body>
      <title>The Context Accessor functoid, part II</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,0fc12829-3ce3-4388-a534-4348375b29fb.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/15/TheContextAccessorFunctoidPartII.aspx</link>
      <pubDate>Wed, 15 Apr 2009 22:11:22 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I had a post about one of the &lt;a href="http://www.codeplex.com/ContextAccessor" target="_blank"&gt;context
accessor functoids&lt;/a&gt; which can be seen here: &lt;a title="http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx" href="http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx"&gt;http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
This post is about the other one – the one that can only be used in a map that is
used in a receive port.
&lt;/p&gt;
&lt;p&gt;
Basically, the functoid takes in three inputs:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartII_DB2/GetReceivedFilename_2.jpg"&gt;&lt;img title="GetReceivedFilename" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="443" alt="GetReceivedFilename" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartII_DB2/GetReceivedFilename_thumb.jpg" width="349" border="0" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The first is the name of the property and the second parameter is the namespace of
the property schema this property belongs to. The third parameter is an optional string
that is returned in case the promoted property could not be read.
&lt;/p&gt;
&lt;p&gt;
This functoid &lt;strong&gt;only&lt;/strong&gt; works in a map that is called in a receive port
and only if the receive location uses a pipeline that uses the ContextAccessorProvider
pipeline component that is included in he same DLL as the functoids.
&lt;/p&gt;
&lt;p&gt;
What the pipeline component does is, that it takes the context of the incoming message
and saves it in a public static member. This way, the functoid can access this static
member of the pipeline component and read the promoted properties this way.
&lt;/p&gt;
&lt;p&gt;
Good luck using it.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=0fc12829-3ce3-4388-a534-4348375b29fb" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,0fc12829-3ce3-4388-a534-4348375b29fb.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=e5a08611-ac51-412a-989a-852dfefafd8b</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,e5a08611-ac51-412a-989a-852dfefafd8b.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,e5a08611-ac51-412a-989a-852dfefafd8b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=e5a08611-ac51-412a-989a-852dfefafd8b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I had a post about <a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank">promoting
reoccurring elements</a> in BizTalk. As we all know, this isn’t possible…. BUT… actually…
well… :-)
</p>
        <p>
Basically, you promote properties for three reasons:
</p>
        <ol>
          <li>
You need it to route based on the value</li>
          <li>
You need it for correlation (which is basically just a specialization of routing)</li>
          <li>
You need to either read or set the value inside an orchestration (Don’t do that! Use
distinguished fields instead)</li>
        </ol>
        <p>
So, dealing with number 1, routing, I started thinking back at BizTalk 2002, which
was my first BizTalk experience (I’l bet ALL BizTalk developers/architects think of
BizTalk 2000/2002 every now and then… no? :-) ). I seemed to recall that you could
do something fancy with routing back then, so I fired up an old BizTalk 2002 on windows
2000 Professional to test it. It turns out, that on a channel you can enter a filter
which is an XPath expression. The text field is editable, so you can change the XPath
expression all you want – it will complain if you try to leave it with an invalid
XPath expression (syntactically – not semantically).
</p>
        <p>
Given this XML:
</p>
        <p>
&lt;MyRoot&gt; 
<br />
  &lt;myReoccuringRecord Myfield="42" /&gt;  
<br />
  &lt;myReoccuringRecord Myfield="2" /&gt; 
<br />
  &lt;MySecondRecord MySecondField="jan" /&gt;  
<br />
  &lt;MyThirdRecord&gt; 
<br />
    &lt;MyThirdField&gt;1&lt;/MyThirdField&gt;  
<br />
  &lt;/MyThirdRecord&gt; 
<br />
&lt;/MyRoot&gt;
</p>
        <p>
I can have a channel with this filter:
</p>
        <ul>
          <li>
/*[local-name()='MyRoot' and namespace-uri()='']/*[local-name()='myReoccuringRecord'
and namespace-uri()=''][position()=1 and @Myfield = 42]</li>
        </ul>
        <p>
Basically, documents will only go through this channel, if the value of the “Myfield”
attribute of the first “myReoccuringRecord” element has the value 42.
</p>
        <p>
So, it isn’t promoting as such – BizTalk 2002 doesn’t have this concept, but <strong>it
allows us to route based on the value of a specific occurrence  of a reoccurring
element</strong>.
</p>
        <p>
On a side note; If you leave the filter like this:
</p>
        <ul>
          <li>
/*[local-name()='MyRoot' and namespace-uri()='']/*[local-name()='myReoccuringRecord'
and namespace-uri()=''][@Myfield = 42]</li>
        </ul>
        <p>
it will accept the incoming document no matter what the position of the “myReoccuringReord”
is. Can’t make up my mind if this is a good thing or not :-)
</p>
        <p>
Now, as we all know (?), manually editing the XSD in BizTalk 2006 solution to make
sure the XPath evaluation will only return a single XmlNode doesn’t work. You either
get a compile time error:
</p>
        <ul>
          <li>
The promoted property field or one of its parents has Max Occurs greater than 1. Only
nodes that are guaranteed to be unique can be promoted as property fields.</li>
        </ul>
        <p>
or you get a runtime error:
</p>
        <ul>
          <li>
There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Source: "XML disassembler" Receive Port: "ReceivePort3" URI: "C:\Projects\Blog
Entries\PrommotingReoccurringElementsEditXSD\Instances\In\*.xml" Reason: Unexpected
XPath format:</li>
        </ul>
        <p>
Anyway… not that many BizTalk 2000/2002 installations till in production, I assume,
so this post is merely for informational purposes. It’s just funny discovering functionality
that is doable in earlier versions of BizTalk and not in the latest versions.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=e5a08611-ac51-412a-989a-852dfefafd8b" />
      </body>
      <title>Promoting reoccurring elements – Part II</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,e5a08611-ac51-412a-989a-852dfefafd8b.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/13/PromotingReoccurringElementsPartII.aspx</link>
      <pubDate>Mon, 13 Apr 2009 23:22:23 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I had a post about &lt;a href="http://blog.eliasen.dk/2007/09/16/PromotingReoccuringElements.aspx" target="_blank"&gt;promoting
reoccurring elements&lt;/a&gt; in BizTalk. As we all know, this isn’t possible…. BUT… actually…
well… :-)
&lt;/p&gt;
&lt;p&gt;
Basically, you promote properties for three reasons:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
You need it to route based on the value&lt;/li&gt;
&lt;li&gt;
You need it for correlation (which is basically just a specialization of routing)&lt;/li&gt;
&lt;li&gt;
You need to either read or set the value inside an orchestration (Don’t do that! Use
distinguished fields instead)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So, dealing with number 1, routing, I started thinking back at BizTalk 2002, which
was my first BizTalk experience (I’l bet ALL BizTalk developers/architects think of
BizTalk 2000/2002 every now and then… no? :-) ). I seemed to recall that you could
do something fancy with routing back then, so I fired up an old BizTalk 2002 on windows
2000 Professional to test it. It turns out, that on a channel you can enter a filter
which is an XPath expression. The text field is editable, so you can change the XPath
expression all you want – it will complain if you try to leave it with an invalid
XPath expression (syntactically – not semantically).
&lt;/p&gt;
&lt;p&gt;
Given this XML:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;MyRoot&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;myReoccuringRecord Myfield=&amp;quot;42&amp;quot; /&amp;gt;&amp;#160; 
&lt;br /&gt;
&amp;#160; &amp;lt;myReoccuringRecord Myfield=&amp;quot;2&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;MySecondRecord MySecondField=&amp;quot;jan&amp;quot; /&amp;gt;&amp;#160; 
&lt;br /&gt;
&amp;#160; &amp;lt;MyThirdRecord&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;MyThirdField&amp;gt;1&amp;lt;/MyThirdField&amp;gt;&amp;#160; 
&lt;br /&gt;
&amp;#160; &amp;lt;/MyThirdRecord&amp;gt; 
&lt;br /&gt;
&amp;lt;/MyRoot&amp;gt;
&lt;/p&gt;
&lt;p&gt;
I can have a channel with this filter:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
/*[local-name()='MyRoot' and namespace-uri()='']/*[local-name()='myReoccuringRecord'
and namespace-uri()=''][position()=1 and @Myfield = 42]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Basically, documents will only go through this channel, if the value of the “Myfield”
attribute of the first “myReoccuringRecord” element has the value 42.
&lt;/p&gt;
&lt;p&gt;
So, it isn’t promoting as such – BizTalk 2002 doesn’t have this concept, but &lt;strong&gt;it
allows us to route based on the value of a specific occurrence&amp;#160; of a reoccurring
element&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
On a side note; If you leave the filter like this:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
/*[local-name()='MyRoot' and namespace-uri()='']/*[local-name()='myReoccuringRecord'
and namespace-uri()=''][@Myfield = 42]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
it will accept the incoming document no matter what the position of the “myReoccuringReord”
is. Can’t make up my mind if this is a good thing or not :-)
&lt;/p&gt;
&lt;p&gt;
Now, as we all know (?), manually editing the XSD in BizTalk 2006 solution to make
sure the XPath evaluation will only return a single XmlNode doesn’t work. You either
get a compile time error:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The promoted property field or one of its parents has Max Occurs greater than 1. Only
nodes that are guaranteed to be unique can be promoted as property fields.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
or you get a runtime error:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
There was a failure executing the receive pipeline: &amp;quot;Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot;
Source: &amp;quot;XML disassembler&amp;quot; Receive Port: &amp;quot;ReceivePort3&amp;quot; URI: &amp;quot;C:\Projects\Blog
Entries\PrommotingReoccurringElementsEditXSD\Instances\In\*.xml&amp;quot; Reason: Unexpected
XPath format:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Anyway… not that many BizTalk 2000/2002 installations till in production, I assume,
so this post is merely for informational purposes. It’s just funny discovering functionality
that is doable in earlier versions of BizTalk and not in the latest versions.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=e5a08611-ac51-412a-989a-852dfefafd8b" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,e5a08611-ac51-412a-989a-852dfefafd8b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=795b509c-79aa-4dd4-91f8-32f60996d330</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,795b509c-79aa-4dd4-91f8-32f60996d330.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,795b509c-79aa-4dd4-91f8-32f60996d330.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=795b509c-79aa-4dd4-91f8-32f60996d330</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Well, the time has once again come for a “If I had all the money in the world to pay
to the BizTalk development team and I could decide what to put into the next version
of BizTalk, this would be it”-list :-) There are a couple of items that I have stolen
from <a title="http://blog.eliasen.dk/2007/10/06/BizTalkVNextWishlist.aspx" href="http://blog.eliasen.dk/2007/10/06/BizTalkVNextWishlist.aspx">http://blog.eliasen.dk/2007/10/06/BizTalkVNextWishlist.aspx</a>.
</p>
        <ol>
          <li>
Orchestration debugging should be easier. I really hate that I have to deploy my orchestration,
throw a message through it just to get an instance in HAT that I an set breakpoints
on and then have to throw another message trough the orchestration to debug it. 
</li>
          <li>
No more pipelines. Why no let the developer have an inline pipeline designer in a
receive location and a send port? this way I don’t have to build custom pipelines
– I can just chose pipeline components right on the receive locations and send ports. 
</li>
          <li>
For development purposes, it would be really nice to be able to right click a receive
location that is disabled and choose "Execute". If for instance I have a
SQL adapter receive location that is supposed to poll every minute, then I don't want
to have to quickly disable the receive location once it has been fired. I want to
keep it disabled, so data wont go through my system when I am not ready, and then
just execute it whenever I am ready. 
</li>
          <li>
Restart Host Instances only once. Right now, if I deploy my solution from VS.NET,
and this solution has 10 projects that are all set to "Restart Host Instances"
on deployment, then the host instances will get restarted 10 times. Would be nice
if VS.NET could figure this out and only do it once. 
</li>
          <li>
Specify the node that is body, when using enveloping and not just the parent. It makes
great sense, that I can specify a node and all child elements are then submitted as
separate messages from the receive pipeline. This is how we can receive orders, invoices,
etc. in the same XML. BUT, if I receive XML where I only need the Orders, then I would
like to point at the Orders element so that is all I get. Right now I have to use
standard enveloping, and implement logic to just delete the invoices, etc. Not really
nice, I think. 
</li>
          <li>
Better modeling tools for business processes. The last Gartners quadrant I saw on
BMPS didn’t have Microsoft mentioned at all. Would be great with some formal cooperation
with IDScheers Aris product or the like. Something like simulating your business process
with different values in rules would be just great 
</li>
          <li>
Promoting via XPath. Please let me specify the XPath for some element that I want
promoted in the disassembler components. If I know of an XPath that guarantees that
only one value is in the result set og evaluating that XPath, then let me use it instead
of forcing me to not promote anything that can occur multiple times. I am aware that
with the current limitation, BizTalk is helping developers to not make mistakes, but
hy not give us the opportunity and then suspend the message if the developer was wrong
and multiple elements are in the resulting node list after evaluating the XPath expression? 
</li>
          <li>
It would be nice if we could expose a web service without having to require a parameter.
If I want to expose an orchestration that builds an inventory XML hat customers can
request, I really don’t need a parameter to do that. Some workaround would be nice. 
</li>
        </ol>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=795b509c-79aa-4dd4-91f8-32f60996d330" />
      </body>
      <title>Wishes for the next version of BizTalk</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,795b509c-79aa-4dd4-91f8-32f60996d330.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/13/WishesForTheNextVersionOfBizTalk.aspx</link>
      <pubDate>Mon, 13 Apr 2009 20:58:03 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Well, the time has once again come for a “If I had all the money in the world to pay
to the BizTalk development team and I could decide what to put into the next version
of BizTalk, this would be it”-list :-) There are a couple of items that I have stolen
from &lt;a title="http://blog.eliasen.dk/2007/10/06/BizTalkVNextWishlist.aspx" href="http://blog.eliasen.dk/2007/10/06/BizTalkVNextWishlist.aspx"&gt;http://blog.eliasen.dk/2007/10/06/BizTalkVNextWishlist.aspx&lt;/a&gt;.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Orchestration debugging should be easier. I really hate that I have to deploy my orchestration,
throw a message through it just to get an instance in HAT that I an set breakpoints
on and then have to throw another message trough the orchestration to debug it. 
&lt;/li&gt;
&lt;li&gt;
No more pipelines. Why no let the developer have an inline pipeline designer in a
receive location and a send port? this way I don’t have to build custom pipelines
– I can just chose pipeline components right on the receive locations and send ports. 
&lt;/li&gt;
&lt;li&gt;
For development purposes, it would be really nice to be able to right click a receive
location that is disabled and choose &amp;quot;Execute&amp;quot;. If for instance I have a
SQL adapter receive location that is supposed to poll every minute, then I don't want
to have to quickly disable the receive location once it has been fired. I want to
keep it disabled, so data wont go through my system when I am not ready, and then
just execute it whenever I am ready. 
&lt;/li&gt;
&lt;li&gt;
Restart Host Instances only once. Right now, if I deploy my solution from VS.NET,
and this solution has 10 projects that are all set to &amp;quot;Restart Host Instances&amp;quot;
on deployment, then the host instances will get restarted 10 times. Would be nice
if VS.NET could figure this out and only do it once. 
&lt;/li&gt;
&lt;li&gt;
Specify the node that is body, when using enveloping and not just the parent. It makes
great sense, that I can specify a node and all child elements are then submitted as
separate messages from the receive pipeline. This is how we can receive orders, invoices,
etc. in the same XML. BUT, if I receive XML where I only need the Orders, then I would
like to point at the Orders element so that is all I get. Right now I have to use
standard enveloping, and implement logic to just delete the invoices, etc. Not really
nice, I think. 
&lt;/li&gt;
&lt;li&gt;
Better modeling tools for business processes. The last Gartners quadrant I saw on
BMPS didn’t have Microsoft mentioned at all. Would be great with some formal cooperation
with IDScheers Aris product or the like. Something like simulating your business process
with different values in rules would be just great 
&lt;/li&gt;
&lt;li&gt;
Promoting via XPath. Please let me specify the XPath for some element that I want
promoted in the disassembler components. If I know of an XPath that guarantees that
only one value is in the result set og evaluating that XPath, then let me use it instead
of forcing me to not promote anything that can occur multiple times. I am aware that
with the current limitation, BizTalk is helping developers to not make mistakes, but
hy not give us the opportunity and then suspend the message if the developer was wrong
and multiple elements are in the resulting node list after evaluating the XPath expression? 
&lt;/li&gt;
&lt;li&gt;
It would be nice if we could expose a web service without having to require a parameter.
If I want to expose an orchestration that builds an inventory XML hat customers can
request, I really don’t need a parameter to do that. Some workaround would be nice. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=795b509c-79aa-4dd4-91f8-32f60996d330" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,795b509c-79aa-4dd4-91f8-32f60996d330.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=b61596d0-39dd-4d7a-89bd-449be2eeee1c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,b61596d0-39dd-4d7a-89bd-449be2eeee1c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,b61596d0-39dd-4d7a-89bd-449be2eeee1c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=b61596d0-39dd-4d7a-89bd-449be2eeee1c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Some may have noticed it – others will know it now :-)
</p>
        <p>
BizTalk 2009 is available for download from MSDN.
</p>
        <p>
the official <a href="http://www.microsoft.com/biztalk" target="_blank">BizTalk site</a> doesn’t
reflect the new version yet, though, so please have patience if you need the trial
version or the likes.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b61596d0-39dd-4d7a-89bd-449be2eeee1c" />
      </body>
      <title>BizTalk 2009 available</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,b61596d0-39dd-4d7a-89bd-449be2eeee1c.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/07/BizTalk2009Available.aspx</link>
      <pubDate>Tue, 07 Apr 2009 20:50:44 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Some may have noticed it – others will know it now :-)
&lt;/p&gt;
&lt;p&gt;
BizTalk 2009 is available for download from MSDN.
&lt;/p&gt;
&lt;p&gt;
the official &lt;a href="http://www.microsoft.com/biztalk" target="_blank"&gt;BizTalk site&lt;/a&gt; doesn’t
reflect the new version yet, though, so please have patience if you need the trial
version or the likes.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b61596d0-39dd-4d7a-89bd-449be2eeee1c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,b61596d0-39dd-4d7a-89bd-449be2eeee1c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c52076db-86d4-489a-b07b-1ea7ee7d2506</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c52076db-86d4-489a-b07b-1ea7ee7d2506.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c52076db-86d4-489a-b07b-1ea7ee7d2506.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c52076db-86d4-489a-b07b-1ea7ee7d2506</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
At <a title="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecaa2059-d78e-449f-8eb0-37696847b4b0" href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecaa2059-d78e-449f-8eb0-37696847b4b0">http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecaa2059-d78e-449f-8eb0-37696847b4b0</a> there
is a guy who is struggling to get the MessageID into a message inside a map.
</p>
        <p>
I have been trying to help him and have come to a stand still, because I missed a
very important point. The MessageID is “written” and not promoted to the context base.
Therefore, it cannot be read using the functoid found at <a title="http://www.codeplex.com/ContextAccessor" href="http://www.codeplex.com/ContextAccessor">http://www.codeplex.com/ContextAccessor</a> (The
one used inside an orchestration).
</p>
        <p>
So basically, you can use the functoid to get hold of all the properties that were
promoted into the context, but the ones that were written, you need to get to some
other way.
</p>
        <p>
I have created a small sample that illustrates how to do this inside an orchestration.
</p>
        <div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:8939f26b-09c0-46bc-9204-e5c1f08f0be0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
It can be downloaded <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/ContextAccessorTest.zip" target="_blank">here.</a></p>
        </div>
        <p>
Basically, I have a schema for the input:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Inputschema.jpg">
            <img title="Inputschema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="175" alt="Inputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Inputschema_thumb.jpg" width="296" border="0" />
          </a>
        </p>
        <p>
It has two fields, and I have promoted the first field.
</p>
        <p>
The output schema looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/OutputSchema.jpg">
            <img title="OutputSchema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="211" alt="OutputSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/OutputSchema_thumb.jpg" width="353" border="0" />
          </a>
        </p>
        <p>
It has four fields.
</p>
        <p>
What I want in the output is this:
</p>
        <ul>
          <li>
Field1: The value from Field1 in the source schema. It isn’t to be mapped directly,
though. I want to demonstrate that the functoid can be used to get values that were
promoted from a schema.</li>
          <li>
Field2: The value from Field2 in the source schema. Mapped directly</li>
          <li>
MessageID: The Message ID of he input message. Since this isn’t accessible by the
functoid, I will use a Message Assignment shape to do that</li>
          <li>
ReceivedFileName: Will contain the content of the BTS.ReceivedFileName poperty – by
using the functoid.</li>
        </ul>
        <p>
The map looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Map.jpg">
            <img title="Map" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="506" alt="Map" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Map_thumb.jpg" width="467" border="0" />
          </a>
        </p>
        <p>
I am using the ContextAccessor (for orchestations) to fill a value into Field1 and
ReceivedFileName. I am mapping Field2 directly. The MessageID field I am not mapping,
since I need a message assignment shape for that. The element “MessageID” must be
present in the output, though. Otherwise i cannot fill in value. So, as you can see
in the screenshot, I have set the “Value” property to “&lt;empty&gt;”. This will create
an empty element. This feature is very handy for initializing elements that will later
on get values from message assignment shapes but also for creating the needed empty
fields for demotion.
</p>
        <p>
Anyway, the parameters for the first functoid look like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/FirstFunctoid.jpg">
            <img title="FirstFunctoid" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="443" alt="FirstFunctoid" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/FirstFunctoid_thumb.jpg" width="349" border="0" />
          </a>
        </p>
        <p>
The parameters are:
</p>
        <ol>
          <li>
The name of the message to get the value from.</li>
          <li>
The name of the property</li>
          <li>
The name space of the property schema that property exists in.</li>
        </ol>
        <p>
The second functoid looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/SecondFunctoid.jpg">
            <img title="SecondFunctoid" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="443" alt="SecondFunctoid" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/SecondFunctoid_thumb.jpg" width="349" border="0" />
          </a>
        </p>
        <p>
Now, the final touch is the orchestration:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Orchestration.jpg">
            <img title="Orchestration" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="474" alt="Orchestration" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Orchestration_thumb.jpg" width="362" border="0" />
          </a>
        </p>
        <p>
Quite simple… A receive, a construct and a send port for the output. The construct
shape has two shapes inside it. The first is a transformation shape hat will execute
the map. The second is a message assignment shape hat will insert the messageid into
the destination schema.
</p>
        <p>
The message assignment shape looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/MesageAssignment.jpg">
            <img title="MesageAssignment" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="547" alt="MesageAssignment" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/MesageAssignment_thumb.jpg" width="754" border="0" />
          </a>
        </p>
        <p>
        </p>
        <p>
I made the MessageID field of he output a distinguished field and can therefore insert
values into it. This is quite clever . the way you can do several things to a message
as long as you are still inside the same Construct Message shape. After the map, where
I let the MessageID field be empty, I can insert a value into this field using a distinguished
field. I could also just as easily have used XPath to do that, but that is not as
readable, so I didn’t do it.
</p>
        <p>
So… This was the first post of two – next time I will look at the receive port version
of the Context Accessor functoid.
</p>
        <p>
And one last point: If the idea i just to get an Id into a message and it doesn’t
have to be the message ID of a message, you can also just use the “New GUID” functoid
found at <a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/">http://eebiztalkfunctoids.codeplex.com/</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c52076db-86d4-489a-b07b-1ea7ee7d2506" />
      </body>
      <title>The Context Accessor functoid, part I</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c52076db-86d4-489a-b07b-1ea7ee7d2506.aspx</guid>
      <link>http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx</link>
      <pubDate>Wed, 01 Apr 2009 22:54:15 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
At &lt;a title="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecaa2059-d78e-449f-8eb0-37696847b4b0" href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecaa2059-d78e-449f-8eb0-37696847b4b0"&gt;http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecaa2059-d78e-449f-8eb0-37696847b4b0&lt;/a&gt; there
is a guy who is struggling to get the MessageID into a message inside a map.
&lt;/p&gt;
&lt;p&gt;
I have been trying to help him and have come to a stand still, because I missed a
very important point. The MessageID is “written” and not promoted to the context base.
Therefore, it cannot be read using the functoid found at &lt;a title="http://www.codeplex.com/ContextAccessor" href="http://www.codeplex.com/ContextAccessor"&gt;http://www.codeplex.com/ContextAccessor&lt;/a&gt; (The
one used inside an orchestration).
&lt;/p&gt;
&lt;p&gt;
So basically, you can use the functoid to get hold of all the properties that were
promoted into the context, but the ones that were written, you need to get to some
other way.
&lt;/p&gt;
&lt;p&gt;
I have created a small sample that illustrates how to do this inside an orchestration.
&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:8939f26b-09c0-46bc-9204-e5c1f08f0be0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
It can be downloaded &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/ContextAccessorTest.zip" target="_blank"&gt;here.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Basically, I have a schema for the input:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Inputschema.jpg"&gt;&lt;img title="Inputschema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="175" alt="Inputschema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Inputschema_thumb.jpg" width="296" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
It has two fields, and I have promoted the first field.
&lt;/p&gt;
&lt;p&gt;
The output schema looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/OutputSchema.jpg"&gt;&lt;img title="OutputSchema" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="211" alt="OutputSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/OutputSchema_thumb.jpg" width="353" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
It has four fields.
&lt;/p&gt;
&lt;p&gt;
What I want in the output is this:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Field1: The value from Field1 in the source schema. It isn’t to be mapped directly,
though. I want to demonstrate that the functoid can be used to get values that were
promoted from a schema.&lt;/li&gt;
&lt;li&gt;
Field2: The value from Field2 in the source schema. Mapped directly&lt;/li&gt;
&lt;li&gt;
MessageID: The Message ID of he input message. Since this isn’t accessible by the
functoid, I will use a Message Assignment shape to do that&lt;/li&gt;
&lt;li&gt;
ReceivedFileName: Will contain the content of the BTS.ReceivedFileName poperty – by
using the functoid.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The map looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Map.jpg"&gt;&lt;img title="Map" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="506" alt="Map" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Map_thumb.jpg" width="467" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I am using the ContextAccessor (for orchestations) to fill a value into Field1 and
ReceivedFileName. I am mapping Field2 directly. The MessageID field I am not mapping,
since I need a message assignment shape for that. The element “MessageID” must be
present in the output, though. Otherwise i cannot fill in value. So, as you can see
in the screenshot, I have set the “Value” property to “&amp;lt;empty&amp;gt;”. This will create
an empty element. This feature is very handy for initializing elements that will later
on get values from message assignment shapes but also for creating the needed empty
fields for demotion.
&lt;/p&gt;
&lt;p&gt;
Anyway, the parameters for the first functoid look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/FirstFunctoid.jpg"&gt;&lt;img title="FirstFunctoid" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="443" alt="FirstFunctoid" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/FirstFunctoid_thumb.jpg" width="349" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The parameters are:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The name of the message to get the value from.&lt;/li&gt;
&lt;li&gt;
The name of the property&lt;/li&gt;
&lt;li&gt;
The name space of the property schema that property exists in.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The second functoid looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/SecondFunctoid.jpg"&gt;&lt;img title="SecondFunctoid" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="443" alt="SecondFunctoid" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/SecondFunctoid_thumb.jpg" width="349" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now, the final touch is the orchestration:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Orchestration.jpg"&gt;&lt;img title="Orchestration" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="474" alt="Orchestration" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/Orchestration_thumb.jpg" width="362" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Quite simple… A receive, a construct and a send port for the output. The construct
shape has two shapes inside it. The first is a transformation shape hat will execute
the map. The second is a message assignment shape hat will insert the messageid into
the destination schema.
&lt;/p&gt;
&lt;p&gt;
The message assignment shape looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/MesageAssignment.jpg"&gt;&lt;img title="MesageAssignment" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="547" alt="MesageAssignment" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/TheContextAccessorfunctoidpartI_CAB/MesageAssignment_thumb.jpg" width="754" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
I made the MessageID field of he output a distinguished field and can therefore insert
values into it. This is quite clever . the way you can do several things to a message
as long as you are still inside the same Construct Message shape. After the map, where
I let the MessageID field be empty, I can insert a value into this field using a distinguished
field. I could also just as easily have used XPath to do that, but that is not as
readable, so I didn’t do it.
&lt;/p&gt;
&lt;p&gt;
So… This was the first post of two – next time I will look at the receive port version
of the Context Accessor functoid.
&lt;/p&gt;
&lt;p&gt;
And one last point: If the idea i just to get an Id into a message and it doesn’t
have to be the message ID of a message, you can also just use the “New GUID” functoid
found at &lt;a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/"&gt;http://eebiztalkfunctoids.codeplex.com/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c52076db-86d4-489a-b07b-1ea7ee7d2506" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c52076db-86d4-489a-b07b-1ea7ee7d2506.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d0d846ff-0bad-4adb-b0c3-74a3d5d302f5</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d0d846ff-0bad-4adb-b0c3-74a3d5d302f5.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d0d846ff-0bad-4adb-b0c3-74a3d5d302f5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d0d846ff-0bad-4adb-b0c3-74a3d5d302f5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Alister Whitford has a question today on the online forums about preserving white
space in a map. He thought that the functionality has changed between BizTalk 2006
and BizTalk 2006 R2. He has done a great job looking into stuff and it appears he
is right. You can check out he thread here: <a title="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7dd28a9b-16b5-4c0e-90db-843caf4689ee" href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7dd28a9b-16b5-4c0e-90db-843caf4689ee">http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7dd28a9b-16b5-4c0e-90db-843caf4689ee</a> where
he also shows how not to preserve white space in R2 and thus have the same functionality
as in 2006 (non-R2).
</p>
        <p>
Hope this helps someone
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d0d846ff-0bad-4adb-b0c3-74a3d5d302f5" />
      </body>
      <title>Preserving white space in BizTalk map</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d0d846ff-0bad-4adb-b0c3-74a3d5d302f5.aspx</guid>
      <link>http://blog.eliasen.dk/2009/03/31/PreservingWhiteSpaceInBizTalkMap.aspx</link>
      <pubDate>Tue, 31 Mar 2009 21:05:41 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Alister Whitford has a question today on the online forums about preserving white
space in a map. He thought that the functionality has changed between BizTalk 2006
and BizTalk 2006 R2. He has done a great job looking into stuff and it appears he
is right. You can check out he thread here: &lt;a title="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7dd28a9b-16b5-4c0e-90db-843caf4689ee" href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7dd28a9b-16b5-4c0e-90db-843caf4689ee"&gt;http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7dd28a9b-16b5-4c0e-90db-843caf4689ee&lt;/a&gt; where
he also shows how not to preserve white space in R2 and thus have the same functionality
as in 2006 (non-R2).
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d0d846ff-0bad-4adb-b0c3-74a3d5d302f5" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d0d846ff-0bad-4adb-b0c3-74a3d5d302f5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f33b874e-fa6a-4478-ac31-b9298804bbb4</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f33b874e-fa6a-4478-ac31-b9298804bbb4.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f33b874e-fa6a-4478-ac31-b9298804bbb4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f33b874e-fa6a-4478-ac31-b9298804bbb4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
          <strong>Disclaimer: I do NOT encourage the usage of he information in this blog post.
The post is merely about some silly experiment, he results thereof and a conclusion
on it.</strong>
        </p>
        <p>
So, this <a href="http://geekswithblogs.net/tubb/Default.aspx" target="_blank">friend
of mine</a> (and former colleague) mentions every now and then that he isn’t all that
sure that the “No subscribers found” should be an error but maybe more a warning.
His man argument is, that if I have two subscribers for something, say all incoming
orders are put into an archive file drop and also sent to the ERP system, and the
send port that sends to the ERP system is unenlisted, then no errors will occur in
BizTalk, but from a business point of view, the system is definitely not working.
So the fact that you don’t get the error that indicates something is wrong with routing
is not actually very useful, because parts of the system may be down after all.
</p>
        <p>
Anyway, we were discussing what to do about this in case you just don’t want that
error to occur if no subscribers were found. We came up with two options:
</p>
        <ol>
          <li>
Add a send port that uses Tomas Restrepos /dev/null adapter. you can find it at <a title="http://winterdom.com/dev/bts/index.html" href="http://winterdom.com/dev/bts/index.html">http://winterdom.com/dev/bts/index.html</a> –
look for “<a href="http://winterdom.com/NullAdapterR2.zip">BizTalk 2006 R2 Null Send
Adapter</a>”. Using this adapter in the send port will cause everything going through
the port to magically disappear. 
</li>
          <li>
Mostly for fun we came up with the idea to have an orchestration that only as one
receive shape. This receive shape should receive a message of type System.Xml.XmlDocument
– since this will let the orchestration receive any message types. Also, it would
have to be a direct bound port, so the orhestration would get ALL messages that are
published to the MessageBox, so we would never get the “No subscribers found” error.
Now, naturally, this solution is extremely silly, since we would fire up an orchestration
for all published messages. But we started thinking what the subscription would look
like. 
</li>
        </ol>
        <p>
The rest of this post is to explore item 2 above to find out how the subscription
would look like.
</p>
        <p>
To do this, I created four scenarios – just to explain it to you.
</p>
        <p>
The four scenarios are:
</p>
        <ol>
          <li>
An orchestration that receives a message of type ReceiveSchema.xsd and is linked to
a “Specify Later” port. This is the normal and widely used scenario. 
</li>
          <li>
An orchestration that receives a message of type System.Xml.XmlDocument from a “Specify
Later” port. The common way of receiving binary files or any file without caring about
what files they are. 
</li>
          <li>
An orchestration that receives a message of type ReceiveSchema.xsd and is linked to
a direct bound port. This is the common way to receive ALL published orders, no matter
what receive port or orchestration they were published from. 
</li>
          <li>
An orchestration that received a message of type System.Xml.XmlDocument and is linked
to a direct bound port. This is not something I have ever seen used, but this is what
I want to find out about :-) 
</li>
        </ol>
        <p>
So, to summon up the subscriptions:
</p>
        <table cellspacing="5" cellpadding="5" width="100%" border="1">
          <tbody>
            <tr>
              <td valign="top">
                <strong>Scenario</strong>
              </td>
              <td valign="top">
                <strong>Subsription</strong>
              </td>
              <td valign="top">
                <strong>Description</strong>
              </td>
            </tr>
            <tr>
              <td valign="top">
1</td>
              <td valign="top">
                <p>
                  <a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID">http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID</a> ==
{C464C9C6-F4BB-4ADF-9322-B2E89E6C8885}  And 
<br /><a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType">http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType</a> ==
http://ReceiveEverything.ReceiveSchema#ReceiveSchemaRoot
</p>
              </td>
              <td valign="top">
This is the most common subscription. It consists of both a ReceivePortID (Because
the logical port is bound to a physical port) and the message type (Because I am using
a strongly typed message).</td>
            </tr>
            <tr>
              <td valign="top">
2</td>
              <td valign="top">
                <a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID">http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID</a> ==
{C464C9C6-F4BB-4ADF-9322-B2E89E6C8885}</td>
              <td valign="top">
This subscription is partly like the first one. The ReceivePortID part is the same,
but no message type is specified. This is because I am using System.Xml.XmlDocument
as message type, and this is just a “catch all” message type.</td>
            </tr>
            <tr>
              <td valign="top">
3</td>
              <td valign="top">
                <a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType">http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType</a> ==
http://ReceiveEverything.ReceiveSchema#ReceiveSchemaRoot</td>
              <td valign="top">
This subscription has the part of the first subscription that was missing from the
second one and it doesn’t have the part that was actually in the second subscription.
This is because I am now using a direct bound port, and therefore the port ID becomes
irrelevant in the subscription. I am using a strongly typed message, though, so the
message type is relevant.</td>
            </tr>
            <tr>
              <td valign="top">
4</td>
              <td valign="top">
 </td>
              <td valign="top">
Surprised? A completely empty subscription. Kind of makes sense, when you think about
it, since we are using a direct port, so the port ID is irrelevant and we are using
a untyped message, making the message type irrelevant.</td>
            </tr>
          </tbody>
        </table>
        <p>
Now then… As I wrote, it makes sense, but it wasn’t what I was expecting, actually.
With this empty subscription, I STILL get the “No subscribers found” error when I
pick up a message and publish it into the Message Box.
</p>
        <p>
So instead of doing this, I started thinking about what else to do. So I created a
receive port with a receive location and let a message go through it and get suspended.
Looking at the details of the context of the message that was suspended I gor this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/ReceiveLocationSuspended_2.jpg">
            <img title="ReceiveLocationSuspended" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="781" alt="ReceiveLocationSuspended" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/ReceiveLocationSuspended_thumb.jpg" width="714" border="0" />
          </a>
        </p>
        <p>
        </p>
        <p>
So… I need a subscription that is not empty, but that will make sure my orchestration
gets EVERYTING that is published into the MessageBox. This is done by setting the
filter on he receive shape of my orchestration in scenario 4. The filter will have
to include one of he above properties that is promoted. But looking at them I really
don’t expect a message created inside an orchestration and then sent to the messagebox
to have any of those properties set. So I decided to create a small orchestration
that will simply just send a message to the messagebox. The context of the message
published to the MesageBox looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/OrchesrationSuspended.jpg">
            <img title="OrchesrationSuspended" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="364" alt="OrchesrationSuspended" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/OrchesrationSuspended_thumb.jpg" width="643" border="0" />
          </a>
        </p>
        <p>
As you can see, no overlap at all.
</p>
        <p>
So, as I see it, a filter like “BTS.ReceivePortID exists OR BTS.Operation exists”
should do the trick. Now, this subscription works in my small example, but I cannot
guarantee it will work for all scenarios. I can’t think of an example right now where
either the ReceivePortID or the Operation doesn’t exist, but there might be examples.
</p>
        <p>
So… Basically, the whole idea about having an orchestration taking in ALL published
messages to avoid errors about no subscribers is REALLY silly and should not be implemented.
And if you choose to do it anyway, please remember that the above filter isn’t guaranteed
to work in all scenarios… I was just playing around :-)
</p>
        <p>
Not sure this will ever help anyone… but there goes :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f33b874e-fa6a-4478-ac31-b9298804bbb4" />
      </body>
      <title>“Weird” subscription when dealing with no subscribers found</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f33b874e-fa6a-4478-ac31-b9298804bbb4.aspx</guid>
      <link>http://blog.eliasen.dk/2009/03/31/WeirdSubscriptionWhenDealingWithNoSubscribersFound.aspx</link>
      <pubDate>Tue, 31 Mar 2009 20:48:02 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Disclaimer: I do NOT encourage the usage of he information in this blog post.
The post is merely about some silly experiment, he results thereof and a conclusion
on it.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
So, this &lt;a href="http://geekswithblogs.net/tubb/Default.aspx" target="_blank"&gt;friend
of mine&lt;/a&gt; (and former colleague) mentions every now and then that he isn’t all that
sure that the “No subscribers found” should be an error but maybe more a warning.
His man argument is, that if I have two subscribers for something, say all incoming
orders are put into an archive file drop and also sent to the ERP system, and the
send port that sends to the ERP system is unenlisted, then no errors will occur in
BizTalk, but from a business point of view, the system is definitely not working.
So the fact that you don’t get the error that indicates something is wrong with routing
is not actually very useful, because parts of the system may be down after all.
&lt;/p&gt;
&lt;p&gt;
Anyway, we were discussing what to do about this in case you just don’t want that
error to occur if no subscribers were found. We came up with two options:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Add a send port that uses Tomas Restrepos /dev/null adapter. you can find it at &lt;a title="http://winterdom.com/dev/bts/index.html" href="http://winterdom.com/dev/bts/index.html"&gt;http://winterdom.com/dev/bts/index.html&lt;/a&gt; –
look for “&lt;a href="http://winterdom.com/NullAdapterR2.zip"&gt;BizTalk 2006 R2 Null Send
Adapter&lt;/a&gt;”. Using this adapter in the send port will cause everything going through
the port to magically disappear. 
&lt;/li&gt;
&lt;li&gt;
Mostly for fun we came up with the idea to have an orchestration that only as one
receive shape. This receive shape should receive a message of type System.Xml.XmlDocument
– since this will let the orchestration receive any message types. Also, it would
have to be a direct bound port, so the orhestration would get ALL messages that are
published to the MessageBox, so we would never get the “No subscribers found” error.
Now, naturally, this solution is extremely silly, since we would fire up an orchestration
for all published messages. But we started thinking what the subscription would look
like. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The rest of this post is to explore item 2 above to find out how the subscription
would look like.
&lt;/p&gt;
&lt;p&gt;
To do this, I created four scenarios – just to explain it to you.
&lt;/p&gt;
&lt;p&gt;
The four scenarios are:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
An orchestration that receives a message of type ReceiveSchema.xsd and is linked to
a “Specify Later” port. This is the normal and widely used scenario. 
&lt;/li&gt;
&lt;li&gt;
An orchestration that receives a message of type System.Xml.XmlDocument from a “Specify
Later” port. The common way of receiving binary files or any file without caring about
what files they are. 
&lt;/li&gt;
&lt;li&gt;
An orchestration that receives a message of type ReceiveSchema.xsd and is linked to
a direct bound port. This is the common way to receive ALL published orders, no matter
what receive port or orchestration they were published from. 
&lt;/li&gt;
&lt;li&gt;
An orchestration that received a message of type System.Xml.XmlDocument and is linked
to a direct bound port. This is not something I have ever seen used, but this is what
I want to find out about :-) 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So, to summon up the subscriptions:
&lt;/p&gt;
&lt;table cellspacing="5" cellpadding="5" width="100%" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Scenario&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Subsription&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
1&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;p&gt;
&lt;a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID"&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID&lt;/a&gt; ==
{C464C9C6-F4BB-4ADF-9322-B2E89E6C8885}&amp;#160; And 
&lt;br /&gt;
&lt;a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType"&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType&lt;/a&gt; ==
http://ReceiveEverything.ReceiveSchema#ReceiveSchemaRoot
&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top"&gt;
This is the most common subscription. It consists of both a ReceivePortID (Because
the logical port is bound to a physical port) and the message type (Because I am using
a strongly typed message).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
2&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID"&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID&lt;/a&gt; ==
{C464C9C6-F4BB-4ADF-9322-B2E89E6C8885}&lt;/td&gt;
&lt;td valign="top"&gt;
This subscription is partly like the first one. The ReceivePortID part is the same,
but no message type is specified. This is because I am using System.Xml.XmlDocument
as message type, and this is just a “catch all” message type.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
3&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;a href="http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType"&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType&lt;/a&gt; ==
http://ReceiveEverything.ReceiveSchema#ReceiveSchemaRoot&lt;/td&gt;
&lt;td valign="top"&gt;
This subscription has the part of the first subscription that was missing from the
second one and it doesn’t have the part that was actually in the second subscription.
This is because I am now using a direct bound port, and therefore the port ID becomes
irrelevant in the subscription. I am using a strongly typed message, though, so the
message type is relevant.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
4&lt;/td&gt;
&lt;td valign="top"&gt;
&amp;#160;&lt;/td&gt;
&lt;td valign="top"&gt;
Surprised? A completely empty subscription. Kind of makes sense, when you think about
it, since we are using a direct port, so the port ID is irrelevant and we are using
a untyped message, making the message type irrelevant.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Now then… As I wrote, it makes sense, but it wasn’t what I was expecting, actually.
With this empty subscription, I STILL get the “No subscribers found” error when I
pick up a message and publish it into the Message Box.
&lt;/p&gt;
&lt;p&gt;
So instead of doing this, I started thinking about what else to do. So I created a
receive port with a receive location and let a message go through it and get suspended.
Looking at the details of the context of the message that was suspended I gor this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/ReceiveLocationSuspended_2.jpg"&gt;&lt;img title="ReceiveLocationSuspended" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="781" alt="ReceiveLocationSuspended" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/ReceiveLocationSuspended_thumb.jpg" width="714" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
So… I need a subscription that is not empty, but that will make sure my orchestration
gets EVERYTING that is published into the MessageBox. This is done by setting the
filter on he receive shape of my orchestration in scenario 4. The filter will have
to include one of he above properties that is promoted. But looking at them I really
don’t expect a message created inside an orchestration and then sent to the messagebox
to have any of those properties set. So I decided to create a small orchestration
that will simply just send a message to the messagebox. The context of the message
published to the MesageBox looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/OrchesrationSuspended.jpg"&gt;&lt;img title="OrchesrationSuspended" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="364" alt="OrchesrationSuspended" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Weirdsubscriptionwhendealingwithnosubscr_2C9/OrchesrationSuspended_thumb.jpg" width="643" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see, no overlap at all.
&lt;/p&gt;
&lt;p&gt;
So, as I see it, a filter like “BTS.ReceivePortID exists OR BTS.Operation exists”
should do the trick. Now, this subscription works in my small example, but I cannot
guarantee it will work for all scenarios. I can’t think of an example right now where
either the ReceivePortID or the Operation doesn’t exist, but there might be examples.
&lt;/p&gt;
&lt;p&gt;
So… Basically, the whole idea about having an orchestration taking in ALL published
messages to avoid errors about no subscribers is REALLY silly and should not be implemented.
And if you choose to do it anyway, please remember that the above filter isn’t guaranteed
to work in all scenarios… I was just playing around :-)
&lt;/p&gt;
&lt;p&gt;
Not sure this will ever help anyone… but there goes :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f33b874e-fa6a-4478-ac31-b9298804bbb4" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f33b874e-fa6a-4478-ac31-b9298804bbb4.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a2794b4a-4d32-400b-866e-584ac5b34d5a</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a2794b4a-4d32-400b-866e-584ac5b34d5a.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a2794b4a-4d32-400b-866e-584ac5b34d5a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a2794b4a-4d32-400b-866e-584ac5b34d5a</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Someone at the online general BizTalk forum asked a question about combining two messages
in a map. Now, he all ready knew about creating the map from inside an orchestration,
but let me just quickly summon up for those not knowing this. If you have two messages
inside an orchestration that you need to merge into one message in a map, what you
do is that you drag a transformation shape into your orchestration like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputOrchestration_2.jpg">
            <img title="DualInputOrchestration" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="657" alt="DualInputOrchestration" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputOrchestration_thumb.jpg" width="743" border="0" />
          </a>
        </p>
        <p>
In my example, I have a parallel convoy to get the two input messages into my orchestration.
I then have two different ways of combining the two input messages into one output,
and each is then output.
</p>
        <p>
Anyway, after the transform shape is dragged onto the orchestration designer, you
double-click on it to choose input and output messages like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputCreateMap_2.jpg">
            <img title="DualInputCreateMap" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="469" alt="DualInputCreateMap" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputCreateMap_thumb.jpg" width="556" border="0" />
          </a>
        </p>
        <p>
You can add as many source messages as you want – I have chosen two messages. Make
sure the checkbox at the bottom is selected. Then click “OK” and the mapper will open
up. It will have created an input schema for you, which is basically a root node that
wraps the selected source messages. At runtime, the orchestration engine will take
your messages and wrap them to match this schema and use that as input for the map.
</p>
        <p>
In my case, I have these two schemas:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBill_2.jpg">
            <img title="DualInputSchemaHouseBill" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="132" alt="DualInputSchemaHouseBill" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBill_thumb.jpg" width="197" border="0" />
          </a> 
</p>
        <p>
and
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBill.jpg">
            <img title="DualInputSchemaWayBill" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="144" alt="DualInputSchemaWayBill" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBill_thumb.jpg" width="194" border="0" />
          </a>
        </p>
        <p>
        </p>
        <p>
My output schema looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutput.jpg">
            <img title="DualInputSchemaOutput" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="141" alt="DualInputSchemaOutput" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutput_thumb.jpg" width="188" border="0" />
          </a>
        </p>
        <p>
The automatically generated map looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputGeneratedMap.jpg">
            <img title="DualInputGeneratedMap" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="320" alt="DualInputGeneratedMap" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputGeneratedMap_thumb.jpg" width="557" border="0" />
          </a>
        </p>
        <p>
As you can see, the destination schema is just like my output schema, but the input
schema wraps my two input schemas into one schema.
</p>
        <p>
So… I have just briefly explained how two create the map that can combine two messages
into one. Now for the functionality inside the map.
</p>
        <p>
Most maps like this can be mapped like any other complex input schema. But sometimes
you need to somehow merge elements inside the source messages into one element/record
in the destination. This automatically becomes different, because the values will
appear in different parts of the input tree.
</p>
        <p>
The requirement that was expressed by the person asking the question in the online
forum was that these two inputs:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBillExample_2.jpg">
            <img title="DualInputSchemaHouseBillExample" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="282" alt="DualInputSchemaHouseBillExample" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBillExample_thumb.jpg" width="614" border="0" />
          </a>
        </p>
        <p>
and
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBillExample.jpg">
            <img title="DualInputSchemaWayBillExample" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="329" alt="DualInputSchemaWayBillExample" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBillExample_thumb.jpg" width="587" border="0" />
          </a>
        </p>
        <p>
and combine them into this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutputExample_2.jpg">
            <img title="DualInputSchemaOutputExample" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="356" alt="DualInputSchemaOutputExample" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutputExample_thumb.jpg" width="599" border="0" />
          </a>
        </p>
        <p>
So basically, there is a key that is needed to combine records in the two inputs.
My schemas above are my own schemas that roughly look like the schema that was in
use in the forum.
</p>
        <p>
My first map that will solve the given problem looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapFunctoids.jpg">
            <img title="DualInputMapFunctoids" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="321" alt="DualInputMapFunctoids" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapFunctoids_thumb.jpg" width="635" border="0" />
          </a>
        </p>
        <p>
Quite simple, actually. I use the looping functoid to create the right number of output
elements, and I use the iteration and index functoids to get the corresponding values
from the WayBill part of the source schema. The index funtoid can take a lot of inputs.
In my case the path to the element is always the first until the vey last step, where
I need to use the output of the iteration functoid. So I have only two inputs: The
element that loops and the index of the parent of this element because that is the
only place where I need to go to a specific element.
</p>
        <p>
This works very nicely, but it has one serious drawback (and a minor one, which I
will get back to later): It requires that the elements appear in the exact same order
in both inputs. If this restriction can be proven valid, then this is my favorite
solution, since I am a fan of using the built-in functoids over scripting functoids
and custom XSLT if at all possible. I didn’t ask the person who had the issue if this
restriction is valid, but thought I’d try another approach that will work around this
just in case. This requires some XSLT, unfortunately, and the map looks like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapXSLT.jpg">
            <img title="DualInputMapXSLT" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="317" alt="DualInputMapXSLT" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapXSLT_thumb.jpg" width="521" border="0" />
          </a>
        </p>
        <p>
Quite simple, really :-) The scripting functoid takes care of the job for me. It is
an “Inline XSLT Call Template” functoid and the script goes like this:
</p>
        <p>
&lt;xsl:template name="BuildOutput"&gt; 
<br />
&lt;xsl:param name="ID" /&gt; 
<br />
&lt;xsl:element name="Output"&gt; 
<br />
&lt;xsl:element name="Number"&gt;&lt;xsl:value-of select="$ID"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;xsl:element name="OriginPortId"&gt;&lt;xsl:value-of select="/*[local-name()='Root'
and namespace-uri()='<a href="http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_0'">http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_0'</a> and
namespace-uri()='']/*[local-name()='HousebillRoot' and namespace-uri()='<a href="http://DualInput.DualSchemaHouseBillInput']/*[local-name()='HouseBillsNode'">http://DualInput.DualSchemaHouseBillInput']/*[local-name()='HouseBillsNode'</a> and
namespace-uri()=''][HouseBillNo = $ID]/*[local-name()='OriginPortId' and namespace-uri()='']"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;xsl:element name="ShippingAddress"&gt;&lt;xsl:value-of select="/*[local-name()='Root'
and namespace-uri()='<a href="http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'">http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'</a> and
namespace-uri()='']/*[local-name()='WayBillRoot' and namespace-uri()='<a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'">http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'</a> and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ShippingAddress' and namespace-uri()='']"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;xsl:element name="ContainerAddress"&gt;&lt;xsl:value-of select="/*[local-name()='Root'
and namespace-uri()='<a href="http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'">http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'</a> and
namespace-uri()='']/*[local-name()='WayBillRoot' and namespace-uri()='<a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'">http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'</a> and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ContainerAddress' and namespace-uri()='']"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;/xsl:element&gt; 
<br />
&lt;/xsl:template&gt;
</p>
        <p>
Now this looks complex, but really it isn’t. Let me try to shorten it for you to be
more readable:
</p>
        <p>
&lt;xsl:template name="BuildOutput"&gt; 
<br />
&lt;xsl:param name="ID" /&gt; 
<br />
&lt;xsl:element name="Output"&gt; 
<br />
&lt;xsl:element name="Number"&gt;&lt;xsl:value-of select="$ID"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;xsl:element name="OriginPortId"&gt;&lt;xsl:value-of select="XXX<a href="http://DualInput.DualSchemaHouseBillInput']/*[local-name()='HouseBillsNode'">/*[local-name()='HouseBillsNode'</a> and
namespace-uri()=''][HouseBillNo = $ID]/*[local-name()='OriginPortId' and namespace-uri()='']"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;xsl:element name="ShippingAddress"&gt;&lt;xsl:value-of select="YYY<a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'">/*[local-name()='WayBillInfo'</a> and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ShippingAddress' and namespace-uri()='']"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;xsl:element name="ContainerAddress"&gt;&lt;xsl:value-of select="YYY<a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'">/*[local-name()='WayBillInfo'</a> and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ContainerAddress' and namespace-uri()='']"
/&gt;&lt;/xsl:element&gt; 
<br />
&lt;/xsl:element&gt; 
<br />
&lt;/xsl:template&gt;
</p>
        <p>
Here XXX is the XPath from the root node down to the HouseBillsNode node and YYY is
the XPath from the root node down to the WayBillInfo node.
</p>
        <p>
Basically, the script is fired by the map for each HouseBillNo element that appears
(3 in my example) and the script will create an Output element with the HousebillNo
value and i will then use the number to look up the values that correspond to the
key in the other parts of the input.
</p>
        <p>
There are some drawbacks to this solution as well, and I will just try to summon up
the drawbacks here:
</p>
        <p>
          <strong>Drawbacks for first maps</strong>
        </p>
        <ol>
          <li>
If the elements do not appear in the exact same order in both inputs, the map will
fail.</li>
        </ol>
        <p>
          <strong>Drawbacks for the second map</strong>
        </p>
        <ol>
          <li>
The script has not been adjusted to handle optional fields. So it will create the
output fields no matter if the input fields exist in the source. 
</li>
        </ol>
        <p>
          <strong>Drawbacks for both maps</strong>
        </p>
        <ol>
          <li>
If the HouseBill input has more elements than the other, then the output will be missing
values for the elements that would get there values form the second input.</li>
          <li>
If the HouseBill input has fewer elements than the other, then the output will simply
not have records corresponding to these extra elements in the WayBill input.</li>
          <li>
Both scenarios can be handled in the XSLT, naturally, if needed.</li>
        </ol>
        <p>
There are probably other drawbacks – most of them related to the fact that I was too
lazy to handle all exceptions that might occur. But you should get the idea anyway
:-)
</p>
        <p>
        </p>
        <div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:9d489e03-645a-48de-a608-c075871f4a81" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
The solution can be found <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInput.zip">here</a></p>
        </div>
.
<p>
Hope this helps some one…
</p><p>
-- 
<br />
eliasen
</p><img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a2794b4a-4d32-400b-866e-584ac5b34d5a" /></body>
      <title>Combining two messages in one map</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a2794b4a-4d32-400b-866e-584ac5b34d5a.aspx</guid>
      <link>http://blog.eliasen.dk/2009/03/25/CombiningTwoMessagesInOneMap.aspx</link>
      <pubDate>Wed, 25 Mar 2009 22:26:40 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Someone at the online general BizTalk forum asked a question about combining two messages
in a map. Now, he all ready knew about creating the map from inside an orchestration,
but let me just quickly summon up for those not knowing this. If you have two messages
inside an orchestration that you need to merge into one message in a map, what you
do is that you drag a transformation shape into your orchestration like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputOrchestration_2.jpg"&gt;&lt;img title="DualInputOrchestration" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="657" alt="DualInputOrchestration" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputOrchestration_thumb.jpg" width="743" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In my example, I have a parallel convoy to get the two input messages into my orchestration.
I then have two different ways of combining the two input messages into one output,
and each is then output.
&lt;/p&gt;
&lt;p&gt;
Anyway, after the transform shape is dragged onto the orchestration designer, you
double-click on it to choose input and output messages like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputCreateMap_2.jpg"&gt;&lt;img title="DualInputCreateMap" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="469" alt="DualInputCreateMap" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputCreateMap_thumb.jpg" width="556" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You can add as many source messages as you want – I have chosen two messages. Make
sure the checkbox at the bottom is selected. Then click “OK” and the mapper will open
up. It will have created an input schema for you, which is basically a root node that
wraps the selected source messages. At runtime, the orchestration engine will take
your messages and wrap them to match this schema and use that as input for the map.
&lt;/p&gt;
&lt;p&gt;
In my case, I have these two schemas:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBill_2.jpg"&gt;&lt;img title="DualInputSchemaHouseBill" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="132" alt="DualInputSchemaHouseBill" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBill_thumb.jpg" width="197" border="0" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
and
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBill.jpg"&gt;&lt;img title="DualInputSchemaWayBill" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="144" alt="DualInputSchemaWayBill" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBill_thumb.jpg" width="194" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
My output schema looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutput.jpg"&gt;&lt;img title="DualInputSchemaOutput" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="141" alt="DualInputSchemaOutput" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutput_thumb.jpg" width="188" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The automatically generated map looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputGeneratedMap.jpg"&gt;&lt;img title="DualInputGeneratedMap" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="320" alt="DualInputGeneratedMap" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputGeneratedMap_thumb.jpg" width="557" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see, the destination schema is just like my output schema, but the input
schema wraps my two input schemas into one schema.
&lt;/p&gt;
&lt;p&gt;
So… I have just briefly explained how two create the map that can combine two messages
into one. Now for the functionality inside the map.
&lt;/p&gt;
&lt;p&gt;
Most maps like this can be mapped like any other complex input schema. But sometimes
you need to somehow merge elements inside the source messages into one element/record
in the destination. This automatically becomes different, because the values will
appear in different parts of the input tree.
&lt;/p&gt;
&lt;p&gt;
The requirement that was expressed by the person asking the question in the online
forum was that these two inputs:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBillExample_2.jpg"&gt;&lt;img title="DualInputSchemaHouseBillExample" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="282" alt="DualInputSchemaHouseBillExample" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaHouseBillExample_thumb.jpg" width="614" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
and
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBillExample.jpg"&gt;&lt;img title="DualInputSchemaWayBillExample" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="329" alt="DualInputSchemaWayBillExample" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaWayBillExample_thumb.jpg" width="587" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
and combine them into this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutputExample_2.jpg"&gt;&lt;img title="DualInputSchemaOutputExample" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="356" alt="DualInputSchemaOutputExample" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputSchemaOutputExample_thumb.jpg" width="599" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So basically, there is a key that is needed to combine records in the two inputs.
My schemas above are my own schemas that roughly look like the schema that was in
use in the forum.
&lt;/p&gt;
&lt;p&gt;
My first map that will solve the given problem looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapFunctoids.jpg"&gt;&lt;img title="DualInputMapFunctoids" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="321" alt="DualInputMapFunctoids" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapFunctoids_thumb.jpg" width="635" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Quite simple, actually. I use the looping functoid to create the right number of output
elements, and I use the iteration and index functoids to get the corresponding values
from the WayBill part of the source schema. The index funtoid can take a lot of inputs.
In my case the path to the element is always the first until the vey last step, where
I need to use the output of the iteration functoid. So I have only two inputs: The
element that loops and the index of the parent of this element because that is the
only place where I need to go to a specific element.
&lt;/p&gt;
&lt;p&gt;
This works very nicely, but it has one serious drawback (and a minor one, which I
will get back to later): It requires that the elements appear in the exact same order
in both inputs. If this restriction can be proven valid, then this is my favorite
solution, since I am a fan of using the built-in functoids over scripting functoids
and custom XSLT if at all possible. I didn’t ask the person who had the issue if this
restriction is valid, but thought I’d try another approach that will work around this
just in case. This requires some XSLT, unfortunately, and the map looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapXSLT.jpg"&gt;&lt;img title="DualInputMapXSLT" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="317" alt="DualInputMapXSLT" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInputMapXSLT_thumb.jpg" width="521" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Quite simple, really :-) The scripting functoid takes care of the job for me. It is
an “Inline XSLT Call Template” functoid and the script goes like this:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;xsl:template name=&amp;quot;BuildOutput&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:param name=&amp;quot;ID&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;Output&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;Number&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;$ID&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;OriginPortId&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;/*[local-name()='Root'
and namespace-uri()='&lt;a href="http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_0'"&gt;http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_0'&lt;/a&gt; and
namespace-uri()='']/*[local-name()='HousebillRoot' and namespace-uri()='&lt;a href="http://DualInput.DualSchemaHouseBillInput']/*[local-name()='HouseBillsNode'"&gt;http://DualInput.DualSchemaHouseBillInput']/*[local-name()='HouseBillsNode'&lt;/a&gt; and
namespace-uri()=''][HouseBillNo = $ID]/*[local-name()='OriginPortId' and namespace-uri()='']&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;ShippingAddress&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;/*[local-name()='Root'
and namespace-uri()='&lt;a href="http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'"&gt;http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'&lt;/a&gt; and
namespace-uri()='']/*[local-name()='WayBillRoot' and namespace-uri()='&lt;a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'"&gt;http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'&lt;/a&gt; and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ShippingAddress' and namespace-uri()='']&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;ContainerAddress&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;/*[local-name()='Root'
and namespace-uri()='&lt;a href="http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'"&gt;http://schemas.microsoft.com/BizTalk/2003/aggschema']/*[local-name()='InputMessagePart_1'&lt;/a&gt; and
namespace-uri()='']/*[local-name()='WayBillRoot' and namespace-uri()='&lt;a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'"&gt;http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'&lt;/a&gt; and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ContainerAddress' and namespace-uri()='']&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Now this looks complex, but really it isn’t. Let me try to shorten it for you to be
more readable:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;xsl:template name=&amp;quot;BuildOutput&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:param name=&amp;quot;ID&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;Output&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;Number&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;$ID&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;OriginPortId&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;XXX&lt;a href="http://DualInput.DualSchemaHouseBillInput']/*[local-name()='HouseBillsNode'"&gt;/*[local-name()='HouseBillsNode'&lt;/a&gt; and
namespace-uri()=''][HouseBillNo = $ID]/*[local-name()='OriginPortId' and namespace-uri()='']&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;ShippingAddress&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;YYY&lt;a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'"&gt;/*[local-name()='WayBillInfo'&lt;/a&gt; and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ShippingAddress' and namespace-uri()='']&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;xsl:element name=&amp;quot;ContainerAddress&amp;quot;&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;YYY&lt;a href="http://DualInput.DualSchemaWayBillInput']/*[local-name()='WayBillInfo'"&gt;/*[local-name()='WayBillInfo'&lt;/a&gt; and
namespace-uri()=''][WayBillNo = $ID]/*[local-name()='ContainerAddress' and namespace-uri()='']&amp;quot;
/&amp;gt;&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;/xsl:element&amp;gt; 
&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Here XXX is the XPath from the root node down to the HouseBillsNode node and YYY is
the XPath from the root node down to the WayBillInfo node.
&lt;/p&gt;
&lt;p&gt;
Basically, the script is fired by the map for each HouseBillNo element that appears
(3 in my example) and the script will create an Output element with the HousebillNo
value and i will then use the number to look up the values that correspond to the
key in the other parts of the input.
&lt;/p&gt;
&lt;p&gt;
There are some drawbacks to this solution as well, and I will just try to summon up
the drawbacks here:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Drawbacks for first maps&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
If the elements do not appear in the exact same order in both inputs, the map will
fail.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Drawbacks for the second map&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The script has not been adjusted to handle optional fields. So it will create the
output fields no matter if the input fields exist in the source. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Drawbacks for both maps&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
If the HouseBill input has more elements than the other, then the output will be missing
values for the elements that would get there values form the second input.&lt;/li&gt;
&lt;li&gt;
If the HouseBill input has fewer elements than the other, then the output will simply
not have records corresponding to these extra elements in the WayBill input.&lt;/li&gt;
&lt;li&gt;
Both scenarios can be handled in the XSLT, naturally, if needed.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
There are probably other drawbacks – most of them related to the fact that I was too
lazy to handle all exceptions that might occur. But you should get the idea anyway
:-)
&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:9d489e03-645a-48de-a608-c075871f4a81" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
The solution can be found &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Combiningtwomessagesinonemap_1498A/DualInput.zip"&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
.&gt;
&lt;p&gt;
Hope this helps some one…
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a2794b4a-4d32-400b-866e-584ac5b34d5a" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a2794b4a-4d32-400b-866e-584ac5b34d5a.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=e62e6d97-5d72-47c4-bacf-c41c9fdfea5c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,e62e6d97-5d72-47c4-bacf-c41c9fdfea5c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,e62e6d97-5d72-47c4-bacf-c41c9fdfea5c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=e62e6d97-5d72-47c4-bacf-c41c9fdfea5c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I decided that it was time to put my functoid library which was earlier hosted at <a href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a> to
Codeplex.
</p>
        <p>
You can find them along with the documentation at <a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/">http://eebiztalkfunctoids.codeplex.com/</a> from
now on.
</p>
        <p>
Cheers
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=e62e6d97-5d72-47c4-bacf-c41c9fdfea5c" />
      </body>
      <title>My functoid library has moved</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,e62e6d97-5d72-47c4-bacf-c41c9fdfea5c.aspx</guid>
      <link>http://blog.eliasen.dk/2009/03/10/MyFunctoidLibraryHasMoved.aspx</link>
      <pubDate>Tue, 10 Mar 2009 20:36:19 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I decided that it was time to put my functoid library which was earlier hosted at &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt; to
Codeplex.
&lt;/p&gt;
&lt;p&gt;
You can find them along with the documentation at &lt;a title="http://eebiztalkfunctoids.codeplex.com/" href="http://eebiztalkfunctoids.codeplex.com/"&gt;http://eebiztalkfunctoids.codeplex.com/&lt;/a&gt; from
now on.
&lt;/p&gt;
&lt;p&gt;
Cheers
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=e62e6d97-5d72-47c4-bacf-c41c9fdfea5c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,e62e6d97-5d72-47c4-bacf-c41c9fdfea5c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=9594d33e-82cb-4e27-8c27-dd95b90af047</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,9594d33e-82cb-4e27-8c27-dd95b90af047.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,9594d33e-82cb-4e27-8c27-dd95b90af047.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=9594d33e-82cb-4e27-8c27-dd95b90af047</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A couple of months ago, while trying to solve the If-Then-Else issue within a map
in a nice way, a fellow BizTalk MVP suggested to me that I could just have the script
inside a custom scripting functoid and then copy the script from custom scripting
functoid to custom scripting functoid.
</p>
        <p>
Naturally (as I assumed it was, back then) I told him that this was impossible, because
BizTalk wouldn't let me have two custom scripting functoids which contains the same
method, ie. the two methods have the same signature.
</p>
        <p>
"Sure you can", he replied.... So I had to check it out... I fired up my BizTalk 2006
R2 virtual machine, and sure enough: He was right. I was in chock, because I was totally
sure i was right. so I fired up a BizTalk 2006 virtual machine and again; He was right
and I was wrong.
</p>
        <p>
Now... those who know me will know that when I am convinced I am right, I will usually
go to great lengths to prove it :-) So I stepped down a version and tried BizTalk
2004. Again no luck. 
</p>
        <p>
But FINALLY, when trying it on BizTalk 2002, it turned out that I was right. Back
in BizTalk 2002, scripts were in VBScript and here you can not have multiple custom
scripting functoids with methods with the same signature. In versions after BizTalk
2002, the compiler will collapse those methods into one, but in BizTalk 2000 and 2002,
this is not done, and therefore an error occurs. 
</p>
        <p>
So all in all, I discovered this limitation back in 2003 and never questioned it again
since. So let this be a lesson to all (especially me, because I always think I am
right :-) ) - that sometimes we need to reevaluate what we think we know.
</p>
        <p>
Hopefully this post will:
</p>
        <ol>
          <li>
encourage people to reevaluate opinions and knowledge</li>
          <li>
inform others like me, who thinks that you cannot have the same method signature twice
in a map, that this is wrong :-)</li>
        </ol>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9594d33e-82cb-4e27-8c27-dd95b90af047" />
      </body>
      <title>Several custom scripting functoid with the same method</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,9594d33e-82cb-4e27-8c27-dd95b90af047.aspx</guid>
      <link>http://blog.eliasen.dk/2009/03/09/SeveralCustomScriptingFunctoidWithTheSameMethod.aspx</link>
      <pubDate>Mon, 09 Mar 2009 20:51:43 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A couple of months ago, while trying to solve the If-Then-Else issue within a map
in a nice way, a fellow BizTalk MVP suggested to me that I could just have the script
inside a custom scripting functoid and then copy the script from custom scripting
functoid to custom scripting functoid.
&lt;/p&gt;
&lt;p&gt;
Naturally (as I assumed it was, back then) I told him that this was impossible, because
BizTalk wouldn't let me have two custom scripting functoids which contains the same
method, ie. the two methods have the same signature.
&lt;/p&gt;
&lt;p&gt;
"Sure you can", he replied.... So I had to check it out... I fired up my BizTalk 2006
R2 virtual machine, and sure enough: He was right. I was in chock, because I was totally
sure i was right. so I fired up a BizTalk 2006 virtual machine and again; He was right
and I was wrong.
&lt;/p&gt;
&lt;p&gt;
Now... those who know me will know that when I am convinced I am right, I will usually
go to great lengths to prove it :-) So I stepped down a version and tried BizTalk
2004. Again no luck. 
&lt;/p&gt;
&lt;p&gt;
But FINALLY, when trying it on BizTalk 2002, it turned out that I was right. Back
in BizTalk 2002, scripts were in VBScript and here you can not have multiple custom
scripting functoids with methods with the same signature. In versions after BizTalk
2002, the compiler will collapse those methods into one, but in BizTalk 2000 and 2002,
this is not done, and therefore an error occurs. 
&lt;/p&gt;
&lt;p&gt;
So all in all, I discovered this limitation back in 2003 and never questioned it again
since. So let this be a lesson to all (especially me, because I always think I am
right :-) ) - that sometimes we need to reevaluate what we think we know.
&lt;/p&gt;
&lt;p&gt;
Hopefully this post will:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
encourage people to reevaluate opinions and knowledge&lt;/li&gt;
&lt;li&gt;
inform others like me, who thinks that you cannot have the same method signature twice
in a map, that this is wrong :-)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9594d33e-82cb-4e27-8c27-dd95b90af047" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,9594d33e-82cb-4e27-8c27-dd95b90af047.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=7ddf7da4-2271-4794-87c3-d6ee533d9a7e</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,7ddf7da4-2271-4794-87c3-d6ee533d9a7e.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,7ddf7da4-2271-4794-87c3-d6ee533d9a7e.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=7ddf7da4-2271-4794-87c3-d6ee533d9a7e</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, I have written two previous posts about how to solve the If-Then-Else problem
in a map. The <a href="http://blog.eliasen.dk/2008/11/15/SolvingTheIfThenElseProblemInAMapPartI.aspx" target="_blank">first
post</a> discussed the way to use built-in functoids to solve the issue. The <a href="http://blog.eliasen.dk/2008/11/18/SolvingTheIfThenElseProblemInAMapPartII.aspx" target="_blank">second
post</a> discussed the issues I had creating a custom functoid to do the job.
</p>
        <p>
Well, I now have a new way of doing it, which is not just one functoid, but still
it's prettier than what I can do with the built-in functoids.
</p>
        <p>
Basically, as discussed in my post about the issues with the different functoid categories,
a functoid that is in the String category cannot accept a logical functoid as input.
A scripting functoid can accept a logical functoid as input, but I can't create a
custom scripting functoid where I decide what script to appear inside the scripting
functoid at design time.
</p>
        <p>
So the solution I am describing in this post is a combination of the two.
</p>
        <p>
This screenshot describes a map that solves the If-Then-Else problem:
</p>
        <p>
          <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="165" alt="IfThenElse" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartIII_FD2/IfThenElse_1.jpg" width="530" border="0" />
        </p>
        <p>
The blue functoid with the crappy icon is programmed by myself. It is a simple functoid,
which takes in three parameters, which are all strings. First, it tries to convert
the first parameter to a boolean. If this fails, a "false" is assumed. Then, if the
boolean was true, the second parameter is returned and if it was false, the third
parameter is returned.
</p>
        <p>
Now, since a string functoid cannot take a logical functoid as an input, I use a custom
scripting functoid that is very simple:
</p>
        <p>
public string Same(string str)<br />
{<br />
return str;<br />
} 
</p>
        <p>
Which is really annoying to have to do, since... well... I take in a string and return
the exact same string. Oh well... 
</p>
        <p>
You can find my functoid and the project that uses it as file downloads at the bottom
of this post. Note, that the functoid library contains a whole bunch of functoids,
of which only one is relevant. The library contains all the functoids I built trying
to solve the If-Then-Else issue. The only needed functoid will be included in my downloadable <a href="http://www.eliasen.eu/DownloadSoftware.aspx#functoids" target="_blank">functoid
library</a> at a later point. 
</p>
        <p>
Now, the advantages of this solution is, that it only requires three functoids all
together. The best I could do with the built-in functoids were four, and five were
sometimes the prettiest solution. 
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:733bd201-b7bb-46f3-9dde-ce8306b8235f" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
Functoid library: <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartIII_FD2/eliasen.eu.blogentries.ifthenelsefunctoid.zip" target="_blank">here</a></p>
        </div>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:55b78b42-3d81-49ba-9453-3a8fcd08123c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
Project that uses the functoid: <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartIII_FD2/IfThenElseCustomFunctoidAndScriptingFunctoid.zip" target="_blank">here</a></p>
        </div>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=7ddf7da4-2271-4794-87c3-d6ee533d9a7e" />
      </body>
      <title>Solving the "If-Then-Else" problem in a map - part III</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,7ddf7da4-2271-4794-87c3-d6ee533d9a7e.aspx</guid>
      <link>http://blog.eliasen.dk/2009/03/08/SolvingTheIfThenElseProblemInAMapPartIII.aspx</link>
      <pubDate>Sun, 08 Mar 2009 21:02:37 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, I have written two previous posts about how to solve the If-Then-Else problem
in a map. The &lt;a href="http://blog.eliasen.dk/2008/11/15/SolvingTheIfThenElseProblemInAMapPartI.aspx" target="_blank"&gt;first
post&lt;/a&gt; discussed the way to use built-in functoids to solve the issue. The &lt;a href="http://blog.eliasen.dk/2008/11/18/SolvingTheIfThenElseProblemInAMapPartII.aspx" target="_blank"&gt;second
post&lt;/a&gt; discussed the issues I had creating a custom functoid to do the job.
&lt;/p&gt;
&lt;p&gt;
Well, I now have a new way of doing it, which is not just one functoid, but still
it's prettier than what I can do with the built-in functoids.
&lt;/p&gt;
&lt;p&gt;
Basically, as discussed in my post about the issues with the different functoid categories,
a functoid that is in the String category cannot accept a logical functoid as input.
A scripting functoid can accept a logical functoid as input, but I can't create a
custom scripting functoid where I decide what script to appear inside the scripting
functoid at design time.
&lt;/p&gt;
&lt;p&gt;
So the solution I am describing in this post is a combination of the two.
&lt;/p&gt;
&lt;p&gt;
This screenshot describes a map that solves the If-Then-Else problem:
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="165" alt="IfThenElse" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartIII_FD2/IfThenElse_1.jpg" width="530" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
The blue functoid with the crappy icon is programmed by myself. It is a simple functoid,
which takes in three parameters, which are all strings. First, it tries to convert
the first parameter to a boolean. If this fails, a "false" is assumed. Then, if the
boolean was true, the second parameter is returned and if it was false, the third
parameter is returned.
&lt;/p&gt;
&lt;p&gt;
Now, since a string functoid cannot take a logical functoid as an input, I use a custom
scripting functoid that is very simple:
&lt;/p&gt;
&lt;p&gt;
public string Same(string str)&lt;br&gt;
{&lt;br&gt;
return str;&lt;br&gt;
} 
&lt;p&gt;
Which is really annoying to have to do, since... well... I take in a string and return
the exact same string. Oh well... 
&lt;p&gt;
You can find my functoid and the project that uses it as file downloads at the bottom
of this post. Note, that the functoid library contains a whole bunch of functoids,
of which only one is relevant. The library contains all the functoids I built trying
to solve the If-Then-Else issue. The only needed functoid will be included in my downloadable &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx#functoids" target="_blank"&gt;functoid
library&lt;/a&gt; at a later point. 
&lt;p&gt;
Now, the advantages of this solution is, that it only requires three functoids all
together. The best I could do with the built-in functoids were four, and five were
sometimes the prettiest solution. 
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:733bd201-b7bb-46f3-9dde-ce8306b8235f" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
Functoid library: &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartIII_FD2/eliasen.eu.blogentries.ifthenelsefunctoid.zip" target="_blank"&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:55b78b42-3d81-49ba-9453-3a8fcd08123c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
Project that uses the functoid: &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartIII_FD2/IfThenElseCustomFunctoidAndScriptingFunctoid.zip" target="_blank"&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=7ddf7da4-2271-4794-87c3-d6ee533d9a7e" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,7ddf7da4-2271-4794-87c3-d6ee533d9a7e.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3b1453ff-ea3f-4c04-979e-8fa9af6fc113</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3b1453ff-ea3f-4c04-979e-8fa9af6fc113.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3b1453ff-ea3f-4c04-979e-8fa9af6fc113.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3b1453ff-ea3f-4c04-979e-8fa9af6fc113</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, a colleague of mine is integrating with AS/400 and this system seems to be sending
all strings as all-uppercase. So a company name might look like this: "JANS SUPERCOMPANY
A/S". This really isn't what he wants output in the end, so I have built a functoid
and added it to my downloadable collection, which converts the "JANS SUPERCOMPANY
A/S" into "Jans Supercompany A/S". It has an optional set of strings that are not
to be messed with :-)
</p>
        <p>
Examples of output from the functoid. The second parameter is optional.
</p>
        <table cellspacing="5" cellpadding="5" width="100%" border="1">
          <tbody>
            <tr>
              <td valign="top">
                <strong>First input</strong>
              </td>
              <td valign="top">
                <strong>Second input</strong>
              </td>
              <td valign="top">
                <strong>Output</strong>
              </td>
            </tr>
            <tr>
              <td valign="top">
jan eliasen</td>
              <td valign="top">
 </td>
              <td valign="top">
Jan Eliasen</td>
            </tr>
            <tr>
              <td valign="top">
jan eliasen A/S</td>
              <td valign="top">
JAn</td>
              <td valign="top">
JAn Eliasen A/s</td>
            </tr>
            <tr>
              <td valign="top">
JAN ELIASEN A/S</td>
              <td valign="top">
Jan,A/S</td>
              <td valign="top">
Jan Eliasen A/S</td>
            </tr>
            <tr>
              <td valign="top">
This is a test string for the functoid</td>
              <td valign="top">
tHIS,A,fOr,silly</td>
              <td valign="top">
tHIS Is A Test String fOr the functoid</td>
            </tr>
          </tbody>
        </table>
        <p>
As always, you can download the functoid at <a href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a> -
where you can also download the documentation.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3b1453ff-ea3f-4c04-979e-8fa9af6fc113" />
      </body>
      <title>Aded functoid that converts a string of substrings into lowercasse with a capital first letter.</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3b1453ff-ea3f-4c04-979e-8fa9af6fc113.aspx</guid>
      <link>http://blog.eliasen.dk/2009/02/04/AdedFunctoidThatConvertsAStringOfSubstringsIntoLowercasseWithACapitalFirstLetter.aspx</link>
      <pubDate>Wed, 04 Feb 2009 00:09:39 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, a colleague of mine is integrating with AS/400 and this system seems to be sending
all strings as all-uppercase. So a company name might look like this: "JANS SUPERCOMPANY
A/S". This really isn't what he wants output in the end, so I have built a functoid
and added it to my downloadable collection, which converts the "JANS SUPERCOMPANY
A/S" into "Jans Supercompany A/S". It has an optional set of strings that are not
to be messed with :-)
&lt;/p&gt;
&lt;p&gt;
Examples of output from the functoid. The second parameter is optional.
&lt;/p&gt;
&lt;table cellspacing="5" cellpadding="5" width="100%" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;First input&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Second input&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Output&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
jan eliasen&lt;/td&gt;
&lt;td valign="top"&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign="top"&gt;
Jan Eliasen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
jan eliasen A/S&lt;/td&gt;
&lt;td valign="top"&gt;
JAn&lt;/td&gt;
&lt;td valign="top"&gt;
JAn Eliasen A/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
JAN ELIASEN A/S&lt;/td&gt;
&lt;td valign="top"&gt;
Jan,A/S&lt;/td&gt;
&lt;td valign="top"&gt;
Jan Eliasen A/S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
This is a test string for the functoid&lt;/td&gt;
&lt;td valign="top"&gt;
tHIS,A,fOr,silly&lt;/td&gt;
&lt;td valign="top"&gt;
tHIS Is A Test String fOr the functoid&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
As always, you can download the functoid at &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt; -
where you can also download the documentation.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3b1453ff-ea3f-4c04-979e-8fa9af6fc113" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3b1453ff-ea3f-4c04-979e-8fa9af6fc113.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f3072953-070c-40d6-abf0-fec8a69016e3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f3072953-070c-40d6-abf0-fec8a69016e3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f3072953-070c-40d6-abf0-fec8a69016e3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f3072953-070c-40d6-abf0-fec8a69016e3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
After I gave a BizTalk presentation at <a href="http://www.aanug.dk/" target="_blank">Aalborg
.NET User Group</a> I got a message from <a href="http://www.publicvoid.dk/" target="_blank">Søren
Spelling Lund</a> from <a href="http://www.anug.dk" target="_blank">Århus .NET User
Group</a> who wanted to interview me about BizTalk for a Podcast. Naturally, I accepted,
and the result can be found <a href="http://www.anug.dk/post/2009/01/04/ANUGCast-15-BizTalk-med-Jan-Eliasen.aspx" target="_blank">here</a>.
</p>
        <p>
Only in Danish, I am afraid.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f3072953-070c-40d6-abf0-fec8a69016e3" />
      </body>
      <title>BizTalk podcast</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f3072953-070c-40d6-abf0-fec8a69016e3.aspx</guid>
      <link>http://blog.eliasen.dk/2009/01/05/BizTalkPodcast.aspx</link>
      <pubDate>Mon, 05 Jan 2009 19:26:20 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
After I gave a BizTalk presentation at &lt;a href="http://www.aanug.dk/" target="_blank"&gt;Aalborg
.NET User Group&lt;/a&gt; I got a message from &lt;a href="http://www.publicvoid.dk/" target="_blank"&gt;Søren
Spelling Lund&lt;/a&gt; from &lt;a href="http://www.anug.dk" target="_blank"&gt;Århus .NET User
Group&lt;/a&gt; who wanted to interview me about BizTalk for a Podcast. Naturally, I accepted,
and the result can be found &lt;a href="http://www.anug.dk/post/2009/01/04/ANUGCast-15-BizTalk-med-Jan-Eliasen.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Only in Danish, I am afraid.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f3072953-070c-40d6-abf0-fec8a69016e3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f3072953-070c-40d6-abf0-fec8a69016e3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=023fd62c-aeee-4bff-a616-51b4f372ce22</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,023fd62c-aeee-4bff-a616-51b4f372ce22.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,023fd62c-aeee-4bff-a616-51b4f372ce22.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=023fd62c-aeee-4bff-a616-51b4f372ce22</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have added a new program to be downloaded for free from <a href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a>.
This time it is a program to help you do two things:
</p>
        <ol>
          <li>
Check an XML file to see if it is well formed 
</li>
          <li>
Validate an XML file against an XSD schema</li>
        </ol>
        <p>
I have had the need for a small utility to do this several times, in case a customer
has some XML, and they want to know if the XML is even valid. The check for well formed-ness
can be done by simply opening the file in Internet Explorer, but that is just soooo
slow for large files. I tried a 70MB XML file once. It took IE a couple of hours to
open it and tell me what was wrong with the XML. My utility did it in a few seconds.
</p>
        <p>
So, use it if you want...
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=023fd62c-aeee-4bff-a616-51b4f372ce22" />
      </body>
      <title>eliasen.eu - ValidateXML</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,023fd62c-aeee-4bff-a616-51b4f372ce22.aspx</guid>
      <link>http://blog.eliasen.dk/2008/12/23/eliaseneuValidateXML.aspx</link>
      <pubDate>Tue, 23 Dec 2008 20:38:25 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have added a new program to be downloaded for free from &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt;.
This time it is a program to help you do two things:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Check an XML file to see if it is well formed 
&lt;li&gt;
Validate an XML file against an XSD schema&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I have had the need for a small utility to do this several times, in case a customer
has some XML, and they want to know if the XML is even valid. The check for well formed-ness
can be done by simply opening the file in Internet Explorer, but that is just soooo
slow for large files. I tried a 70MB XML file once. It took IE a couple of hours to
open it and tell me what was wrong with the XML. My utility did it in a few seconds.
&lt;/p&gt;
&lt;p&gt;
So, use it if you want...
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=023fd62c-aeee-4bff-a616-51b4f372ce22" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,023fd62c-aeee-4bff-a616-51b4f372ce22.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d3456092-7232-46f7-8f68-c1d3a0e83724</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d3456092-7232-46f7-8f68-c1d3a0e83724.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d3456092-7232-46f7-8f68-c1d3a0e83724.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d3456092-7232-46f7-8f68-c1d3a0e83724</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today, I took the <a href="http://www.microsoft.com/learning/en/us/Exams/70-241.aspx" target="_blank">70-241</a> exam
in BizTalk 2006 R2.
</p>
        <p>
I passed, and am now MCTS: BizTalk Server 2006 R2 :-)
</p>
        <p>
I have now passed the exams in BizTalk 2000, BizTalk 2004, BizTalk 2006 and BizTalk
2006 R2. Anyone else out there who has done this? :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d3456092-7232-46f7-8f68-c1d3a0e83724" />
      </body>
      <title>MCTS: BizTalk Server 2006 R2</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d3456092-7232-46f7-8f68-c1d3a0e83724.aspx</guid>
      <link>http://blog.eliasen.dk/2008/12/23/MCTSBizTalkServer2006R2.aspx</link>
      <pubDate>Tue, 23 Dec 2008 20:37:35 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today, I took the &lt;a href="http://www.microsoft.com/learning/en/us/Exams/70-241.aspx" target="_blank"&gt;70-241&lt;/a&gt; exam
in BizTalk 2006 R2.
&lt;/p&gt;
&lt;p&gt;
I passed, and am now MCTS: BizTalk Server 2006 R2 :-)
&lt;/p&gt;
&lt;p&gt;
I have now passed the exams in BizTalk 2000, BizTalk 2004, BizTalk 2006 and BizTalk
2006 R2. Anyone else out there who has done this? :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d3456092-7232-46f7-8f68-c1d3a0e83724" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d3456092-7232-46f7-8f68-c1d3a0e83724.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=25c38ee4-4c16-4797-9887-410c36abada8</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,25c38ee4-4c16-4797-9887-410c36abada8.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,25c38ee4-4c16-4797-9887-410c36abada8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=25c38ee4-4c16-4797-9887-410c36abada8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
At <a href="http://www.logica.dk" target="_blank">Logica</a> we often participate
in different events where employees compete to see who rides their bike more often
to work, who walks the most steps in a month, and so on. After a month of competition,
we end up with a spreadsheet, where I may have walked 180.000 steps, but my colleague
Henrik only walked 78.000 steps (He is kind of a wimp :-) )
</p>
        <p>
So lets say that we want to give a prize to one of us, and Henrik should have a chance
of 78000/(78000+180000) (30,23%) of winning and I should have a chance of 180000/(78000+180000)
(69,77%) of winning. As the number of points and the number of contestants get bigger,
this becomes increasingly difficult to manage.
</p>
        <p>
Therefore, I have written a small winforms program, that helps you manage this. You
can add as many contestants as you like, and give them points. If you are only interested
in a "normal" draw, you can just give all contestants one point.
</p>
        <p>
Screen shot:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/eliasen.euDraw_146CE/eliasen.eu.draw.screenshot.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="460" alt="eliasen.eu.draw.screenshot" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/eliasen.euDraw_146CE/eliasen.eu.draw.screenshot_thumb.jpg" width="548" border="0" />
          </a>
        </p>
        <p>
The program not only does the draw, it will also:
</p>
        <ul>
          <li>
Give you an overview of the contestants, their points and their chance of winning,
which is dynamically updated each time a contestant is added 
</li>
          <li>
Give you the opportunity to simulate any number of draws, to ensure that the program
is random. When doing the simulation, the percentage of wins by each contestant is
shown next to the chance of winning, so they can be compared.</li>
        </ul>
        <p>
I will gladly take comments, bug reports, suggestions, postcards, et cetera :-)
</p>
        <p>
The documentation can be found at <a href="http://www.eliasen.eu/DownloadSoftware.aspx#documentation">http://www.eliasen.eu/DownloadSoftware.aspx#documentation</a> and
the program can be downloaded at <a href="http://www.eliasen.eu/DownloadSoftware.aspx#winform">http://www.eliasen.eu/DownloadSoftware.aspx#winform</a>.
</p>
        <p>
I hope this comes in handy to someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=25c38ee4-4c16-4797-9887-410c36abada8" />
      </body>
      <title>eliasen.eu - Draw</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,25c38ee4-4c16-4797-9887-410c36abada8.aspx</guid>
      <link>http://blog.eliasen.dk/2008/12/23/eliaseneuDraw.aspx</link>
      <pubDate>Tue, 23 Dec 2008 20:27:44 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
At &lt;a href="http://www.logica.dk" target="_blank"&gt;Logica&lt;/a&gt; we often participate
in different events where employees compete to see who rides their bike more often
to work, who walks the most steps in a month, and so on. After a month of competition,
we end up with a spreadsheet, where I may have walked 180.000 steps, but my colleague
Henrik only walked 78.000 steps (He is kind of a wimp :-) )
&lt;/p&gt;
&lt;p&gt;
So lets say that we want to give a prize to one of us, and Henrik should have a chance
of 78000/(78000+180000) (30,23%) of winning and I should have a chance of 180000/(78000+180000)
(69,77%) of winning. As the number of points and the number of contestants get bigger,
this becomes increasingly difficult to manage.
&lt;/p&gt;
&lt;p&gt;
Therefore, I have written a small winforms program, that helps you manage this. You
can add as many contestants as you like, and give them points. If you are only interested
in a "normal" draw, you can just give all contestants one point.
&lt;/p&gt;
&lt;p&gt;
Screen shot:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/eliasen.euDraw_146CE/eliasen.eu.draw.screenshot.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="460" alt="eliasen.eu.draw.screenshot" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/eliasen.euDraw_146CE/eliasen.eu.draw.screenshot_thumb.jpg" width="548" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The program not only does the draw, it will also:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Give you an overview of the contestants, their points and their chance of winning,
which is dynamically updated each time a contestant is added 
&lt;li&gt;
Give you the opportunity to simulate any number of draws, to ensure that the program
is random. When doing the simulation, the percentage of wins by each contestant is
shown next to the chance of winning, so they can be compared.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I will gladly take comments, bug reports, suggestions, postcards, et cetera :-)
&lt;/p&gt;
&lt;p&gt;
The documentation can be found at &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx#documentation"&gt;http://www.eliasen.eu/DownloadSoftware.aspx#documentation&lt;/a&gt; and
the program can be downloaded at &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx#winform"&gt;http://www.eliasen.eu/DownloadSoftware.aspx#winform&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I hope this comes in handy to someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=25c38ee4-4c16-4797-9887-410c36abada8" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,25c38ee4-4c16-4797-9887-410c36abada8.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=bde133e7-4c12-4ad1-a315-909f8ca4d0d3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,bde133e7-4c12-4ad1-a315-909f8ca4d0d3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,bde133e7-4c12-4ad1-a315-909f8ca4d0d3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=bde133e7-4c12-4ad1-a315-909f8ca4d0d3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am using <a href="http://www.last.fm">http://www.last.fm</a> to keep track of what
I listen to, and to get inspired to listen to some new music that I didn't know I
liked.
</p>
        <p>
You can find my profile at <a title="http://www.last.fm/user/eliasen" href="http://www.last.fm/user/eliasen">http://www.last.fm/user/eliasen</a> and
you can find information about an excellent Danish band Baal at <a title="http://www.last.fm/music/Baal" href="http://www.last.fm/music/Baal">http://www.last.fm/music/Baal</a>.
Please note, though, that I listen to the Danish band Baal, and not the Japanese band
that unfortunately shares the band name Baal with the Danish band.
</p>
        <p>
Anyway, the point of this blog post is, that it seems that I am currently the top
listener of Baal:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Baaltoplistener_6A6/baal_top_listener.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="baal_top_listener" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Baaltoplistener_6A6/baal_top_listener_thumb.jpg" width="357" border="0" />
          </a>
        </p>
        <p>
:-)
</p>
        <p>
This means that I listen to more Baal than all that listen to either the Danish or
the Japanese band...
</p>
        <p>
I know... Get a life, damn it! :-)
</p>
        <p>
Baal have a web site at <a href="http://www.baalworld.com" target="_blank">http://www.baalworld.com</a> -
try it! :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bde133e7-4c12-4ad1-a315-909f8ca4d0d3" />
      </body>
      <title>Baal top listener :-)</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,bde133e7-4c12-4ad1-a315-909f8ca4d0d3.aspx</guid>
      <link>http://blog.eliasen.dk/2008/12/23/BaalTopListener.aspx</link>
      <pubDate>Tue, 23 Dec 2008 20:27:19 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am using &lt;a href="http://www.last.fm"&gt;http://www.last.fm&lt;/a&gt; to keep track of what
I listen to, and to get inspired to listen to some new music that I didn't know I
liked.
&lt;/p&gt;
&lt;p&gt;
You can find my profile at &lt;a title="http://www.last.fm/user/eliasen" href="http://www.last.fm/user/eliasen"&gt;http://www.last.fm/user/eliasen&lt;/a&gt; and
you can find information about an excellent Danish band Baal at &lt;a title="http://www.last.fm/music/Baal" href="http://www.last.fm/music/Baal"&gt;http://www.last.fm/music/Baal&lt;/a&gt;.
Please note, though, that I listen to the Danish band Baal, and not the Japanese band
that unfortunately shares the band name Baal with the Danish band.
&lt;/p&gt;
&lt;p&gt;
Anyway, the point of this blog post is, that it seems that I am currently the top
listener of Baal:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Baaltoplistener_6A6/baal_top_listener.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="baal_top_listener" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Baaltoplistener_6A6/baal_top_listener_thumb.jpg" width="357" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
:-)
&lt;/p&gt;
&lt;p&gt;
This means that I listen to more Baal than all that listen to either the Danish or
the Japanese band...
&lt;/p&gt;
&lt;p&gt;
I know... Get a life, damn it! :-)
&lt;/p&gt;
&lt;p&gt;
Baal have a web site at &lt;a href="http://www.baalworld.com" target="_blank"&gt;http://www.baalworld.com&lt;/a&gt; -
try it! :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bde133e7-4c12-4ad1-a315-909f8ca4d0d3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,bde133e7-4c12-4ad1-a315-909f8ca4d0d3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=93dc547b-bc7b-4210-970a-7926507dd603</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,93dc547b-bc7b-4210-970a-7926507dd603.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,93dc547b-bc7b-4210-970a-7926507dd603.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=93dc547b-bc7b-4210-970a-7926507dd603</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
It is time for the third posting in my series about using BizTalk to integrate to
Excel spreadsheets. My first two postings are <a href="http://blog.eliasen.dk/2008/11/10/UsingBizTalkToIntegrateToExcelSpreadsheetsPartI.aspx" target="_blank">here</a> (Installation)
and <a href="http://blog.eliasen.dk/2008/11/12/UsingBizTalkToIntegrateToExcelSpreadsheetsPartII.aspx" target="_blank">here</a> (The
schema generation wizard).
</p>
        <p>
This third posting is a talk about the runtime, and how it works.
</p>
        <h3>The setup
</h3>
        <p>
To start out, I have done a simple test, and you can find my project 
</p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:b92c7ebb-16e9-4d30-87d6-37791a48baf4" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_148A3/TestingFPointForExcel.zip" target="_blank">here</a>
          </p>
        </div>
. 
<p></p><p></p><p>
It has a simple spreadsheet and a schema for this spreadsheet (<a href="http://blog.eliasen.dk/2008/11/12/UsingBizTalkToIntegrateToExcelSpreadsheetsPartII.aspx" target="_blank">both
are described in my previous post</a>) and the setup basically just has a FILE Receive
Location and a send port with a filter that takes everything from the Receive Port
the Receive Location belongs to. My aim is to see how fast the Spread Disassembler
is.
</p><p>
First, a short description of my setup:
</p><p>
My BizTalk installation is in a Microsoft Virtual PC 2007 virtual machine.
</p><p>
The host machine is a Hewlett Packard 8710w laptop with an Intel Core Duo T7700 2,4GHz
CPU, 2GB of RAM and Windows XP Professional Service Pack 3 and completely updated
as of 7'th December 2008.
</p><p>
The guest system is a virtual machine which has one 2,4GHz CPU, 1GB RAM and Microsoft
Windows Server 2003 R2 Enterprise Edition SP2 - also completely updated as of 7'th
December 2008.
</p><h3>The test
</h3><p>
I created 999 copies of the same spreadsheet and moved them into a folder watched
by the receive location. They were read, transformed into XML, and output into the
output folder in 3:19 minutes. This is an average of 5 spreadsheets per second.
</p><p>
This took me by surprise - I had expected it to be faster. So I decided to do things
more academic than looking at the time stamps of the output files. After all, there
are PLENTY of functionality that could be the time consumer. So I created a BAM Activity
and View, tracking when my Receive Port starts and when it ends. 
</p><p>
A table showing the average processing time can be seen here:
</p><table cellspacing="0" cellpadding="2" width="100%" border="1"><tbody><tr><td valign="top"><strong>Number of messages in test</strong></td><td valign="top"><strong>Average processing time per message</strong></td><td valign="top"><strong>Messages per minute</strong></td></tr><tr><td valign="top">
5</td><td valign="top">
0,0227 seconds</td><td valign="top">
2643</td></tr><tr><td valign="top">
63</td><td valign="top">
0,0337 seconds</td><td valign="top">
1780</td></tr><tr><td valign="top">
127</td><td valign="top">
0,0584 seconds</td><td valign="top">
1027</td></tr><tr><td valign="top">
1966</td><td valign="top">
0,2714</td><td valign="top">
221</td></tr></tbody></table><p></p><p>
So it is pretty clear, that performance drops drastically when the load increases.
I do <strong>not</strong> blame this on the Spread Disassembler, though. Since this
is a virtual PC, with SQL Server on the same box as BizTalk, the mere I/O operations
when writing all the output files to the hard drive conflicts with the I/O operations
of BizTalk using the MessageBox. I find this a much more likely issue for the drop
in performance than that the disassembler should get slower just because more messages
come in.
</p><p>
So, to sum up, it seems that the Spread Disassembler can take a pretty heavy load
- Up to 2643 messages per minute (44 messages per second). This is given less than
ideal operating and hardware conditions, but optimal conditions with regards to the
BizTalk Server not doing anything else at the time.
</p><p>
Maybe in a later post I will take a look at more complex spreadsheets/schemas and
also test the performance of the assembler.
</p><p>
-- 
<br />
eliasen
</p><img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=93dc547b-bc7b-4210-970a-7926507dd603" /></body>
      <title>Using BizTalk to integrate to Excel spreadsheets - Part III</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,93dc547b-bc7b-4210-970a-7926507dd603.aspx</guid>
      <link>http://blog.eliasen.dk/2008/12/23/UsingBizTalkToIntegrateToExcelSpreadsheetsPartIII.aspx</link>
      <pubDate>Tue, 23 Dec 2008 20:26:40 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
It is time for the third posting in my series about using BizTalk to integrate to
Excel spreadsheets. My first two postings are &lt;a href="http://blog.eliasen.dk/2008/11/10/UsingBizTalkToIntegrateToExcelSpreadsheetsPartI.aspx" target="_blank"&gt;here&lt;/a&gt; (Installation)
and &lt;a href="http://blog.eliasen.dk/2008/11/12/UsingBizTalkToIntegrateToExcelSpreadsheetsPartII.aspx" target="_blank"&gt;here&lt;/a&gt; (The
schema generation wizard).
&lt;/p&gt;
&lt;p&gt;
This third posting is a talk about the runtime, and how it works.
&lt;/p&gt;
&lt;h3&gt;The setup
&lt;/h3&gt;
&lt;p&gt;
To start out, I have done a simple test, and you can find my project 
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:b92c7ebb-16e9-4d30-87d6-37791a48baf4" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_148A3/TestingFPointForExcel.zip" target="_blank"&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
. 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
It has a simple spreadsheet and a schema for this spreadsheet (&lt;a href="http://blog.eliasen.dk/2008/11/12/UsingBizTalkToIntegrateToExcelSpreadsheetsPartII.aspx" target="_blank"&gt;both
are described in my previous post&lt;/a&gt;) and the setup basically just has a FILE Receive
Location and a send port with a filter that takes everything from the Receive Port
the Receive Location belongs to. My aim is to see how fast the Spread Disassembler
is.
&lt;/p&gt;
&lt;p&gt;
First, a short description of my setup:
&lt;/p&gt;
&lt;p&gt;
My BizTalk installation is in a Microsoft Virtual PC 2007 virtual machine.
&lt;/p&gt;
&lt;p&gt;
The host machine is a Hewlett Packard 8710w laptop with an Intel Core Duo T7700 2,4GHz
CPU, 2GB of RAM and Windows XP Professional Service Pack 3 and completely updated
as of 7'th December 2008.
&lt;/p&gt;
&lt;p&gt;
The guest system is a virtual machine which has one 2,4GHz CPU, 1GB RAM and Microsoft
Windows Server 2003 R2 Enterprise Edition SP2 - also completely updated as of 7'th
December 2008.
&lt;/p&gt;
&lt;h3&gt;The test
&lt;/h3&gt;
&lt;p&gt;
I created 999 copies of the same spreadsheet and moved them into a folder watched
by the receive location. They were read, transformed into XML, and output into the
output folder in 3:19 minutes. This is an average of 5 spreadsheets per second.
&lt;/p&gt;
&lt;p&gt;
This took me by surprise - I had expected it to be faster. So I decided to do things
more academic than looking at the time stamps of the output files. After all, there
are PLENTY of functionality that could be the time consumer. So I created a BAM Activity
and View, tracking when my Receive Port starts and when it ends. 
&lt;/p&gt;
&lt;p&gt;
A table showing the average processing time can be seen here:
&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="100%" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Number of messages in test&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Average processing time per message&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Messages per minute&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
5&lt;/td&gt;
&lt;td valign="top"&gt;
0,0227 seconds&lt;/td&gt;
&lt;td valign="top"&gt;
2643&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
63&lt;/td&gt;
&lt;td valign="top"&gt;
0,0337 seconds&lt;/td&gt;
&lt;td valign="top"&gt;
1780&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
127&lt;/td&gt;
&lt;td valign="top"&gt;
0,0584 seconds&lt;/td&gt;
&lt;td valign="top"&gt;
1027&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
1966&lt;/td&gt;
&lt;td valign="top"&gt;
0,2714&lt;/td&gt;
&lt;td valign="top"&gt;
221&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
So it is pretty clear, that performance drops drastically when the load increases.
I do &lt;strong&gt;not&lt;/strong&gt; blame this on the Spread Disassembler, though. Since this
is a virtual PC, with SQL Server on the same box as BizTalk, the mere I/O operations
when writing all the output files to the hard drive conflicts with the I/O operations
of BizTalk using the MessageBox. I find this a much more likely issue for the drop
in performance than that the disassembler should get slower just because more messages
come in.
&lt;/p&gt;
&lt;p&gt;
So, to sum up, it seems that the Spread Disassembler can take a pretty heavy load
- Up to 2643 messages per minute (44 messages per second). This is given less than
ideal operating and hardware conditions, but optimal conditions with regards to the
BizTalk Server not doing anything else at the time.
&lt;/p&gt;
&lt;p&gt;
Maybe in a later post I will take a look at more complex spreadsheets/schemas and
also test the performance of the assembler.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=93dc547b-bc7b-4210-970a-7926507dd603" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,93dc547b-bc7b-4210-970a-7926507dd603.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=54bfd7d3-03f8-4d3d-a2d1-924611ee4749</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,54bfd7d3-03f8-4d3d-a2d1-924611ee4749.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,54bfd7d3-03f8-4d3d-a2d1-924611ee4749.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=54bfd7d3-03f8-4d3d-a2d1-924611ee4749</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
The company hosting the eliasen.dk domain went bancrupt last friday (19'th December
2008), and I only just found out this morning (Monday the 22'nd December).
</p>
        <p>
So basically, everything since my last backup (27'th November 2008) is gone!
</p>
        <p>
Right now, I am trying to setup the blog on the new server and trying to see if I
can repost the blog posts I have written since the 27'th November.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=54bfd7d3-03f8-4d3d-a2d1-924611ee4749" />
      </body>
      <title>Blog went down the nasty way...</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,54bfd7d3-03f8-4d3d-a2d1-924611ee4749.aspx</guid>
      <link>http://blog.eliasen.dk/2008/12/23/BlogWentDownTheNastyWay.aspx</link>
      <pubDate>Tue, 23 Dec 2008 20:23:30 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
The company hosting the eliasen.dk domain went bancrupt last friday (19'th December
2008), and I only just found out this morning (Monday the 22'nd December).
&lt;/p&gt;
&lt;p&gt;
So basically, everything since my last backup (27'th November 2008) is gone!
&lt;/p&gt;
&lt;p&gt;
Right now, I am trying to setup the blog on the new server and trying to see if I
can repost the blog posts I have written since the 27'th November.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=54bfd7d3-03f8-4d3d-a2d1-924611ee4749" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,54bfd7d3-03f8-4d3d-a2d1-924611ee4749.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=6d778425-f481-42d7-bad8-c631361e6bb7</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,6d778425-f481-42d7-bad8-c631361e6bb7.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,6d778425-f481-42d7-bad8-c631361e6bb7.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=6d778425-f481-42d7-bad8-c631361e6bb7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
A new functoid has been added to the collection of functoids that an be downloaded
at <a href="http://www.eliasen.eu/Downloadsoftware.aspx">http://www.eliasen.eu/Downloadsoftware.aspx</a>.
</p>
        <p>
The functoid simply takes one parameter, which is used as a key against BizTalks app.config
(The BTSNTSvc.exe.config file in BizTalks installation folder) to read an application
setting from the appSettings group.
</p>
        <p>
So given a .config file like this:
</p>
        <p>
&lt;appSettings&gt;<br />
&lt;add key="eliasen" value="eliasenValue" /&gt;<br />
&lt;/appSettings&gt;
</p>
        <p>
and the parameter "eliasen" to the functoid, it will return "eliasenValue". If the
key cannot be found, an empty string is returned.
</p>
        <p>
And the documentation has also been updated - look at <a href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6d778425-f481-42d7-bad8-c631361e6bb7" />
      </body>
      <title>Added functoid to read from app.cofig</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,6d778425-f481-42d7-bad8-c631361e6bb7.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/27/AddedFunctoidToReadFromAppcofig.aspx</link>
      <pubDate>Thu, 27 Nov 2008 20:20:03 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
A new functoid has been added to the collection of functoids that an be downloaded
at &lt;a href="http://www.eliasen.eu/Downloadsoftware.aspx"&gt;http://www.eliasen.eu/Downloadsoftware.aspx&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The functoid simply takes one parameter, which is used as a key against BizTalks app.config
(The BTSNTSvc.exe.config file in BizTalks installation folder) to read an application
setting from the appSettings group.
&lt;/p&gt;
&lt;p&gt;
So given a .config file like this:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;appSettings&amp;gt;&lt;br&gt;
&amp;lt;add key="eliasen" value="eliasenValue" /&amp;gt;&lt;br&gt;
&amp;lt;/appSettings&amp;gt;
&lt;/p&gt;
&lt;p&gt;
and the parameter "eliasen" to the functoid, it will return "eliasenValue". If the
key cannot be found, an empty string is returned.
&lt;/p&gt;
&lt;p&gt;
And the documentation has also been updated - look at &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6d778425-f481-42d7-bad8-c631361e6bb7" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,6d778425-f481-42d7-bad8-c631361e6bb7.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=88a4df70-80dc-42f0-8491-5406e33124b5</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,88a4df70-80dc-42f0-8491-5406e33124b5.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,88a4df70-80dc-42f0-8491-5406e33124b5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=88a4df70-80dc-42f0-8491-5406e33124b5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have added a new functoid to my functoid library.
</p>
        <p>
This functoid will take a string, that is separated by some character as input and
split it up into the substrings it is, given the separator. It will then return the
substring given by a third parameter. 
</p>
        <p>
So for instance, given these three inputs:
</p>
        <ol>
          <li>
Jan,Eliasen,BizTalk</li>
          <li>
,</li>
          <li>
1</li>
        </ol>
        <p>
You would get "Eliasen" as output. 
</p>
        <p>
You can download my functoid library at <a href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a> and
here you can also find updated documentation describing this new functoid.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=88a4df70-80dc-42f0-8491-5406e33124b5" />
      </body>
      <title>Added CSV Extract functoid</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,88a4df70-80dc-42f0-8491-5406e33124b5.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/24/AddedCSVExtractFunctoid.aspx</link>
      <pubDate>Mon, 24 Nov 2008 01:06:33 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have added a new functoid to my functoid library.
&lt;/p&gt;
&lt;p&gt;
This functoid will take a string, that is separated by some character as input and
split it up into the substrings it is, given the separator. It will then return the
substring given by a third parameter. 
&lt;/p&gt;
&lt;p&gt;
So for instance, given these three inputs:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Jan,Eliasen,BizTalk&lt;/li&gt;
&lt;li&gt;
,&lt;/li&gt;
&lt;li&gt;
1&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
You would get "Eliasen" as output. 
&lt;/p&gt;
&lt;p&gt;
You can download my functoid library at &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt; and
here you can also find updated documentation describing this new functoid.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=88a4df70-80dc-42f0-8491-5406e33124b5" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,88a4df70-80dc-42f0-8491-5406e33124b5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=08f8bac2-6e80-4fd7-be47-7e514870975c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,08f8bac2-6e80-4fd7-be47-7e514870975c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,08f8bac2-6e80-4fd7-be47-7e514870975c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=08f8bac2-6e80-4fd7-be47-7e514870975c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
As you have probably read in my previous posts this month, I have started creating
a functoid library, which is freely downloadable if you want to. Now, I have also
written some documentation for it (Wauv, I know...). So go to <a href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a> for
the software, and here you can find a link to <a href="http://www.eliasen.eu/files/eliasen.eu.documentation.docx">http://www.eliasen.eu/files/eliasen.eu.documentation.docx</a> which
contains the documentation for the downloadable software.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=08f8bac2-6e80-4fd7-be47-7e514870975c" />
      </body>
      <title>Documentation for functoids</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,08f8bac2-6e80-4fd7-be47-7e514870975c.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/21/DocumentationForFunctoids.aspx</link>
      <pubDate>Fri, 21 Nov 2008 23:03:14 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
As you have probably read in my previous posts this month, I have started creating
a functoid library, which is freely downloadable if you want to. Now, I have also
written some documentation for it (Wauv, I know...). So go to &lt;a href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt; for
the software, and here you can find a link to &lt;a href="http://www.eliasen.eu/files/eliasen.eu.documentation.docx"&gt;http://www.eliasen.eu/files/eliasen.eu.documentation.docx&lt;/a&gt; which
contains the documentation for the downloadable software.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=08f8bac2-6e80-4fd7-be47-7e514870975c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,08f8bac2-6e80-4fd7-be47-7e514870975c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=318fb258-6523-4800-ba0d-90d11c31556a</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,318fb258-6523-4800-ba0d-90d11c31556a.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,318fb258-6523-4800-ba0d-90d11c31556a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=318fb258-6523-4800-ba0d-90d11c31556a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have added a new functoid to the collection of functoids I am building. This time,
I have programmed a functoid that converts between different datetime formats, which
comes in handy when mapping between two schemas that have date elements, that require
different formats of the date.
</p>
        <p>
You can find version 4 of my functoid collection at <a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=318fb258-6523-4800-ba0d-90d11c31556a" />
      </body>
      <title>Date Converter functoid</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,318fb258-6523-4800-ba0d-90d11c31556a.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/19/DateConverterFunctoid.aspx</link>
      <pubDate>Wed, 19 Nov 2008 23:41:07 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have added a new functoid to the collection of functoids I am building. This time,
I have programmed a functoid that converts between different datetime formats, which
comes in handy when mapping between two schemas that have date elements, that require
different formats of the date.
&lt;/p&gt;
&lt;p&gt;
You can find version 4 of my functoid collection at &lt;a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=318fb258-6523-4800-ba0d-90d11c31556a" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,318fb258-6523-4800-ba0d-90d11c31556a.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=ae50638b-c145-4c79-80f8-c1d3ff7edd1e</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,ae50638b-c145-4c79-80f8-c1d3ff7edd1e.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,ae50638b-c145-4c79-80f8-c1d3ff7edd1e.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=ae50638b-c145-4c79-80f8-c1d3ff7edd1e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Recently, I started using <a href="http://windowslivewriter.spaces.live.com/default.aspx?wa=wsignin1.0" target="_blank">Windows
Live Writer</a> in large scale. Until then, I used the built in editing functionality
of dasBlog, which is my blog software.
</p>
        <p>
I must say, I love it!
</p>
        <p>
Now, don't get me wrong, I have no other software products that do what Windows Live
Writer does to compare it with, so there might be other and better products out there,
but I am SO happy with not using the built in functionality of dasBlog anymore, I
just had to tell you all :-)
</p>
        <p>
The obvious advantages for using Windows Live Writer over the built in functionality
in dasBlog are the possibility to work offline, either if my blog is unavailable or
if I am in a train, and so on.
</p>
        <p>
But also, I am quite fond of the way I can have multiple entries as work in progress
at the same time, edit existing posts, etc. And all in a thick client on my laptop.
</p>
        <p>
Really, I am quite thrilled :-) And I encourage all to use it... There is a newer
version out than the 2008 that I am using, but it is a beta version, and some people
have reported issues with using it against dasBlog, so I will wait a bit before I
try that version.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ae50638b-c145-4c79-80f8-c1d3ff7edd1e" />
      </body>
      <title>Windows Live Writer</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,ae50638b-c145-4c79-80f8-c1d3ff7edd1e.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/19/WindowsLiveWriter.aspx</link>
      <pubDate>Wed, 19 Nov 2008 21:37:11 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Recently, I started using &lt;a href="http://windowslivewriter.spaces.live.com/default.aspx?wa=wsignin1.0" target="_blank"&gt;Windows
Live Writer&lt;/a&gt; in large scale. Until then, I used the built in editing functionality
of dasBlog, which is my blog software.
&lt;/p&gt;
&lt;p&gt;
I must say, I love it!
&lt;/p&gt;
&lt;p&gt;
Now, don't get me wrong, I have no other software products that do what Windows Live
Writer does to compare it with, so there might be other and better products out there,
but I am SO happy with not using the built in functionality of dasBlog anymore, I
just had to tell you all :-)
&lt;/p&gt;
&lt;p&gt;
The obvious advantages for using Windows Live Writer over the built in functionality
in dasBlog are the possibility to work offline, either if my blog is unavailable or
if I am in a train, and so on.
&lt;/p&gt;
&lt;p&gt;
But also, I am quite fond of the way I can have multiple entries as work in progress
at the same time, edit existing posts, etc. And all in a thick client on my laptop.
&lt;/p&gt;
&lt;p&gt;
Really, I am quite thrilled :-) And I encourage all to use it... There is a newer
version out than the 2008 that I am using, but it is a beta version, and some people
have reported issues with using it against dasBlog, so I will wait a bit before I
try that version.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=ae50638b-c145-4c79-80f8-c1d3ff7edd1e" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,ae50638b-c145-4c79-80f8-c1d3ff7edd1e.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f7174897-9089-48a8-b88e-9c82b0d12ace</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f7174897-9089-48a8-b88e-9c82b0d12ace.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f7174897-9089-48a8-b88e-9c82b0d12ace.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f7174897-9089-48a8-b88e-9c82b0d12ace</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all 
</p>
        <p>
This is the second post in a series about solving the "If-Then-Else" problem in a
map. In my <a href="http://blog.eliasen.dk/2008/11/15/SolvingTheIfThenElseProblemInAMapPartI.aspx" target="_blank">first
post</a> I discussed how to use BizTalks built-in functionality to solve the problem.
Neither of the three proposed solutions really seem nice to me, so I wondered how
difficult it might be to code a custom functoid that does the trick. It turned out
to be unexpectedly hard, and this post tries to clarify my findings and explain them. 
</p>
        <p>
So, to continue from my previous post, to me the best solution is to code your own
functoid, that mimics the value mapping functoid, but adds an "else" part. So basically
just a third parameter to the value  mapping functoid that is returned in case
the first parameter is false. 
</p>
        <p>
For information about how to program a custom functoid, please visit <a title="http://msdn.microsoft.com/en-us/library/aa560879.aspx" href="http://msdn.microsoft.com/en-us/library/aa560879.aspx">http://msdn.microsoft.com/en-us/library/aa560879.aspx</a> -
I wont go into details about that here. I will just comment on the issues I have had
with creating this particular functoid. 
</p>
        <p>
The final solution should give me the possibility to have a map like this one: 
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartII_132E6/IfThenElseCustomFunctoid.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="136" alt="IfThenElseCustomFunctoid" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartII_132E6/IfThenElseCustomFunctoid_thumb.jpg" width="361" border="0" />
          </a>
        </p>
        <p>
YES, I know my icons are very bad... Anyway, three inputs: a boolean and two values.
</p>
        <p>
So, getting to the code, my first try looked like this: 
</p>
        <p>
-- BEGIN CODE<br />
this.SetMinParams(3);<br />
this.SetMaxParams(3);<br />
this.Category = FunctoidCategory.ValueMapping;<br />
this.OutputConnectionType = ConnectionType.AllExceptRecord;<br />
AddInputConnectionType(ConnectionType.AllExceptRecord);<br />
AddInputConnectionType(ConnectionType.AllExceptRecord);<br />
AddInputConnectionType(ConnectionType.AllExceptRecord);<br />
-- END CODE 
</p>
        <p>
I have removed irrelevant lines, such as setting up the resources, setting the ID,
and so on. 
</p>
        <p>
First of all, in the code of a custom functoid, you need to specify which category
the functoid should belong to. The possibilities are listed at <a title="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx" href="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx">http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx</a>.
I hadn't really looked at this list, since I thought that the intellisense in VS.NET
2005 was good enough. Since my functoid is an advanced value mapping functoid, I chose
he value mapping category. This turned out a but different than I thought. It turns
out, that the category you assign to a custom functoid not only determines where in
the toolbox it should be placed, but also sometimes some extra functionality is added
to the functoid. Given my map above, I had expected that the created XSLT would just
call my functoid with the three parameters and then my code would do the rest. But
the generated XSLT looks like this:
</p>
        <p>
&lt;?xml version="1.0" encoding="UTF-16"?&gt;<br />
&lt;xsl:stylesheet xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform&quot;">http://www.w3.org/1999/XSL/Transform"</a> xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:var="<a href="http://schemas.microsoft.com/BizTalk/2003/var&quot;">http://schemas.microsoft.com/BizTalk/2003/var"</a> exclude-result-prefixes="msxsl
var s0 userCSharp" version="1.0" xmlns:s0="<a href="http://eliasen.eu.BizTalk.TestProject.InputSchema&quot;">http://eliasen.eu.BizTalk.TestProject.InputSchema"</a> xmlns:ns0="<a href="http://eliasen.eu.BizTalk.TestProject.OutputSchema&quot;">http://eliasen.eu.BizTalk.TestProject.OutputSchema"</a> xmlns:userCSharp="<a href="http://schemas.microsoft.com/BizTalk/2003/userCSharp&quot;">http://schemas.microsoft.com/BizTalk/2003/userCSharp"</a>&gt;<br />
  &lt;xsl:output omit-xml-declaration="yes" method="xml" version="1.0" /&gt;<br />
  &lt;xsl:template match="/"&gt;<br />
    &lt;xsl:apply-templates select="/s0:InputRoot" /&gt;<br />
  &lt;/xsl:template&gt;<br />
  &lt;xsl:template match="/s0:InputRoot"&gt;<br />
    &lt;xsl:variable name="var:v1" select="userCSharp:LogicalEq(string(qualifier/text())
, &amp;quot;Jan&amp;quot;)" /&gt;<br />
    &lt;ns0:OutputRoot&gt;<br />
      &lt;xsl:if test="string($var:v1)='true'"&gt;<br />
        &lt;xsl:variable name="var:v2" select="IfTrue/text()"
/&gt;<br />
        &lt;OutputField&gt;<br />
          &lt;xsl:value-of select="$var:v2"
/&gt;<br />
        &lt;/OutputField&gt;<br />
      &lt;/xsl:if&gt;<br />
    &lt;/ns0:OutputRoot&gt;<br />
  &lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt; 
</p>
        <p>
I have removed all the lines associated with the equals-functoid as that included
three inline c# methods which are irrelevant. Anyway, as you can see, my functoid
is not being called at all. Because I chose the ValueMapping category, the generated
xslt assumes it is actually a built-in value mapping functoid and it totally overrules
the logic inside the functoid. 
</p>
        <p>
So, this really came as a surprise to me... but well...it makes sense when you think
about it, naturally. Some of the types of functoids just require logic that goes beyond
the code inside a functoid. 
</p>
        <p>
So, the ValueMapping category just didn't work for me. Then I thought; "Oh, who cares?"?
I will just use the String category instead, because those certainly do not have weird
functionality around them... they get input and return a string as output, that is
it. And the functoid will just appear in the String group in the toolbox in VS.NET. 
</p>
        <p>
That gave me a new headache, that was another surprise; You cannot connect the output
of a logical functoid to the input of a string functoid. So... I was stuck. 
</p>
        <p>
One of my solutions would accept the output of a logical functoid as input, but my
functoid logic was overridden. The other simply wouldn't accept the output of a logical
functoid as input. 
</p>
        <p>
I have tried the following FunctoidCategories:
</p>
        <table cellspacing="0" cellpadding="2" width="100%" border="1">
          <tbody>
            <tr>
              <td valign="top">
                <strong>Category</strong>
              </td>
              <td valign="top">
                <strong>Description</strong>
              </td>
            </tr>
            <tr>
              <td valign="top">
Assert</td>
              <td valign="top">
Terminates when logical functoid returns true. Has the wrong value in output field
when logical functoid returns false.</td>
            </tr>
            <tr>
              <td valign="top">
Conversion</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Count</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Cumulative</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
DatabaseExtract</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
DatabaseLookup</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
DateTime</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
ExitenceLooping</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Index</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Iteration</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Keymatch</td>
              <td valign="top">
Cannot compile. You get an "Object not set to an instance of an object" exception.</td>
            </tr>
            <tr>
              <td valign="top">
Logical</td>
              <td valign="top">
The output field isn't created.</td>
            </tr>
            <tr>
              <td valign="top">
Looping</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
MassCopy</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Math</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
NilValue</td>
              <td valign="top">
Only creates output field if logical functoid returns true and then it adds the xsi:nil
attribute and no value in the output field.</td>
            </tr>
            <tr>
              <td valign="top">
Scientific</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
Scripter</td>
              <td valign="top">
The scripting functoid has no script type set, either external or inline, so proper
code cannot be generated for it.</td>
            </tr>
            <tr>
              <td valign="top">
String</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
TableExtractor</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
TableLooping</td>
              <td valign="top">
Needs the table grid configured and is therefore useless.</td>
            </tr>
            <tr>
              <td valign="top">
Unknown</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
            <tr>
              <td valign="top">
ValueMapping</td>
              <td valign="top">
Only creates the output field if the logical functoid returns true.</td>
            </tr>
            <tr>
              <td valign="top">
XPath</td>
              <td valign="top">
Cannot connect output of logical functoid to input.</td>
            </tr>
          </tbody>
        </table>
        <p>
So, basically, I haven't been able to do it... for now. Either I cannot connect a
logical functoid to my custom functoid, I get an error either at compile time or something
goes wrong semantically at runtime.
</p>
        <p>
I haven't given up 100% yet... but I must say, that the task has turned out to be
a whole lot more difficult than I thought it would be.
</p>
        <p>
Look out for a part 3 in this series... if it comes, I will have solved this issue
:-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f7174897-9089-48a8-b88e-9c82b0d12ace" />
      </body>
      <title>Solving the "If-Then-Else" problem in a map - part II</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f7174897-9089-48a8-b88e-9c82b0d12ace.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/18/SolvingTheIfThenElseProblemInAMapPartII.aspx</link>
      <pubDate>Tue, 18 Nov 2008 00:01:32 GMT</pubDate>
      <description>&lt;p&gt;
Hi all 
&lt;p&gt;
This is the second post in a series about solving the "If-Then-Else" problem in a
map. In my &lt;a href="http://blog.eliasen.dk/2008/11/15/SolvingTheIfThenElseProblemInAMapPartI.aspx" target="_blank"&gt;first
post&lt;/a&gt; I discussed how to use BizTalks built-in functionality to solve the problem.
Neither of the three proposed solutions really seem nice to me, so I wondered how
difficult it might be to code a custom functoid that does the trick. It turned out
to be unexpectedly hard, and this post tries to clarify my findings and explain them. 
&lt;p&gt;
So, to continue from my previous post, to me the best solution is to code your own
functoid, that mimics the value mapping functoid, but adds an "else" part. So basically
just a third parameter to the value&amp;nbsp; mapping functoid that is returned in case
the first parameter is false. 
&lt;p&gt;
For information about how to program a custom functoid, please visit &lt;a title="http://msdn.microsoft.com/en-us/library/aa560879.aspx" href="http://msdn.microsoft.com/en-us/library/aa560879.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa560879.aspx&lt;/a&gt; -
I wont go into details about that here. I will just comment on the issues I have had
with creating this particular functoid. 
&lt;p&gt;
The final solution should give me the possibility to have a map like this one: 
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartII_132E6/IfThenElseCustomFunctoid.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="136" alt="IfThenElseCustomFunctoid" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/SolvingtheIfThenElseprobleminamappartII_132E6/IfThenElseCustomFunctoid_thumb.jpg" width="361" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
YES, I know my icons are very bad... Anyway, three inputs: a boolean and two values.
&lt;/p&gt;
&lt;p&gt;
So, getting to the code, my first try looked like this: 
&lt;/p&gt;
&lt;p&gt;
-- BEGIN CODE&lt;br&gt;
this.SetMinParams(3);&lt;br&gt;
this.SetMaxParams(3);&lt;br&gt;
this.Category = FunctoidCategory.ValueMapping;&lt;br&gt;
this.OutputConnectionType = ConnectionType.AllExceptRecord;&lt;br&gt;
AddInputConnectionType(ConnectionType.AllExceptRecord);&lt;br&gt;
AddInputConnectionType(ConnectionType.AllExceptRecord);&lt;br&gt;
AddInputConnectionType(ConnectionType.AllExceptRecord);&lt;br&gt;
-- END CODE 
&lt;p&gt;
I have removed irrelevant lines, such as setting up the resources, setting the ID,
and so on. 
&lt;p&gt;
First of all, in the code of a custom functoid, you need to specify which category
the functoid should belong to. The possibilities are listed at &lt;a title="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx" href="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx"&gt;http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx&lt;/a&gt;.
I hadn't really looked at this list, since I thought that the intellisense in VS.NET
2005 was good enough. Since my functoid is an advanced value mapping functoid, I chose
he value mapping category. This turned out a but different than I thought. It turns
out, that the category you assign to a custom functoid not only determines where in
the toolbox it should be placed, but also sometimes some extra functionality is added
to the functoid. Given my map above, I had expected that the created XSLT would just
call my functoid with the three parameters and then my code would do the rest. But
the generated XSLT looks like this:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;?xml version="1.0" encoding="UTF-16"?&amp;gt;&lt;br&gt;
&amp;lt;xsl:stylesheet xmlns:xsl="&lt;a href="http://www.w3.org/1999/XSL/Transform&amp;quot;"&gt;http://www.w3.org/1999/XSL/Transform"&lt;/a&gt; xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:var="&lt;a href="http://schemas.microsoft.com/BizTalk/2003/var&amp;quot;"&gt;http://schemas.microsoft.com/BizTalk/2003/var"&lt;/a&gt; exclude-result-prefixes="msxsl
var s0 userCSharp" version="1.0" xmlns:s0="&lt;a href="http://eliasen.eu.BizTalk.TestProject.InputSchema&amp;quot;"&gt;http://eliasen.eu.BizTalk.TestProject.InputSchema"&lt;/a&gt; xmlns:ns0="&lt;a href="http://eliasen.eu.BizTalk.TestProject.OutputSchema&amp;quot;"&gt;http://eliasen.eu.BizTalk.TestProject.OutputSchema"&lt;/a&gt; xmlns:userCSharp="&lt;a href="http://schemas.microsoft.com/BizTalk/2003/userCSharp&amp;quot;"&gt;http://schemas.microsoft.com/BizTalk/2003/userCSharp"&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:output omit-xml-declaration="yes" method="xml" version="1.0" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:template match="/"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:apply-templates select="/s0:InputRoot" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xsl:template&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:template match="/s0:InputRoot"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:variable name="var:v1" select="userCSharp:LogicalEq(string(qualifier/text())
, &amp;amp;quot;Jan&amp;amp;quot;)" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns0:OutputRoot&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:if test="string($var:v1)='true'"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:variable name="var:v2" select="IfTrue/text()"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;OutputField&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="$var:v2"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/OutputField&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:if&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ns0:OutputRoot&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xsl:template&amp;gt;&lt;br&gt;
&amp;lt;/xsl:stylesheet&amp;gt; 
&lt;p&gt;
I have removed all the lines associated with the equals-functoid as that included
three inline c# methods which are irrelevant. Anyway, as you can see, my functoid
is not being called at all. Because I chose the ValueMapping category, the generated
xslt assumes it is actually a built-in value mapping functoid and it totally overrules
the logic inside the functoid. 
&lt;p&gt;
So, this really came as a surprise to me... but well...it makes sense when you think
about it, naturally. Some of the types of functoids just require logic that goes beyond
the code inside a functoid. 
&lt;p&gt;
So, the ValueMapping category just didn't work for me. Then I thought; "Oh, who cares?"?
I will just use the String category instead, because those certainly do not have weird
functionality around them... they get input and return a string as output, that is
it. And the functoid will just appear in the String group in the toolbox in VS.NET. 
&lt;p&gt;
That gave me a new headache, that was another surprise; You cannot connect the output
of a logical functoid to the input of a string functoid. So... I was stuck. 
&lt;p&gt;
One of my solutions would accept the output of a logical functoid as input, but my
functoid logic was overridden. The other simply wouldn't accept the output of a logical
functoid as input. 
&lt;p&gt;
I have tried the following FunctoidCategories:
&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="100%" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Category&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Assert&lt;/td&gt;
&lt;td valign="top"&gt;
Terminates when logical functoid returns true. Has the wrong value in output field
when logical functoid returns false.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Conversion&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Count&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Cumulative&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
DatabaseExtract&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
DatabaseLookup&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
DateTime&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
ExitenceLooping&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Index&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Iteration&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Keymatch&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot compile. You get an "Object not set to an instance of an object" exception.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Logical&lt;/td&gt;
&lt;td valign="top"&gt;
The output field isn't created.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Looping&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
MassCopy&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Math&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
NilValue&lt;/td&gt;
&lt;td valign="top"&gt;
Only creates output field if logical functoid returns true and then it adds the xsi:nil
attribute and no value in the output field.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Scientific&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Scripter&lt;/td&gt;
&lt;td valign="top"&gt;
The scripting functoid has no script type set, either external or inline, so proper
code cannot be generated for it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
String&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
TableExtractor&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
TableLooping&lt;/td&gt;
&lt;td valign="top"&gt;
Needs the table grid configured and is therefore useless.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Unknown&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
ValueMapping&lt;/td&gt;
&lt;td valign="top"&gt;
Only creates the output field if the logical functoid returns true.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
XPath&lt;/td&gt;
&lt;td valign="top"&gt;
Cannot connect output of logical functoid to input.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
So, basically, I haven't been able to do it... for now. Either I cannot connect a
logical functoid to my custom functoid, I get an error either at compile time or something
goes wrong semantically at runtime.
&lt;/p&gt;
&lt;p&gt;
I haven't given up 100% yet... but I must say, that the task has turned out to be
a whole lot more difficult than I thought it would be.
&lt;/p&gt;
&lt;p&gt;
Look out for a part 3 in this series... if it comes, I will have solved this issue
:-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f7174897-9089-48a8-b88e-9c82b0d12ace" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f7174897-9089-48a8-b88e-9c82b0d12ace.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d33b686b-b059-4381-a0e7-1c56e808f7f0</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d33b686b-b059-4381-a0e7-1c56e808f7f0.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d33b686b-b059-4381-a0e7-1c56e808f7f0.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d33b686b-b059-4381-a0e7-1c56e808f7f0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am doing a lot of functoid implementation these days, and therefore, I have for
instance decided to find out what these FunctoidCategories are and where in the toolbox
the different categories belong.
</p>
        <p>
In the toolbox, we have the following groups of functoids:
</p>
        <ul>
          <li>
String 
</li>
          <li>
Mathematical 
</li>
          <li>
Logical 
</li>
          <li>
Date/Time 
</li>
          <li>
Conversion 
</li>
          <li>
Scientific 
</li>
          <li>
Cumulative 
</li>
          <li>
Database 
</li>
          <li>
Advanced</li>
        </ul>
        <p>
I still remember my first custom functoid - I was really expecting that in my code
I could decide in which group my functoid should appear and maybe even create my own
group. But that isn't the case. There are 24 different FunctoidCategories that I can
assign my functoid, and only the above 9 groups. You can read more about the different
functoid categories <a href="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx" target="_blank">here</a>.
Basically, I will just give a very short resumé of this information and then I will
match each category to a group in the toolbox, so you have this information for future
reference.
</p>
        <p>
So, this is what I know:
</p>
        <table cellspacing="0" cellpadding="2" width="100%" border="1">
          <tbody>
            <tr>
              <td valign="top">
                <strong>Category</strong>
              </td>
              <td valign="top">
                <strong>Toolbox group</strong>
              </td>
              <td valign="top">
                <strong>Description</strong>
              </td>
            </tr>
            <tr>
              <td valign="top">
Assert</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Conversion</td>
              <td valign="top">
Conversion</td>
              <td valign="top">
Converts characters to and from their numeric representation, and to convert numbers
from one base to another.</td>
            </tr>
            <tr>
              <td valign="top">
Count</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Cumulative</td>
              <td valign="top">
Cumulative</td>
              <td valign="top">
Performs various kinds of accumulation of the value of a field that occurs multiple
times in a source document and outputs a single output.</td>
            </tr>
            <tr>
              <td valign="top">
DatabaseExtract</td>
              <td valign="top">
Database</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
DatabaseLookup</td>
              <td valign="top">
Database</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
DateTime</td>
              <td valign="top">
Date/Time</td>
              <td valign="top">
Adds date, time, date and time, or add days to a specified date, in output data.</td>
            </tr>
            <tr>
              <td valign="top">
ExistenceLooping</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Index</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Iteration</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Keymatch</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Logical</td>
              <td valign="top">
Logical</td>
              <td valign="top">
Controls conditional behavior of other functoids to determine whether particular output
data is created.</td>
            </tr>
            <tr>
              <td valign="top">
Looping</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
MassCopy</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Math</td>
              <td valign="top">
Mathematical</td>
              <td valign="top">
Performs specific numeric calculations such as addition, multiplication, and division.</td>
            </tr>
            <tr>
              <td valign="top">
NilValue</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Scientific</td>
              <td valign="top">
Scientific</td>
              <td valign="top">
Performs specific scientific calculations such as logarithmic, exponential, and trigonometric
functions.</td>
            </tr>
            <tr>
              <td valign="top">
Scripter</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
String</td>
              <td valign="top">
String</td>
              <td valign="top">
Manipulates data strings by using well-known string functions such as concatenation,
length, find, and trim.</td>
            </tr>
            <tr>
              <td valign="top">
TableExtractor</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
TableLooping</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
Unknown</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
ValueMapping</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
            <tr>
              <td valign="top">
XPath</td>
              <td valign="top">
Advanced</td>
              <td valign="top">
For internal use only.</td>
            </tr>
          </tbody>
        </table>
        <p>
To see this for your self, download 
</p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:3113958b-7e18-4273-ba17-a39b221e9773" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/FunctoidCategoryofcustomfunctoids_14A81/eliasen.eu.blogentries.ifthenelsefunctoid.zip" target="_blank">this
file</a>
          </p>
        </div>
. Unzip the zip file, copy the dll to "%BTS%\Developer Tools\Mapper Extensions", where
%BTS% is the installation folder of BizTalk. Then go to VS.NET 2005 and reload the
toolbox. If you want use one of the functoids, remember to also GAC the dll. All the
functoids have the exact same implementation, but they do not generate the same XSLT
by the mapper because of the chosen category. Perhaps a new blog post on that later
on... 
<p></p><p>
-- 
<br />
eliasen
</p><img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d33b686b-b059-4381-a0e7-1c56e808f7f0" /></body>
      <title>FunctoidCategory of custom functoids - Part I</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d33b686b-b059-4381-a0e7-1c56e808f7f0.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/16/FunctoidCategoryOfCustomFunctoidsPartI.aspx</link>
      <pubDate>Sun, 16 Nov 2008 22:57:44 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am doing a lot of functoid implementation these days, and therefore, I have for
instance decided to find out what these FunctoidCategories are and where in the toolbox
the different categories belong.
&lt;/p&gt;
&lt;p&gt;
In the toolbox, we have the following groups of functoids:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
String 
&lt;li&gt;
Mathematical 
&lt;li&gt;
Logical 
&lt;li&gt;
Date/Time 
&lt;li&gt;
Conversion 
&lt;li&gt;
Scientific 
&lt;li&gt;
Cumulative 
&lt;li&gt;
Database 
&lt;li&gt;
Advanced&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I still remember my first custom functoid - I was really expecting that in my code
I could decide in which group my functoid should appear and maybe even create my own
group. But that isn't the case. There are 24 different FunctoidCategories that I can
assign my functoid, and only the above 9 groups. You can read more about the different
functoid categories &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.biztalk.basefunctoids.functoidcategory.aspx" target="_blank"&gt;here&lt;/a&gt;.
Basically, I will just give a very short resumé of this information and then I will
match each category to a group in the toolbox, so you have this information for future
reference.
&lt;/p&gt;
&lt;p&gt;
So, this is what I know:
&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="100%" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Category&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Toolbox group&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Assert&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Conversion&lt;/td&gt;
&lt;td valign="top"&gt;
Conversion&lt;/td&gt;
&lt;td valign="top"&gt;
Converts characters to and from their numeric representation, and to convert numbers
from one base to another.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Count&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Cumulative&lt;/td&gt;
&lt;td valign="top"&gt;
Cumulative&lt;/td&gt;
&lt;td valign="top"&gt;
Performs various kinds of accumulation of the value of a field that occurs multiple
times in a source document and outputs a single output.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
DatabaseExtract&lt;/td&gt;
&lt;td valign="top"&gt;
Database&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
DatabaseLookup&lt;/td&gt;
&lt;td valign="top"&gt;
Database&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
DateTime&lt;/td&gt;
&lt;td valign="top"&gt;
Date/Time&lt;/td&gt;
&lt;td valign="top"&gt;
Adds date, time, date and time, or add days to a specified date, in output data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
ExistenceLooping&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Index&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Iteration&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Keymatch&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Logical&lt;/td&gt;
&lt;td valign="top"&gt;
Logical&lt;/td&gt;
&lt;td valign="top"&gt;
Controls conditional behavior of other functoids to determine whether particular output
data is created.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Looping&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
MassCopy&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Math&lt;/td&gt;
&lt;td valign="top"&gt;
Mathematical&lt;/td&gt;
&lt;td valign="top"&gt;
Performs specific numeric calculations such as addition, multiplication, and division.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
NilValue&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Scientific&lt;/td&gt;
&lt;td valign="top"&gt;
Scientific&lt;/td&gt;
&lt;td valign="top"&gt;
Performs specific scientific calculations such as logarithmic, exponential, and trigonometric
functions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Scripter&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
String&lt;/td&gt;
&lt;td valign="top"&gt;
String&lt;/td&gt;
&lt;td valign="top"&gt;
Manipulates data strings by using well-known string functions such as concatenation,
length, find, and trim.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
TableExtractor&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
TableLooping&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
Unknown&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
ValueMapping&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
XPath&lt;/td&gt;
&lt;td valign="top"&gt;
Advanced&lt;/td&gt;
&lt;td valign="top"&gt;
For internal use only.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
To see this for your self, download 
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:3113958b-7e18-4273-ba17-a39b221e9773" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/FunctoidCategoryofcustomfunctoids_14A81/eliasen.eu.blogentries.ifthenelsefunctoid.zip" target="_blank"&gt;this
file&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
. Unzip the zip file, copy the dll to "%BTS%\Developer Tools\Mapper Extensions", where
%BTS% is the installation folder of BizTalk. Then go to VS.NET 2005 and reload the
toolbox. If you want use one of the functoids, remember to also GAC the dll. All the
functoids have the exact same implementation, but they do not generate the same XSLT
by the mapper because of the chosen category. Perhaps a new blog post on that later
on... 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d33b686b-b059-4381-a0e7-1c56e808f7f0" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d33b686b-b059-4381-a0e7-1c56e808f7f0.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d8bc8e42-e351-4d99-908e-b809e90b614d</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d8bc8e42-e351-4d99-908e-b809e90b614d.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d8bc8e42-e351-4d99-908e-b809e90b614d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d8bc8e42-e351-4d99-908e-b809e90b614d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have often wondered why the built-in functoids doesn't encompass an If-Then-Else
functoid. The Value Mapping functoid only has an If-Then-part and not the Else-part.
</p>
        <p>
This is the first of two blog posts. This post will explore how to solve the issue
with the built-in functionality of BizTalk. The next post will be about creating a
custom functoid to do the job instead and the issues that come with this task.
</p>
        <p>
So, using the built-in functionality:
</p>
        <p>
Imagine this input schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseInputSchema.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="112" alt="IfThenElseInputSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseInputSchema_thumb.jpg" width="147" border="0" />
          </a>
        </p>
        <p>
And imagine this output schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseOutputSchema.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="84" alt="IfThenElseOutputSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseOutputSchema_thumb.jpg" width="154" border="0" />
          </a>
        </p>
        <p>
My goal, now is to create a map that will map the value of the "ifJan" element to
the destination IF the "qualifier" element equals the word "Jan" and otherwise the
value of the "ifNotJan" element should be mapped.
</p>
        <p>
So basically, given this input:
</p>
        <p>
&lt;ns0:IfThenElseInput xmlns:ns0="<a href="http://IfThenElse.IfThenElseInput&quot;">http://IfThenElse.IfThenElseInput"</a>&gt;<br />
  &lt;qualifier&gt;Jan&lt;/qualifier&gt;<br />
  &lt;ifJan&gt;ifJan&lt;/ifJan&gt;<br />
  &lt;ifNotJan&gt;ifNotJan&lt;/ifNotJan&gt;<br />
&lt;/ns0:IfThenElseInput&gt; 
</p>
        <p>
I want this output:
</p>
        <p>
&lt;ns0:IfThenElseOutput xmlns:ns0="<a href="http://IfThenElse.IfThenElseOutput&quot;">http://IfThenElse.IfThenElseOutput"</a>&gt;<br />
  &lt;field&gt;ifJan&lt;/field&gt;<br />
&lt;/ns0:IfThenElseOutput&gt; 
</p>
        <p>
And given this input:
</p>
        <p>
&lt;ns0:IfThenElseInput xmlns:ns0="<a href="http://IfThenElse.IfThenElseInput&quot;">http://IfThenElse.IfThenElseInput"</a>&gt;<br />
  &lt;qualifier&gt;NotJan&lt;/qualifier&gt;<br />
  &lt;ifJan&gt;ifJan&lt;/ifJan&gt;<br />
  &lt;ifNotJan&gt;ifNotJan&lt;/ifNotJan&gt;<br />
&lt;/ns0:IfThenElseInput&gt;
</p>
        <p>
I want this output:
</p>
        <p>
&lt;ns0:IfThenElseOutput xmlns:ns0="<a href="http://IfThenElse.IfThenElseOutput&quot;">http://IfThenElse.IfThenElseOutput"</a>&gt;<br />
  &lt;field&gt;ifNotJan&lt;/field&gt;<br />
&lt;/ns0:IfThenElseOutput&gt;
</p>
        <p>
Using a map and the built-in functoids, that would look like this:
</p>
        <p>
 <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Functoids.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="190" alt="IfThenElseMap_Functoids" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Functoids_thumb.jpg" width="451" border="0" /></a></p>
        <p>
Basically, you need one value mapping functoid for each possible value to pass on,
and a logical functoid for each value as well, to use in the value mapping functoid.
The "String Concatenate" functoid is just my way of returning the string to use for
the qualifier - in this case: "Jan".
</p>
        <p>
You can also do it using one scripting functoid like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_XSLT.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="138" alt="IfThenElseMap_Scripting_XSLT" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_XSLT_thumb.jpg" width="451" border="0" />
          </a>
        </p>
        <p>
where the scripting functoid is an "Inline XSLT Call Template" scripting type, and
the script looks likes this:
</p>
        <p>
&lt;xsl:template name="IfThenElse"&gt;<br />
  &lt;xsl:param name="qualifier" /&gt;<br />
  &lt;xsl:param name="ifJan" /&gt;<br />
  &lt;xsl:param name="ifNotJan" /&gt;<br />
  &lt;xsl:element name="field"&gt;<br />
    &lt;xsl:choose&gt;<br />
      &lt;xsl:when test="$qualifier='Jan'"&gt;<br />
        &lt;xsl:value-of select="$ifJan" /&gt;<br />
      &lt;/xsl:when&gt;<br />
      &lt;xsl:otherwise&gt;<br />
        &lt;xsl:value-of select="$ifNotJan" /&gt;<br />
      &lt;/xsl:otherwise&gt;<br />
    &lt;/xsl:choose&gt;<br />
  &lt;/xsl:element&gt;<br />
&lt;/xsl:template&gt; 
</p>
        <p>
Now... IF my good friend Henrik Badsberg is reading this, then by now he is screaming:
"USE A BLOODY C# SCRIPTING FUNCTOID!!!!!" :-) 
</p>
        <p>
This, naturally is also an option: 
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_CSharp.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="138" alt="IfThenElseMap_Scripting_CSharp" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_CSharp_thumb.jpg" width="451" border="0" />
          </a>
        </p>
        <p>
with an "Inline C#" script containing this script: 
</p>
        <p>
public string IfThenElse(string qualifier, string ifJan, string ifNotJan)<br />
{<br />
  if (qualifier == "Jan")<br />
    return ifJan;<br />
  else<br />
    return ifNotJan;<br />
} 
</p>
        <p>
Both scripting solutions can be altered to accept the output of a logical functoid
as the first input. Just change the string "Jan" to "true" in the scripts, and change
the name of the parameter if you want. 
</p>
        <p>
Now then... I am not a big fan of either of these three options. Generally, I avoid
scripting functoids when I can because it is difficult for a new developer to know
what is happening when he opens the map because he will have to open up all scripting
functoids and find out (and remember) what they do. Also, I am not really a big fan
of the first solution either. First of all, there are too many functoids, and it can
messy if this solution is needed several times in a map. Secondly, you get a warning
every time you compile, because you have two inputs to one element.
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:a5a7990f-4d20-49d8-b310-2511383a432d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
You can find my project with the three working maps <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElse.zip" target="_blank">here.</a></p>
        </div>
        <p>
        </p>
        <p>
In my next post, I will look into creating a custom functoid that does the job and
I can tell you right now; That isn't as easy as I had imagined...
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d8bc8e42-e351-4d99-908e-b809e90b614d" />
      </body>
      <title>Solving the "If-Then-Else" problem in a map - part I</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d8bc8e42-e351-4d99-908e-b809e90b614d.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/15/SolvingTheIfThenElseProblemInAMapPartI.aspx</link>
      <pubDate>Sat, 15 Nov 2008 20:49:40 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have often wondered why the built-in functoids doesn't encompass an If-Then-Else
functoid. The Value Mapping functoid only has an If-Then-part and not the Else-part.
&lt;/p&gt;
&lt;p&gt;
This is the first of two blog posts. This post will explore how to solve the issue
with the built-in functionality of BizTalk. The next post will be about creating a
custom functoid to do the job instead and the issues that come with this task.
&lt;/p&gt;
&lt;p&gt;
So, using the built-in functionality:
&lt;/p&gt;
&lt;p&gt;
Imagine this input schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseInputSchema.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="112" alt="IfThenElseInputSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseInputSchema_thumb.jpg" width="147" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
And imagine this output schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseOutputSchema.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="84" alt="IfThenElseOutputSchema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseOutputSchema_thumb.jpg" width="154" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
My goal, now is to create a map that will map the value of the "ifJan" element to
the destination IF the "qualifier" element equals the word "Jan" and otherwise the
value of the "ifNotJan" element should be mapped.
&lt;/p&gt;
&lt;p&gt;
So basically, given this input:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:IfThenElseInput xmlns:ns0="&lt;a href="http://IfThenElse.IfThenElseInput&amp;quot;"&gt;http://IfThenElse.IfThenElseInput"&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;qualifier&amp;gt;Jan&amp;lt;/qualifier&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;ifJan&amp;gt;ifJan&amp;lt;/ifJan&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;ifNotJan&amp;gt;ifNotJan&amp;lt;/ifNotJan&amp;gt;&lt;br&gt;
&amp;lt;/ns0:IfThenElseInput&amp;gt; 
&lt;p&gt;
I want this output:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:IfThenElseOutput xmlns:ns0="&lt;a href="http://IfThenElse.IfThenElseOutput&amp;quot;"&gt;http://IfThenElse.IfThenElseOutput"&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;field&amp;gt;ifJan&amp;lt;/field&amp;gt;&lt;br&gt;
&amp;lt;/ns0:IfThenElseOutput&amp;gt; 
&lt;p&gt;
And given this input:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:IfThenElseInput xmlns:ns0="&lt;a href="http://IfThenElse.IfThenElseInput&amp;quot;"&gt;http://IfThenElse.IfThenElseInput"&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;qualifier&amp;gt;NotJan&amp;lt;/qualifier&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;ifJan&amp;gt;ifJan&amp;lt;/ifJan&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;ifNotJan&amp;gt;ifNotJan&amp;lt;/ifNotJan&amp;gt;&lt;br&gt;
&amp;lt;/ns0:IfThenElseInput&amp;gt;
&lt;/p&gt;
&lt;p&gt;
I want this output:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;ns0:IfThenElseOutput xmlns:ns0="&lt;a href="http://IfThenElse.IfThenElseOutput&amp;quot;"&gt;http://IfThenElse.IfThenElseOutput"&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;field&amp;gt;ifNotJan&amp;lt;/field&amp;gt;&lt;br&gt;
&amp;lt;/ns0:IfThenElseOutput&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Using a map and the built-in functoids, that would look like this:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Functoids.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="190" alt="IfThenElseMap_Functoids" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Functoids_thumb.jpg" width="451" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Basically, you need one value mapping functoid for each possible value to pass on,
and a logical functoid for each value as well, to use in the value mapping functoid.
The "String Concatenate" functoid is just my way of returning the string to use for
the qualifier - in this case: "Jan".
&lt;/p&gt;
&lt;p&gt;
You can also do it using one scripting functoid like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_XSLT.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="138" alt="IfThenElseMap_Scripting_XSLT" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_XSLT_thumb.jpg" width="451" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
where the scripting functoid is an "Inline XSLT Call Template" scripting type, and
the script looks likes this:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;xsl:template name="IfThenElse"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:param name="qualifier" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:param name="ifJan" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:param name="ifNotJan" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xsl:element name="field"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:choose&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:when test="$qualifier='Jan'"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="$ifJan" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:when&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:otherwise&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="$ifNotJan" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:otherwise&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:choose&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xsl:element&amp;gt;&lt;br&gt;
&amp;lt;/xsl:template&amp;gt; 
&lt;p&gt;
Now... IF my good friend Henrik Badsberg is reading this, then by now he is screaming:
"USE A BLOODY C# SCRIPTING FUNCTOID!!!!!" :-) 
&lt;p&gt;
This, naturally is also an option: 
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_CSharp.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="138" alt="IfThenElseMap_Scripting_CSharp" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElseMap_Scripting_CSharp_thumb.jpg" width="451" border="0"&gt;&lt;/a&gt; 
&lt;p&gt;
with an "Inline C#" script containing this script: 
&lt;p&gt;
public string IfThenElse(string qualifier, string ifJan, string ifNotJan)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; if (qualifier == "Jan")&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return ifJan;&lt;br&gt;
&amp;nbsp; else&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return ifNotJan;&lt;br&gt;
} 
&lt;p&gt;
Both scripting solutions can be altered to accept the output of a logical functoid
as the first input. Just change the string "Jan" to "true" in the scripts, and change
the name of the parameter if you want. 
&lt;p&gt;
Now then... I am not a big fan of either of these three options. Generally, I avoid
scripting functoids when I can because it is difficult for a new developer to know
what is happening when he opens the map because he will have to open up all scripting
functoids and find out (and remember) what they do. Also, I am not really a big fan
of the first solution either. First of all, there are too many functoids, and it can
messy if this solution is needed several times in a map. Secondly, you get a warning
every time you compile, because you have two inputs to one element.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:a5a7990f-4d20-49d8-b310-2511383a432d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
You can find my project with the three working maps &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/CreatinganIfThenElsefunctoid_C6A8/IfThenElse.zip" target="_blank"&gt;here.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
In my next post, I will look into creating a custom functoid that does the job and
I can tell you right now; That isn't as easy as I had imagined...
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d8bc8e42-e351-4d99-908e-b809e90b614d" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d8bc8e42-e351-4d99-908e-b809e90b614d.aspx</comments>
      <category>BizTalk 2004</category>
      <category>BizTalk 2006</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a6a1c53d-a594-4d1c-8878-bb9d79058956</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a6a1c53d-a594-4d1c-8878-bb9d79058956.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a6a1c53d-a594-4d1c-8878-bb9d79058956.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a6a1c53d-a594-4d1c-8878-bb9d79058956</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
On October 29'th I did a BizTalk presentation for the <a href="http://www.aanug.dk" target="_blank">Aalborg
.NET User Group</a>. It was the first in AANUG, so it makes sense that the topic should
be the best topic ever :-)
</p>
        <p>
Those who were present will remember that I completely broke the time frame I was
bound by, and didn't even make it all the way through my presentation.
</p>
        <p>
Weird, how I always get side tracked when I talk about something I am good at and/or
like :-)
</p>
        <p>
Anyway, this blog post has two purposes:
</p>
        <ol>
          <li>
Just a little more advertising for <a href="http://www.aanug.dk" target="_blank">Aalborg
.NET User Group</a>. If you live close by, sign up and come to our meetings</li>
          <li>
To make the slides available. 
<div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:af634918-dd11-4896-a511-7404b47a10af" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p>
They can be found <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalkpresentationfortheAa.NETUserGroup_B0FF/BizTalk%20pr%C3%A6sentation%20for%20AANUG.pptx" target="_blank">here.</a></p></div>
Only in Danish, I am afraid.</li>
        </ol>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a6a1c53d-a594-4d1c-8878-bb9d79058956" />
      </body>
      <title>BizTalk presentation for the Aalborg .NET User Group</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a6a1c53d-a594-4d1c-8878-bb9d79058956.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/15/BizTalkPresentationForTheAalborgNETUserGroup.aspx</link>
      <pubDate>Sat, 15 Nov 2008 11:35:36 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
On October 29'th I did a BizTalk presentation for the &lt;a href="http://www.aanug.dk" target="_blank"&gt;Aalborg
.NET User Group&lt;/a&gt;. It was the first in AANUG, so it makes sense that the topic should
be the best topic ever :-)
&lt;/p&gt;
&lt;p&gt;
Those who were present will remember that I completely broke the time frame I was
bound by, and didn't even make it all the way through my presentation.
&lt;/p&gt;
&lt;p&gt;
Weird, how I always get side tracked when I talk about something I am good at and/or
like :-)
&lt;/p&gt;
&lt;p&gt;
Anyway, this blog post has two purposes:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Just a little more advertising for &lt;a href="http://www.aanug.dk" target="_blank"&gt;Aalborg
.NET User Group&lt;/a&gt;. If you live close by, sign up and come to our meetings&lt;/li&gt;
&lt;li&gt;
To make the slides available. 
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:af634918-dd11-4896-a511-7404b47a10af" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
They can be found &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/BizTalkpresentationfortheAa.NETUserGroup_B0FF/BizTalk%20pr%C3%A6sentation%20for%20AANUG.pptx" target="_blank"&gt;here.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
Only in Danish, I am afraid.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a6a1c53d-a594-4d1c-8878-bb9d79058956" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a6a1c53d-a594-4d1c-8878-bb9d79058956.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=6828e644-2dcb-4a92-9bdc-81e39d0eb3ae</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,6828e644-2dcb-4a92-9bdc-81e39d0eb3ae.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,6828e644-2dcb-4a92-9bdc-81e39d0eb3ae.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=6828e644-2dcb-4a92-9bdc-81e39d0eb3ae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, I have just added one more functoid to the collection of functoids. This time,
I have added a string replace functoid, as I think that is really missing from the
standard functoids that BizTalk supplies.
</p>
        <p>
You can get version 3 of my functoid collection here: <a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a></p>
        <p>
And for those of you that are not bothered to read further on the download page than
the download section, let me just repeat some text from the download page:
</p>
        <p>
-- BEGIN QUOTE
</p>
        <p>
As you can probably see from my extremely lousy icons, layouts, and so on, graphics
really isn't one of my strong sides. So if you are good at creating icons and so on,
and would like to help me with this part, please <a href="http://www.eliasen.eu/Contact.aspx">contact</a> me.
</p>
        <p>
-- END QUOTE
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6828e644-2dcb-4a92-9bdc-81e39d0eb3ae" />
      </body>
      <title>StringReplace functoid added to collection</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,6828e644-2dcb-4a92-9bdc-81e39d0eb3ae.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/14/StringReplaceFunctoidAddedToCollection.aspx</link>
      <pubDate>Fri, 14 Nov 2008 13:48:50 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, I have just added one more functoid to the collection of functoids. This time,
I have added a string replace functoid, as I think that is really missing from the
standard functoids that BizTalk supplies.
&lt;/p&gt;
&lt;p&gt;
You can get version 3 of my functoid collection here: &lt;a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
And for those of you that are not bothered to read further on the download page than
the download section, let me just repeat some text from the download page:
&lt;/p&gt;
&lt;p&gt;
-- BEGIN QUOTE
&lt;/p&gt;
&lt;p&gt;
As you can probably see from my extremely lousy icons, layouts, and so on, graphics
really isn't one of my strong sides. So if you are good at creating icons and so on,
and would like to help me with this part, please &lt;a href="http://www.eliasen.eu/Contact.aspx"&gt;contact&lt;/a&gt; me.
&lt;/p&gt;
&lt;p&gt;
-- END QUOTE
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=6828e644-2dcb-4a92-9bdc-81e39d0eb3ae" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,6828e644-2dcb-4a92-9bdc-81e39d0eb3ae.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=59a3f0b2-cd92-4aa3-a8d8-b6d44293d628</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,59a3f0b2-cd92-4aa3-a8d8-b6d44293d628.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,59a3f0b2-cd92-4aa3-a8d8-b6d44293d628.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=59a3f0b2-cd92-4aa3-a8d8-b6d44293d628</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just added a new functoid to my collection (which now consists of TWO functoids
:-) ). This new functoid is a functoid that simply returns a new GUID.
</p>
        <p>
You can download it at <a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=59a3f0b2-cd92-4aa3-a8d8-b6d44293d628" />
      </body>
      <title>NewGUID functoid added to collection</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,59a3f0b2-cd92-4aa3-a8d8-b6d44293d628.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/14/NewGUIDFunctoidAddedToCollection.aspx</link>
      <pubDate>Fri, 14 Nov 2008 13:23:33 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just added a new functoid to my collection (which now consists of TWO functoids
:-) ). This new functoid is a functoid that simply returns a new GUID.
&lt;/p&gt;
&lt;p&gt;
You can download it at &lt;a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=59a3f0b2-cd92-4aa3-a8d8-b6d44293d628" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,59a3f0b2-cd92-4aa3-a8d8-b6d44293d628.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=fe84218f-4bf0-4b7d-85b0-43fa54df199a</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,fe84218f-4bf0-4b7d-85b0-43fa54df199a.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,fe84218f-4bf0-4b7d-85b0-43fa54df199a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=fe84218f-4bf0-4b7d-85b0-43fa54df199a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have had on my to do list for ages, that I should start developing some functoids
that might be nice to have.
</p>
        <p>
Well, finally I have started, and my first functoid can be downloaded from <a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx">http://www.eliasen.eu/DownloadSoftware.aspx</a>. 
</p>
        <p>
Note, that the eliasen.eu domain has just been moved from one hosting company to another,
which means that the link might not work for another day or so.
</p>
        <p>
Comments, bug reports, suggestions, and so on are very welcome.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=fe84218f-4bf0-4b7d-85b0-43fa54df199a" />
      </body>
      <title>Download new functoid</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,fe84218f-4bf0-4b7d-85b0-43fa54df199a.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/13/DownloadNewFunctoid.aspx</link>
      <pubDate>Thu, 13 Nov 2008 19:51:29 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have had on my to do list for ages, that I should start developing some functoids
that might be nice to have.
&lt;/p&gt;
&lt;p&gt;
Well, finally I have started, and my first functoid can be downloaded from &lt;a title="http://www.eliasen.eu/DownloadSoftware.aspx" href="http://www.eliasen.eu/DownloadSoftware.aspx"&gt;http://www.eliasen.eu/DownloadSoftware.aspx&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Note, that the eliasen.eu domain has just been moved from one hosting company to another,
which means that the link might not work for another day or so.
&lt;/p&gt;
&lt;p&gt;
Comments, bug reports, suggestions, and so on are very welcome.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=fe84218f-4bf0-4b7d-85b0-43fa54df199a" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,fe84218f-4bf0-4b7d-85b0-43fa54df199a.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have changed the config of my blog software (dasBlog) so all comments have to be
approved by me. I hate to have to do this, but apparently, the upgrade to a newer
version has made it easy for spammers to write silly comments with links to all sorts
of weird web sites (I guess they are weird - naturally, I have never clicked on one...).
I have already delete 5 inappropriate comments to posts, and they seem to come faster
and faster.
</p>
        <p>
I will ask the programmers of dasBlog to see what is happening, and then disable the
approval flow once I have it solved.
</p>
        <p>
I apologize for the inconvenience.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1" />
      </body>
      <title>Comments need approval</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/12/CommentsNeedApproval.aspx</link>
      <pubDate>Wed, 12 Nov 2008 23:07:42 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have changed the config of my blog software (dasBlog) so all comments have to be
approved by me. I hate to have to do this, but apparently, the upgrade to a newer
version has made it easy for spammers to write silly comments with links to all sorts
of weird web sites (I guess they are weird - naturally, I have never clicked on one...).
I have already delete 5 inappropriate comments to posts, and they seem to come faster
and faster.
&lt;/p&gt;
&lt;p&gt;
I will ask the programmers of dasBlog to see what is happening, and then disable the
approval flow once I have it solved.
&lt;/p&gt;
&lt;p&gt;
I apologize for the inconvenience.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3476453e-0c7e-44dc-b4a3-6f95f5ef9ae1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=e5224665-ac3f-46cb-a3ca-9e4fd47b587c</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,e5224665-ac3f-46cb-a3ca-9e4fd47b587c.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,e5224665-ac3f-46cb-a3ca-9e4fd47b587c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=e5224665-ac3f-46cb-a3ca-9e4fd47b587c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, it is time for the second part of the series about using the <a href="http://www.fpoint.com/biztalk/default.aspx" target="_blank">FarPoint
BizTalk adapter for Excel spreadsheets</a>. You can find my first post in the series,
which was about the installation of the component <a href="http://blog.eliasen.dk/2008/11/10/UsingBizTalkToIntegrateToExcelSpreadsheetsPartI.aspx" target="_blank">here</a>.
</p>
        <p>
So, this post is about the wizard that guides you through creating a schema for an
Excel spreadsheet.
</p>
        <p>
I created a simple spreadsheet to test with. It has two sheets, which you can see
here:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_1.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="spread_1" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_1_thumb.jpg" width="463" border="0" />
          </a>
        </p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_2.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="spread_2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_2_thumb.jpg" width="463" border="0" />
          </a>
        </p>
        <p>
Basically, two sheets - one with order lines and one with comments. So, firing up
the wizard:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_1.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="416" alt="spread_wizard_1" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_1_thumb.jpg" width="685" border="0" />
          </a>
        </p>
        <p>
The first thing to do is to add a new item to your project, and choose the new schema
type "Spreadsheet Schema Wizard". The wizard fires up automatically, when you click
"Add".
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_2.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="409" alt="spread_wizard_2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_2_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
The first screen of the wizard isn't really a surprise :-) It wants to you tell it
which file to use as a base for the schema, and give a target namespace and inform
it about what code page to use.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_3.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="460" alt="spread_wizard_3" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_3_thumb.jpg" width="564" border="0" />
          </a>
        </p>
        <p>
When browsing for files, I noticed that the components apparently not only deals with
spreadsheets (Excel 97-2003 as well as 2007) but also delimited files. So note to
my self: Look at that functionality later on - maybe it is better than BizTalks built-in
support for that, or perhaps more suitable in some situations. Maybe that's a blog
post that will appear at some point :-)
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_4.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="409" alt="spread_wizard_4" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_4_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
So, a few more settings to set, all of which are described in the documentation.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_5.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="409" alt="spread_wizard_5" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_5_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
Now, it shows me the data in the first sheet of the spreadsheet. It has removed all
cells that it has decided are not used for data. Now, I need to select the cells with
data in them, like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_6.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_6" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_6_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
and when I click on the next sheet (Comments), I get to select data from that sheet
as well:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_7.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_7" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_7_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
Notice, that I can only select rows - I can not select single cells or leave some
columns out.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_8.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_8" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_8_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
The next step is to select names for the columns, choose whether they should be elements
or attributes and also the data type of the columns.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_9.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_9" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_9_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
There are four data types available, double, float, datetime and string.
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_10.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_10" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_10_thumb.jpg" width="627" border="0" />
          </a>
        </p>
        <p>
Just to find the difference between the float and double, I chose one of each in my
example and clicked "Finish".
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_11.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="325" alt="spread_wizard_11" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_11_thumb.jpg" width="198" border="0" />
          </a>
        </p>
        <p>
The resulting schema looks like the one above. For each sheet, there is a sheetname
attribute, a header record and a record for the data, which is reoccurring. The double
and float elements were translated into the xs:float and xs:double types... not really
surprising, you might say :-)
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_12.jpg">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="330" alt="spread_wizard_12" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_12_thumb.jpg" width="641" border="0" />
          </a>
        </p>
        <p>
Looking at the properties of the schema, the path to the base spreadsheet has been
pre filled for you in the "Input Instance Filename" and the type is set to "Native".
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_13.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="526" alt="spread_wizard_13" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_13_thumb.jpg" width="600" border="0" />
          </a>
        </p>
        <p>
When validating the instance, I get this XML, which looks like I expected it to.
</p>
        <p>
So, to sum up, the wizard is really simple to use and it takes basically no time to
create the schema.
</p>
        <p>
The major thing I would like to see improved is that I can only have one type of data
in one sheet, meaning that the data in all rows must be for instance order lines,
inventory items, or something like that. I can't have an order header and the order
lines in the same sheet, and I can't have a sheet with an order header which spans
multiple lines. This really restricts the spreadsheets that can be parsed.
</p>
        <p>
My next post in the series will be about the runtime, where I will setup a running
instance of my project and see how it functions at runtime.
</p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:191c572f-64d1-4d2c-a421-2bc356783293" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
You can dowload my project <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/TestingFPointForExcel_partII.zip" target="_blank">here.</a></p>
        </div>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=e5224665-ac3f-46cb-a3ca-9e4fd47b587c" />
      </body>
      <title>Using BizTalk to integrate to Excel spreadsheets - Part II</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,e5224665-ac3f-46cb-a3ca-9e4fd47b587c.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/12/UsingBizTalkToIntegrateToExcelSpreadsheetsPartII.aspx</link>
      <pubDate>Wed, 12 Nov 2008 00:08:57 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, it is time for the second part of the series about using the &lt;a href="http://www.fpoint.com/biztalk/default.aspx" target="_blank"&gt;FarPoint
BizTalk adapter for Excel spreadsheets&lt;/a&gt;. You can find my first post in the series,
which was about the installation of the component &lt;a href="http://blog.eliasen.dk/2008/11/10/UsingBizTalkToIntegrateToExcelSpreadsheetsPartI.aspx" target="_blank"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
So, this post is about the wizard that guides you through creating a schema for an
Excel spreadsheet.
&lt;/p&gt;
&lt;p&gt;
I created a simple spreadsheet to test with. It has two sheets, which you can see
here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_1.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="spread_1" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_1_thumb.jpg" width="463" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="spread_2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_2_thumb.jpg" width="463" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Basically, two sheets - one with order lines and one with comments. So, firing up
the wizard:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_1.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="416" alt="spread_wizard_1" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_1_thumb.jpg" width="685" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The first thing to do is to add a new item to your project, and choose the new schema
type "Spreadsheet Schema Wizard". The wizard fires up automatically, when you click
"Add".
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="409" alt="spread_wizard_2" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_2_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The first screen of the wizard isn't really a surprise :-) It wants to you tell it
which file to use as a base for the schema, and give a target namespace and inform
it about what code page to use.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_3.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="460" alt="spread_wizard_3" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_3_thumb.jpg" width="564" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When browsing for files, I noticed that the components apparently not only deals with
spreadsheets (Excel 97-2003 as well as 2007) but also delimited files. So note to
my self: Look at that functionality later on - maybe it is better than BizTalks built-in
support for that, or perhaps more suitable in some situations. Maybe that's a blog
post that will appear at some point :-)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_4.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="409" alt="spread_wizard_4" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_4_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So, a few more settings to set, all of which are described in the documentation.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_5.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="409" alt="spread_wizard_5" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_5_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now, it shows me the data in the first sheet of the spreadsheet. It has removed all
cells that it has decided are not used for data. Now, I need to select the cells with
data in them, like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_6.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_6" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_6_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
and when I click on the next sheet (Comments), I get to select data from that sheet
as well:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_7.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_7" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_7_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Notice, that I can only select rows - I can not select single cells or leave some
columns out.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_8.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_8" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_8_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The next step is to select names for the columns, choose whether they should be elements
or attributes and also the data type of the columns.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_9.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_9" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_9_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
There are four data types available, double, float, datetime and string.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_10.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="spread_wizard_10" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_10_thumb.jpg" width="627" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Just to find the difference between the float and double, I chose one of each in my
example and clicked "Finish".
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_11.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="325" alt="spread_wizard_11" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_11_thumb.jpg" width="198" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The resulting schema looks like the one above. For each sheet, there is a sheetname
attribute, a header record and a record for the data, which is reoccurring. The double
and float elements were translated into the xs:float and xs:double types... not really
surprising, you might say :-)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_12.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="330" alt="spread_wizard_12" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_12_thumb.jpg" width="641" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Looking at the properties of the schema, the path to the base spreadsheet has been
pre filled for you in the "Input Instance Filename" and the type is set to "Native".
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_13.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="526" alt="spread_wizard_13" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/spread_wizard_13_thumb.jpg" width="600" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When validating the instance, I get this XML, which looks like I expected it to.
&lt;/p&gt;
&lt;p&gt;
So, to sum up, the wizard is really simple to use and it takes basically no time to
create the schema.
&lt;/p&gt;
&lt;p&gt;
The major thing I would like to see improved is that I can only have one type of data
in one sheet, meaning that the data in all rows must be for instance order lines,
inventory items, or something like that. I can't have an order header and the order
lines in the same sheet, and I can't have a sheet with an order header which spans
multiple lines. This really restricts the spreadsheets that can be parsed.
&lt;/p&gt;
&lt;p&gt;
My next post in the series will be about the runtime, where I will setup a running
instance of my project and see how it functions at runtime.
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:191c572f-64d1-4d2c-a421-2bc356783293" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
You can dowload my project &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_97E/TestingFPointForExcel_partII.zip" target="_blank"&gt;here.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=e5224665-ac3f-46cb-a3ca-9e4fd47b587c" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,e5224665-ac3f-46cb-a3ca-9e4fd47b587c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=add2ccff-676f-4eca-93f2-2ef3005cf7e9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,add2ccff-676f-4eca-93f2-2ef3005cf7e9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,add2ccff-676f-4eca-93f2-2ef3005cf7e9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=add2ccff-676f-4eca-93f2-2ef3005cf7e9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
For those of you, who use <a href="http://www.oguzhan.info/togi/" target="_blank">Togi</a> as
a Twitter client, there is now a Danish translation of it available for download...
and, as you will notice on the page, I did the Danish translation :-) Although...
I use the English version myself... but that is besides the point :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=add2ccff-676f-4eca-93f2-2ef3005cf7e9" />
      </body>
      <title>Danish language version for Togi</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,add2ccff-676f-4eca-93f2-2ef3005cf7e9.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/11/DanishLanguageVersionForTogi.aspx</link>
      <pubDate>Tue, 11 Nov 2008 01:27:46 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
For those of you, who use &lt;a href="http://www.oguzhan.info/togi/" target="_blank"&gt;Togi&lt;/a&gt; as
a Twitter client, there is now a Danish translation of it available for download...
and, as you will notice on the page, I did the Danish translation :-) Although...
I use the English version myself... but that is besides the point :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=add2ccff-676f-4eca-93f2-2ef3005cf7e9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,add2ccff-676f-4eca-93f2-2ef3005cf7e9.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=1c536d4e-5146-415a-bc8a-245e5bcb8cc5</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,1c536d4e-5146-415a-bc8a-245e5bcb8cc5.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,1c536d4e-5146-415a-bc8a-245e5bcb8cc5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=1c536d4e-5146-415a-bc8a-245e5bcb8cc5</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
So, I finally decided to try out the <a href="http://www.fpoint.com/biztalk/default.aspx" target="_blank">FarPoint
BizTalk adapter for Excel spreadsheets</a>. It's always nice to have tried as many
adapters as possible, so I can use this knowledge when talking to customers.
</p>
        <p>
This post is the first of a series of posts about this product. The first post is
about installation and the basic functionality. The next posts will go deeper into
separate functionality.
</p>
        <p>
Let me just make one thing clear before I begin: I am not in any way affiliated with
FarPoint Technologies, nor are they paying me anything to write these posts.
</p>
        <p>
So, to begin; The installation was easy. Just a next-next-finish wizard. All the information
needed from you is the product code, a serial number, and the installation folder,
if you want to change that.
</p>
        <p>
After installation, I have the functionality I would expect from this kind of product:
</p>
        <ol>
          <li>
Pipeline components to use in pipelines<br /><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_disassembler_component.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="348" alt="excel_disassembler_component" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_disassembler_component_thumb.jpg" width="269" border="0" /></a><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_assembler_component.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="286" alt="excel_assembler_component" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_assembler_component_thumb.jpg" width="268" border="0" /></a></li>
          <li>
Schema extension for the schemas<br /><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/image_6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="295" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/image_thumb_2.png" width="506" border="0" /></a></li>
          <li>
Wizard to help me create the schemas<br /><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/add_schema.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="416" alt="add_schema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/add_schema_thumb.jpg" width="685" border="0" /></a></li>
          <li>
Documentation<br /><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/spread_documentation.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="657" alt="spread_documentation" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/spread_documentation_thumb.jpg" width="425" border="0" /></a></li>
        </ol>
        <p>
So, to sum up:
</p>
        <ol>
          <li>
The installation is easy.</li>
          <li>
The architecture of the solution seems to be exactly what I would expect, ie. pipeline
components, schema extensions and a wizard.</li>
        </ol>
        <p>
My next post in the series will take a deeper look at the wizard for creating schemas
for use by the pipeline disassembler and assembler.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1c536d4e-5146-415a-bc8a-245e5bcb8cc5" />
      </body>
      <title>Using BizTalk to integrate to Excel spreadsheets - Part I</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,1c536d4e-5146-415a-bc8a-245e5bcb8cc5.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/10/UsingBizTalkToIntegrateToExcelSpreadsheetsPartI.aspx</link>
      <pubDate>Mon, 10 Nov 2008 22:49:25 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
So, I finally decided to try out the &lt;a href="http://www.fpoint.com/biztalk/default.aspx" target="_blank"&gt;FarPoint
BizTalk adapter for Excel spreadsheets&lt;/a&gt;. It's always nice to have tried as many
adapters as possible, so I can use this knowledge when talking to customers.
&lt;/p&gt;
&lt;p&gt;
This post is the first of a series of posts about this product. The first post is
about installation and the basic functionality. The next posts will go deeper into
separate functionality.
&lt;/p&gt;
&lt;p&gt;
Let me just make one thing clear before I begin: I am not in any way affiliated with
FarPoint Technologies, nor are they paying me anything to write these posts.
&lt;/p&gt;
&lt;p&gt;
So, to begin; The installation was easy. Just a next-next-finish wizard. All the information
needed from you is the product code, a serial number, and the installation folder,
if you want to change that.
&lt;/p&gt;
&lt;p&gt;
After installation, I have the functionality I would expect from this kind of product:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Pipeline components to use in pipelines&lt;br&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_disassembler_component.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="348" alt="excel_disassembler_component" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_disassembler_component_thumb.jpg" width="269" border="0"&gt;&lt;/a&gt; &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_assembler_component.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="286" alt="excel_assembler_component" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/excel_assembler_component_thumb.jpg" width="268" border="0"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Schema extension for the schemas&lt;br&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="295" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/image_thumb_2.png" width="506" border="0"&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Wizard to help me create the schemas&lt;br&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/add_schema.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="416" alt="add_schema" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/add_schema_thumb.jpg" width="685" border="0"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Documentation&lt;br&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/spread_documentation.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="657" alt="spread_documentation" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/UsingBizTalktointegratetoExcelspreadshee_11F7C/spread_documentation_thumb.jpg" width="425" border="0"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
So, to sum up:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The installation is easy.&lt;/li&gt;
&lt;li&gt;
The architecture of the solution seems to be exactly what I would expect, ie. pipeline
components, schema extensions and a wizard.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
My next post in the series will take a deeper look at the wizard for creating schemas
for use by the pipeline disassembler and assembler.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1c536d4e-5146-415a-bc8a-245e5bcb8cc5" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,1c536d4e-5146-415a-bc8a-245e5bcb8cc5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=98764827-a434-4104-b030-3d8fb17833a9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,98764827-a434-4104-b030-3d8fb17833a9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,98764827-a434-4104-b030-3d8fb17833a9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=98764827-a434-4104-b030-3d8fb17833a9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
In almost all multiple server installations of BizTalk I have encountered, there has
been issues with MSDTC. MSDTC is Microsofts product for handling distributed transactions,
meaning transactions that span multiple servers. BizTalk uses this in high scale,
when running transactions against SQL Server, to maintain consistency in BizTalks
databases.
</p>
        <p>
All issues with MSDTC are solvable - sometimes it is just hard to figure out what
is wrong. 
</p>
        <p>
First of all, always use the DTCTester tool at <a href="http://support.microsoft.com/kb/293799">http://support.microsoft.com/kb/293799</a> to
test your MSDTC installation. If this tool reports no errors and you are still having
issues, then most likely, MSDTC isn't the cause of your issues.
</p>
        <p>
If something is wrong with MSDTC, I have encountered four major issues:
</p>
        <ol>
          <li>
MSDTC doesn't run on either of the server. Solve this by starting MSDTC. Steps to
start MSDTC (Note, that the MMC snapin is buggy, and it might appear that the "Component
Services" node has no children... but it does, trust me :-) ):</li>
        </ol>
        <ol>
          <li>
Go to "Administrative Tools" =&gt; "Component Services"</li>
          <li>
Go to "Component Services" =&gt; "Computers" =&gt; "My Computer"</li>
          <li>
Right click "My Computer" and choose "Start MS DTC".<br /><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/start_msdtc.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="306" alt="start_msdtc" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/start_msdtc_thumb.jpg" width="522" border="0" /></a></li>
        </ol>
        <li>
MSDTC isn't configured for network access on both servers. Solve this in "add/remove
windows components" here:<br /><a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/install_msdtc_network_access.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="411" alt="install_msdtc_network_access" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/install_msdtc_network_access_thumb.jpg" width="630" border="0" /></a></li>
        <li>
The two servers have the same MS DTC ID. This ocurs if both servers are clones of
the same server or if one of the ervers is a clone of the other server. Usually, when
cloning servers, sysprep is used to clear out those errors, but in case it hasn't
been used, here is how you fix it: 
</li>
        <ol>
          <li>
Run "msdtc -uninstall" from a command prompt</li>
          <li>
reboot</li>
          <li>
Run "msdtc -install" from a command prompt</li>
          <li>
reboot</li>
        </ol>
        <li>
You can't ping the servers by hostname, which is required. This basically means, that
from both servers, you need to be able to ping the other server by hostname - pinging
by IP address isn't enough. If you can't ping by hostname, you have two options:</li>
        <ol>
          <li>
Get the network administrator to update your DNS</li>
          <li>
Enter new information into the hosts file in c:\windows\system32\drivers\etc</li>
        </ol>
        <p>
Hope this helps. 
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=98764827-a434-4104-b030-3d8fb17833a9" />
      </body>
      <title>Transactions giving you a headache</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,98764827-a434-4104-b030-3d8fb17833a9.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/10/TransactionsGivingYouAHeadache.aspx</link>
      <pubDate>Mon, 10 Nov 2008 18:28:38 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
In almost all multiple server installations of BizTalk I have encountered, there has
been issues with MSDTC. MSDTC is Microsofts product for handling distributed transactions,
meaning transactions that span multiple servers. BizTalk uses this in high scale,
when running transactions against SQL Server, to maintain consistency in BizTalks
databases.
&lt;/p&gt;
&lt;p&gt;
All issues with MSDTC are solvable - sometimes it is just hard to figure out what
is wrong. 
&lt;/p&gt;
&lt;p&gt;
First of all, always use the DTCTester tool at &lt;a href="http://support.microsoft.com/kb/293799"&gt;http://support.microsoft.com/kb/293799&lt;/a&gt; to
test your MSDTC installation. If this tool reports no errors and you are still having
issues, then most likely, MSDTC isn't the cause of your issues.
&lt;/p&gt;
&lt;p&gt;
If something is wrong with MSDTC, I have encountered four major issues:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
MSDTC doesn't run on either of the server. Solve this by starting MSDTC. Steps to
start MSDTC (Note, that the MMC snapin is buggy, and it might appear that the "Component
Services" node has no children... but it does, trust me :-) ):&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
Go to "Administrative Tools" =&amp;gt; "Component Services"&lt;/li&gt;
&lt;li&gt;
Go to "Component Services" =&amp;gt; "Computers" =&amp;gt; "My Computer"&lt;/li&gt;
&lt;li&gt;
Right click "My Computer" and choose "Start MS DTC".&lt;br&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/start_msdtc.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="306" alt="start_msdtc" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/start_msdtc_thumb.jpg" width="522" border="0"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
MSDTC isn't configured for network access on both servers. Solve this in "add/remove
windows components" here:&lt;br&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/install_msdtc_network_access.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="411" alt="install_msdtc_network_access" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Transactionsgivingyouaheadache_12380/install_msdtc_network_access_thumb.jpg" width="630" border="0"&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
The two servers have the same MS DTC ID. This ocurs if both servers are clones of
the same server or if one of the ervers is a clone of the other server. Usually, when
cloning servers, sysprep is used to clear out those errors, but in case it hasn't
been used, here is how you fix it: 
&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
Run "msdtc -uninstall" from a command prompt&lt;/li&gt;
&lt;li&gt;
reboot&lt;/li&gt;
&lt;li&gt;
Run "msdtc -install" from a command prompt&lt;/li&gt;
&lt;li&gt;
reboot&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
You can't ping the servers by hostname, which is required. This basically means, that
from both servers, you need to be able to ping the other server by hostname - pinging
by IP address isn't enough. If you can't ping by hostname, you have two options:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
Get the network administrator to update your DNS&lt;/li&gt;
&lt;li&gt;
Enter new information into the hosts file in c:\windows\system32\drivers\etc&lt;/li&gt;
&lt;/ol&gt;
&gt;
&lt;p&gt;
Hope this helps. 
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=98764827-a434-4104-b030-3d8fb17833a9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,98764827-a434-4104-b030-3d8fb17833a9.aspx</comments>
      <category>BizTalk 2004</category>
      <category>BizTalk 2006</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=f3cab648-b563-46f2-b536-d6df23488e75</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,f3cab648-b563-46f2-b536-d6df23488e75.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,f3cab648-b563-46f2-b536-d6df23488e75.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=f3cab648-b563-46f2-b536-d6df23488e75</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Finally, I have managed to end the upgrading-hell it has been. I am now up to version
2.2.8279.16125 of dasBlog, and this is currently the latest release. I didn't have
the guts to upgrade directly from 1.9 to 2.2, so I went over 2.0 and 2.1 to get there.
</p>
        <p>
To me, everything looks ok - let me know if you discover anything else.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f3cab648-b563-46f2-b536-d6df23488e75" />
      </body>
      <title>Upgraded blog software to 2.2.8279.16125</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,f3cab648-b563-46f2-b536-d6df23488e75.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/09/UpgradedBlogSoftwareTo22827916125.aspx</link>
      <pubDate>Sun, 09 Nov 2008 01:28:27 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Finally, I have managed to end the upgrading-hell it has been. I am now up to version
2.2.8279.16125 of dasBlog, and this is currently the latest release. I didn't have
the guts to upgrade directly from 1.9 to 2.2, so I went over 2.0 and 2.1 to get there.
&lt;/p&gt;
&lt;p&gt;
To me, everything looks ok - let me know if you discover anything else.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=f3cab648-b563-46f2-b536-d6df23488e75" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,f3cab648-b563-46f2-b536-d6df23488e75.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=efbaab0d-df5d-4815-888f-dfdfae6f21b5</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,efbaab0d-df5d-4815-888f-dfdfae6f21b5.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,efbaab0d-df5d-4815-888f-dfdfae6f21b5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=efbaab0d-df5d-4815-888f-dfdfae6f21b5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just upgraded dasBlog to 2.1.8102.813.
</p>
        <p>
I hope this hasn't introduced weird behavior. Please contact me if you encounter errors
or issues.
</p>
        <p>
Thanks
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=efbaab0d-df5d-4815-888f-dfdfae6f21b5" />
      </body>
      <title>Upgraded blog software to 2.1.8102.813</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,efbaab0d-df5d-4815-888f-dfdfae6f21b5.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/09/UpgradedBlogSoftwareTo218102813.aspx</link>
      <pubDate>Sun, 09 Nov 2008 00:15:46 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just upgraded dasBlog to 2.1.8102.813.
&lt;/p&gt;
&lt;p&gt;
I hope this hasn't introduced weird behavior. Please contact me if you encounter errors
or issues.
&lt;/p&gt;
&lt;p&gt;
Thanks
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=efbaab0d-df5d-4815-888f-dfdfae6f21b5" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,efbaab0d-df5d-4815-888f-dfdfae6f21b5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=14683a55-1ebc-4d43-8615-deb31c092479</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,14683a55-1ebc-4d43-8615-deb31c092479.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,14683a55-1ebc-4d43-8615-deb31c092479.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=14683a55-1ebc-4d43-8615-deb31c092479</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just upgraded to dasBlog version 2.0.7226.0.
</p>
        <p>
I am hoping it went without issues, but would appreciate an email if you discover
any issues.
</p>
        <p>
Thanks.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=14683a55-1ebc-4d43-8615-deb31c092479" />
      </body>
      <title>Upgraded blog software to 2.0.7226.0</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,14683a55-1ebc-4d43-8615-deb31c092479.aspx</guid>
      <link>http://blog.eliasen.dk/2008/11/08/UpgradedBlogSoftwareTo2072260.aspx</link>
      <pubDate>Sat, 08 Nov 2008 23:47:38 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just upgraded to dasBlog version 2.0.7226.0.
&lt;/p&gt;
&lt;p&gt;
I am hoping it went without issues, but would appreciate an email if you discover
any issues.
&lt;/p&gt;
&lt;p&gt;
Thanks.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=14683a55-1ebc-4d43-8615-deb31c092479" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,14683a55-1ebc-4d43-8615-deb31c092479.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3bf772af-0168-4efa-90f9-b886d6a775e9</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3bf772af-0168-4efa-90f9-b886d6a775e9.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3bf772af-0168-4efa-90f9-b886d6a775e9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3bf772af-0168-4efa-90f9-b886d6a775e9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
The CSD/BizTalk Product Group is conducting a survey to assess customer usage of the
Business Rules Engine (BRE).
</p>
        <p>
They have sent a link to us MVP's to get our opinion, but would also like the opinion
of BizTalk consultants, BizTalk customers, and so on.
</p>
        <p>
If you can spare a few minutes, please take the survey at <a href="https://live.datstat.com/MSCSD-Collector/Survey.ashx?Name=BRE_Usage_Survey_Blog">https://live.datstat.com/MSCSD-Collector/Survey.ashx?Name=BRE_Usage_Survey_Blog</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3bf772af-0168-4efa-90f9-b886d6a775e9" />
      </body>
      <title>Survey about Business Rules Engine</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3bf772af-0168-4efa-90f9-b886d6a775e9.aspx</guid>
      <link>http://blog.eliasen.dk/2008/10/23/SurveyAboutBusinessRulesEngine.aspx</link>
      <pubDate>Thu, 23 Oct 2008 18:57:55 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
The CSD/BizTalk Product Group is conducting a survey to assess customer usage of the
Business Rules Engine (BRE).
&lt;/p&gt;
&lt;p&gt;
They have sent a link to us MVP's to get our opinion, but would also like the opinion
of BizTalk consultants, BizTalk customers, and so on.
&lt;/p&gt;
&lt;p&gt;
If you can spare a few minutes, please take the survey at &lt;a href="https://live.datstat.com/MSCSD-Collector/Survey.ashx?Name=BRE_Usage_Survey_Blog"&gt;https://live.datstat.com/MSCSD-Collector/Survey.ashx?Name=BRE_Usage_Survey_Blog&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3bf772af-0168-4efa-90f9-b886d6a775e9" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3bf772af-0168-4efa-90f9-b886d6a775e9.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=bdd85433-8a9b-42f2-95a0-9d6175486dd8</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,bdd85433-8a9b-42f2-95a0-9d6175486dd8.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,bdd85433-8a9b-42f2-95a0-9d6175486dd8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=bdd85433-8a9b-42f2-95a0-9d6175486dd8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today, a former customer of mine called me and had a question. She is using updategrams
to insert rows into a table in SQL Server, and she had a problem with dates. The input
CSV sometimes had an empty string for a date. 
</p>
        <p>
This would translate in the XML to an element with an empty string inside it. This
would then get mapped to an attribute for that column in the table, and when SQL Server
read the updategram, the 01-01-1900 was inserted into the date field because no other
value was specified.
</p>
        <p>
The customer wants null to be inserted instead. She asked me how to do this, and I
said that that was easy - I would send her an example later this night. 
</p>
        <p>
So I started preparing my example, and it turns out, that my approach only works for
elements and records - I have never before had to suppress an attribute, so I wasn't
aware of this. My approach being, bye the way, that I connect a logical functoid to
the destination node that I don't want created under some circumstances. But a logical
functoid can not be connected to an attribute in the destination schema. Bummer.
</p>
        <p>
So I eventually went with a custom scripting functoid, and my example ended up like
this:
</p>
        <p>
Input schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="344" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb.png" width="567" border="0" />
          </a>
        </p>
        <p>
Just a plain schema with three elements, all required.
</p>
        <p>
The output schema:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_4.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="353" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_1.png" width="612" border="0" />
          </a>
        </p>
        <p>
This schema has three attributes to simulate the updategram and also an element just
to show the approach for elements.
</p>
        <p>
The map ended up like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_6.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="227" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_2.png" width="492" border="0" />
          </a>
        </p>
        <p>
Element1 goes to att1 and Element3 goes to att3. No magic there.
</p>
        <p>
As for element2 in the output, I have used to functoids to get it to be created only
when a string is present in the source. The first functoid (the red one) is a "String
Size" functoid, which returns the length of a string. The green functoid is a "Not
equal to" functoid, which has the string length as one parameter and the constant
"0" as the other parameter. The order of these parameters do not matter. So basically,
at runtime, the element2 element is created if and only if, the length of the string
in Element2 is larger than 0. For this particular customer, I could have used the
"Logical Date" functoid instead of the combination of these two functoids, since that
will return true if the input string is a date, which is exactly what I want. But
the above solution is more general and applies to a lot more scenarios. Downside being,
of course, that the above solution will accept a "abc" as a string, and since the
length is larger than 0, it will get to the output.
</p>
        <p>
Anyway, the customer didn't have elements, but attributes. for this I had to use a
custom scripting functoid with this code:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_10.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="460" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_4.png" width="516" border="0" />
          </a>
        </p>
        <p>
Basically, this call template takes one parameter, being the element in the source
that might be empty. It then check the value to see if it is different from the empty
string, and if it is not the empty string, an attribute is created and the value for
the attribute is set to the input parameter.
</p>
        <p>
 
</p>
        <p>
Now, as a side node, the input my customer has is a CSV file, so actually, in this
case you can also take advantage of a nice little property on the schema. To demonstrate,
I have created a flat file schema for a CSV input:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_12.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="425" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_5.png" width="474" border="0" />
          </a>
        </p>
        <p>
As you can see in the properties window, I have set "Suppress Empty Nodes" to "Yes".
When BizTalk parses the flat file, the nodes that would be created as empty nodes
now aren't created at all. This means, that the map can just look like this:
</p>
        <p>
          <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_14.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="179" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_6.png" width="357" border="0" />
          </a>
        </p>
        <p>
No functoids required, and it will give the exact same output as the above map. Do
notice, that this only works with flat files where you make BizTalk suppress empty
nodes.
</p>
        <p>
So, that was all... feel free to ask questions :-)
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:eebecbc3-864f-4257-a232-433ed631f70c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
You can find my demonstration project <a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/SupressEmptyNodes.zip">here</a></p>
        </div>
        <p>
I hope this turns out to be helpful to someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bdd85433-8a9b-42f2-95a0-9d6175486dd8" />
      </body>
      <title>Suppressing attributes in a map</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,bdd85433-8a9b-42f2-95a0-9d6175486dd8.aspx</guid>
      <link>http://blog.eliasen.dk/2008/10/14/SuppressingAttributesInAMap.aspx</link>
      <pubDate>Tue, 14 Oct 2008 01:11:24 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today, a former customer of mine called me and had a question. She is using updategrams
to insert rows into a table in SQL Server, and she had a problem with dates. The input
CSV sometimes had an empty string for a date. 
&lt;/p&gt;
&lt;p&gt;
This would translate in the XML to an element with an empty string inside it. This
would then get mapped to an attribute for that column in the table, and when SQL Server
read the updategram, the 01-01-1900 was inserted into the date field because no other
value was specified.
&lt;/p&gt;
&lt;p&gt;
The customer wants null to be inserted instead. She asked me how to do this, and I
said that that was easy - I would send her an example later this night. 
&lt;/p&gt;
&lt;p&gt;
So I started preparing my example, and it turns out, that my approach only works for
elements and records - I have never before had to suppress an attribute, so I wasn't
aware of this. My approach being, bye the way, that I connect a logical functoid to
the destination node that I don't want created under some circumstances. But a logical
functoid can not be connected to an attribute in the destination schema. Bummer.
&lt;/p&gt;
&lt;p&gt;
So I eventually went with a custom scripting functoid, and my example ended up like
this:
&lt;/p&gt;
&lt;p&gt;
Input schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="344" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb.png" width="567" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Just a plain schema with three elements, all required.
&lt;/p&gt;
&lt;p&gt;
The output schema:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="353" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_1.png" width="612" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
This schema has three attributes to simulate the updategram and also an element just
to show the approach for elements.
&lt;/p&gt;
&lt;p&gt;
The map ended up like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="227" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_2.png" width="492" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Element1 goes to att1 and Element3 goes to att3. No magic there.
&lt;/p&gt;
&lt;p&gt;
As for element2 in the output, I have used to functoids to get it to be created only
when a string is present in the source. The first functoid (the red one) is a "String
Size" functoid, which returns the length of a string. The green functoid is a "Not
equal to" functoid, which has the string length as one parameter and the constant
"0" as the other parameter. The order of these parameters do not matter. So basically,
at runtime, the element2 element is created if and only if, the length of the string
in Element2 is larger than 0. For this particular customer, I could have used the
"Logical Date" functoid instead of the combination of these two functoids, since that
will return true if the input string is a date, which is exactly what I want. But
the above solution is more general and applies to a lot more scenarios. Downside being,
of course, that the above solution will accept a "abc" as a string, and since the
length is larger than 0, it will get to the output.
&lt;/p&gt;
&lt;p&gt;
Anyway, the customer didn't have elements, but attributes. for this I had to use a
custom scripting functoid with this code:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_10.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="460" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_4.png" width="516" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Basically, this call template takes one parameter, being the element in the source
that might be empty. It then check the value to see if it is different from the empty
string, and if it is not the empty string, an attribute is created and the value for
the attribute is set to the input parameter.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Now, as a side node, the input my customer has is a CSV file, so actually, in this
case you can also take advantage of a nice little property on the schema. To demonstrate,
I have created a flat file schema for a CSV input:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_12.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="425" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_5.png" width="474" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
As you can see in the properties window, I have set "Suppress Empty Nodes" to "Yes".
When BizTalk parses the flat file, the nodes that would be created as empty nodes
now aren't created at all. This means, that the map can just look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_14.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="179" alt="image" src="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/image_thumb_6.png" width="357" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
No functoids required, and it will give the exact same output as the above map. Do
notice, that this only works with flat files where you make BizTalk suppress empty
nodes.
&lt;/p&gt;
&lt;p&gt;
So, that was all... feel free to ask questions :-)
&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:eebecbc3-864f-4257-a232-433ed631f70c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
You can find my demonstration project &lt;a href="http://blog.eliasen.dk/content/binary/WindowsLiveWriter/Suppressingattributesinamap_2C84/SupressEmptyNodes.zip"&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
I hope this turns out to be helpful to someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bdd85433-8a9b-42f2-95a0-9d6175486dd8" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,bdd85433-8a9b-42f2-95a0-9d6175486dd8.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=caf4300d-b788-448f-bac5-38b5657b1ffe</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,caf4300d-b788-448f-bac5-38b5657b1ffe.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,caf4300d-b788-448f-bac5-38b5657b1ffe.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=caf4300d-b788-448f-bac5-38b5657b1ffe</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
Today i read an email from a guy who had a problem with optional elements in an input
giving problems in a positional flat file output. The issue being, of course, that
if an element in the input of a map is optional, it might be missing. If the element
is missing, it will not be created in the destination of a map, and therefore, the
flat file assembler will complain because it needs the element to create the correct
positional structure.
</p>
        <p>
I seem to have it working, and will here walk through my solution to explain it.
</p>
        <p>
First of all, I have a Schema for the XML input:
</p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_input.PNG" border="0" />
        </p>
        <p>
All elements are 1..1 except Element2, which has minOccurs=0.
</p>
        <p>
Secondly, I have a schema for the flat file output:
</p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_ff_output.PNG" border="0" />
        </p>
        <p>
All elements are mandatory. The record delimiter is 0x0d 0x0a and the two subrecords
to the root are positional records.
</p>
        <p>
The map is pretty straight forward:
</p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_map.PNG" border="0" />
        </p>
        <p>
Just plain connections between the elements.
</p>
        <p>
For testing purposes, I have two test instances, that validate against the input schema.
They are exactly the same, except one doesn't have the "Element2"-element in it.
</p>
        <p>
If I try to test the map with the input that has the "Element2"-element, and
turn on validation of both input and output, and let the output be "Native", then
it will work. If, however, I test the map inside Visual Studio .NET with the example
that does not have the Element2 element, it will fail. It will report that:
</p>
        <p>
Output validation error: The element 'FirstElements' has incomplete content. List
of possible elements expected: 'Element6'. 
</p>
        <p>
So basically, the map does not create the Element6 element in the destination schema,
and since the Element6 element is required, it fails validation. 
</p>
        <p>
BUT, here comes the surprise; It works if it is deployed. So basically, there must
be some inconstency between how the map tester in VS.NET works and how the stuff works
when running. 
</p>
        <p>
  
</p>
        <p>
I tried changing the schemas to include an element inside the first record as the
last element, such that the input has a "SomeElements" record with three elements
inside it, of which only the second is optional. Likewise I added a new element in
the output schema and updated the map. You can see all three here:
</p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_input_new.PNG" border="0" />
        </p>
        <p>
 
</p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_ff_output_new.PNG" border="0" />
        </p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_map_new.PNG" border="0" />
        </p>
        <p>
Still, I only get errors when testing inside Visual Studio .NET and not when things
are deployed and running... Which actually bugs me a bit, but that is a whole other
story.
</p>
        <p>
So, to sum up, I only have three explanations as to why it works for me and not for
the fellow with the issue:
</p>
        <ol>
          <li>
He is using a BizTalk version that is not BizTalk 2006 R2</li>
          <li>
He hasn't tried deploying it, and is relying on the map tester</li>
          <li>
He has some bogus values for the two properties I will mention below</li>
        </ol>
        <p>
At the end of this post, let me just quickly mention to properties that are available
for flat file schemas:
</p>
        <p>
          <img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_ff_properties.PNG" border="0" />
        </p>
        <p>
The "Generate Empty Nodes" and "Suppress Empty Nodes" properties might be helpful.
They are defined here: <a title="http://msdn.microsoft.com/en-us/library/aa559329.aspx" href="http://msdn.microsoft.com/en-us/library/aa559329.aspx"><strong><font color="#696969">http://msdn.microsoft.com/en-us/library/aa559329.aspx</font></strong></a></p>
        <p>
Hope this helps someone.
</p>
        <p>
You can find my project here: <a href="http://blog.eliasen.dk/content/binary/FlatFileEmptyElements.zip">FlatFileEmptyElements.zip
(27.55 KB)</a></p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=caf4300d-b788-448f-bac5-38b5657b1ffe" />
      </body>
      <title>Positional flat files with empty records</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,caf4300d-b788-448f-bac5-38b5657b1ffe.aspx</guid>
      <link>http://blog.eliasen.dk/2008/09/29/PositionalFlatFilesWithEmptyRecords.aspx</link>
      <pubDate>Mon, 29 Sep 2008 23:01:20 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
Today i read an email from a guy who had a problem with optional elements in an input
giving problems in a positional flat file output. The issue being, of course, that
if an element in the input of a map is optional, it might be missing. If the element
is missing, it will not be created in the destination of a map, and therefore, the
flat file assembler will complain because it needs the element to create the correct
positional structure.
&lt;/p&gt;
&lt;p&gt;
I seem to have it working, and will here walk through my solution to explain it.
&lt;/p&gt;
&lt;p&gt;
First of all, I have a Schema for the XML input:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_input.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
All elements are 1..1 except Element2, which has minOccurs=0.
&lt;/p&gt;
&lt;p&gt;
Secondly, I have a schema for the flat file output:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_ff_output.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
All elements are mandatory. The record delimiter is 0x0d 0x0a and the two subrecords
to the root are positional records.
&lt;/p&gt;
&lt;p&gt;
The map is pretty straight forward:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_map.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Just plain connections between the elements.
&lt;/p&gt;
&lt;p&gt;
For testing purposes, I have two test instances, that validate against the input schema.
They are exactly the same, except one doesn't have the "Element2"-element in it.
&lt;/p&gt;
&lt;p&gt;
If I try to&amp;nbsp;test the map with the input that has the "Element2"-element, and
turn on validation of both input and output, and let the output be "Native", then
it will work. If, however, I test the map inside Visual Studio .NET with the example
that does not have the Element2 element, it will fail. It will report that:
&lt;/p&gt;
&lt;p&gt;
Output validation error: The element 'FirstElements' has incomplete content. List
of possible elements expected: 'Element6'. 
&lt;p&gt;
So basically, the map does not create the Element6 element in the destination schema,
and since the Element6 element is required, it fails validation. 
&lt;p&gt;
BUT, here comes the surprise; It works if it is deployed. So basically, there must
be some inconstency between how the map tester in VS.NET works and how the stuff works
when running. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
I tried changing the schemas to include an element inside the first record as the
last element, such that the input has a "SomeElements" record with three elements
inside it, of which only the second is optional. Likewise I added a new element in
the output schema and updated the map. You can see all three here:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_input_new.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_ff_output_new.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_map_new.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Still, I only get errors when testing inside Visual Studio .NET and not when things
are deployed and running... Which actually bugs me a bit, but that is a whole other
story.
&lt;/p&gt;
&lt;p&gt;
So, to sum up, I only have three explanations as to why it works for me and not for
the fellow with the issue:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
He is using a BizTalk version that is not BizTalk 2006 R2&lt;/li&gt;
&lt;li&gt;
He hasn't tried deploying it, and is relying on the map tester&lt;/li&gt;
&lt;li&gt;
He has some bogus values for the two properties I will mention below&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
At the end of this post, let me just quickly mention to properties that are available
for flat file schemas:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blog.eliasen.dk/content/binary/flatfilemissingelements_ff_properties.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The "Generate Empty Nodes" and "Suppress Empty Nodes" properties might be helpful.
They are defined here: &lt;a title=http://msdn.microsoft.com/en-us/library/aa559329.aspx href="http://msdn.microsoft.com/en-us/library/aa559329.aspx"&gt;&lt;strong&gt;&lt;font color=#696969&gt;http://msdn.microsoft.com/en-us/library/aa559329.aspx&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Hope this helps someone.
&lt;/p&gt;
&lt;p&gt;
You can find my project here:&amp;nbsp;&lt;a href="http://blog.eliasen.dk/content/binary/FlatFileEmptyElements.zip"&gt;FlatFileEmptyElements.zip
(27.55 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=caf4300d-b788-448f-bac5-38b5657b1ffe" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,caf4300d-b788-448f-bac5-38b5657b1ffe.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=b9d32e3f-4a85-426e-8d93-ede477114a4d</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,b9d32e3f-4a85-426e-8d93-ede477114a4d.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,b9d32e3f-4a85-426e-8d93-ede477114a4d.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=b9d32e3f-4a85-426e-8d93-ede477114a4d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I have just been informed by my MVP Lead, that Patrick Tisseghem, a very excellent
SharePoint guru and co-founder of <a href="http://www.u2u.be" target="_blank">U2U</a> has
passed away a couple of days ago. 
</p>
        <p>
I have had the pleasure of listening t Patrick talk only once, but he left an impression
of a very knowledgeable and enthusiastic professional, as well as a great guy who
is happy to meet people and talk to them about what ever is one his/their minds.
</p>
        <p>
My thoughts go to his wife, his children and the rest of his family.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b9d32e3f-4a85-426e-8d93-ede477114a4d" />
      </body>
      <title>Patrick Tisseghem is dead</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,b9d32e3f-4a85-426e-8d93-ede477114a4d.aspx</guid>
      <link>http://blog.eliasen.dk/2008/09/05/PatrickTisseghemIsDead.aspx</link>
      <pubDate>Fri, 05 Sep 2008 19:04:06 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I have just been informed by my MVP Lead, that Patrick Tisseghem, a very excellent
SharePoint guru and co-founder of &lt;a href="http://www.u2u.be" target="_blank"&gt;U2U&lt;/a&gt; has
passed away a couple of days ago. 
&lt;/p&gt;
&lt;p&gt;
I have had the pleasure of listening t Patrick talk only once, but he left an impression
of a very knowledgeable and enthusiastic professional, as well as a great guy who
is happy to meet people and talk to them about what ever is one his/their minds.
&lt;/p&gt;
&lt;p&gt;
My thoughts go to his wife, his children and the rest of his family.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=b9d32e3f-4a85-426e-8d93-ede477114a4d" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,b9d32e3f-4a85-426e-8d93-ede477114a4d.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=65623e67-30af-459c-b051-0f09d3716ad5</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,65623e67-30af-459c-b051-0f09d3716ad5.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,65623e67-30af-459c-b051-0f09d3716ad5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=65623e67-30af-459c-b051-0f09d3716ad5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am probably the 234'th blogger to write about this, but just in case... 
</p>
        <p>
Alan Smith has decided to maintain two bloggers guides for now... One is the commonly
known Bloggers Guide to BizTalk. The new one is the Bloggers Guide to Oslo, which
deals with the oslo related technologies, such as WCF and WF.
</p>
        <p>
Alan has had the guide on gotdotnet earlier, but now he has created the <a title="http://bloggersguides.net/" href="http://bloggersguides.net/">http://bloggersguides.net/</a> site,
which I highly recommend you monitor closely :-)
</p>
        <p>
That's all, folks.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=65623e67-30af-459c-b051-0f09d3716ad5" />
      </body>
      <title>The Bloggers Guide finally has a permanent space</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,65623e67-30af-459c-b051-0f09d3716ad5.aspx</guid>
      <link>http://blog.eliasen.dk/2008/09/02/TheBloggersGuideFinallyHasAPermanentSpace.aspx</link>
      <pubDate>Tue, 02 Sep 2008 20:44:04 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am probably the 234'th blogger to write about this, but just in case... 
&lt;/p&gt;
&lt;p&gt;
Alan Smith has decided to maintain two bloggers guides for now... One is the commonly
known Bloggers Guide to BizTalk. The new one is the Bloggers Guide to Oslo, which
deals with the oslo related technologies, such as WCF and WF.
&lt;/p&gt;
&lt;p&gt;
Alan has had the guide on gotdotnet earlier, but now he has created the &lt;a title="http://bloggersguides.net/" href="http://bloggersguides.net/"&gt;http://bloggersguides.net/&lt;/a&gt; site,
which I highly recommend you monitor closely :-)
&lt;/p&gt;
&lt;p&gt;
That's all, folks.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=65623e67-30af-459c-b051-0f09d3716ad5" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,65623e67-30af-459c-b051-0f09d3716ad5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=bd0ee989-64b2-4909-828d-717933778ad2</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,bd0ee989-64b2-4909-828d-717933778ad2.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,bd0ee989-64b2-4909-828d-717933778ad2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=bd0ee989-64b2-4909-828d-717933778ad2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
I am happy to announce, that a couple of great guys are planning to start a .NET User
Group here in Aalborg, Denmark, where I am happy to live.
</p>
        <p>
Information about the group can be found at their web site at <a title="http://www.aanug.dk/" href="http://www.aanug.dk/">http://www.aanug.dk/</a> -
no information yet, though. It will appear soon, they promise :-)
</p>
        <p>
Looking forward to seeing what it will be about. Hopefully, I can spread the word
about BizTalk and learn more / tell about Oslo.
</p>
        <p>
Anyway, if you are in the Aalborg area, consider emailing the guys and join the group.
Lets get a good start!
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bd0ee989-64b2-4909-828d-717933778ad2" />
      </body>
      <title>Aalborg .NET User Group</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,bd0ee989-64b2-4909-828d-717933778ad2.aspx</guid>
      <link>http://blog.eliasen.dk/2008/09/01/AalborgNETUserGroup.aspx</link>
      <pubDate>Mon, 01 Sep 2008 20:01:16 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
I am happy to announce, that a couple of great guys are planning to start a .NET User
Group here in Aalborg, Denmark, where I am happy to live.
&lt;/p&gt;
&lt;p&gt;
Information about the group can be found at their web site at &lt;a title="http://www.aanug.dk/" href="http://www.aanug.dk/"&gt;http://www.aanug.dk/&lt;/a&gt; -
no information yet, though. It will appear soon, they promise :-)
&lt;/p&gt;
&lt;p&gt;
Looking forward to seeing what it will be about. Hopefully, I can spread the word
about BizTalk and learn more / tell about Oslo.
&lt;/p&gt;
&lt;p&gt;
Anyway, if you are in the Aalborg area, consider emailing the guys and join the group.
Lets get a good start!
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=bd0ee989-64b2-4909-828d-717933778ad2" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,bd0ee989-64b2-4909-828d-717933778ad2.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3b991326-9cfa-4ea0-b283-dd9aea2f55d3</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3b991326-9cfa-4ea0-b283-dd9aea2f55d3.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3b991326-9cfa-4ea0-b283-dd9aea2f55d3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3b991326-9cfa-4ea0-b283-dd9aea2f55d3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi everyone
</p>
        <p>
Yes, I know that <a href="http://www.eliasen.dk" target="_blank">my web page</a> is
in blue colours. Yes, I know <a href="http://blog.eliasen.dk" target="_blank">my blog</a> is
in blue colours. Yes, I know my <a href="http://biztalk.eliasen.dk" target="_blank">new
BizTalk site</a> is in blue colours. And yess, I know that <a href="http://andreas-og-emil.eliasen.dk" target="_blank">my
sons web page</a> is in blue colours.
</p>
        <p>
Yes, I like blue colours - quit whining! :-D
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3b991326-9cfa-4ea0-b283-dd9aea2f55d3" />
      </body>
      <title>Colours</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3b991326-9cfa-4ea0-b283-dd9aea2f55d3.aspx</guid>
      <link>http://blog.eliasen.dk/2008/08/17/Colours.aspx</link>
      <pubDate>Sun, 17 Aug 2008 20:02:54 GMT</pubDate>
      <description>&lt;p&gt;
Hi everyone
&lt;/p&gt;
&lt;p&gt;
Yes, I know that &lt;a href="http://www.eliasen.dk" target="_blank"&gt;my web page&lt;/a&gt; is
in blue colours. Yes, I know &lt;a href="http://blog.eliasen.dk" target="_blank"&gt;my blog&lt;/a&gt; is
in blue colours. Yes, I know my &lt;a href="http://biztalk.eliasen.dk" target="_blank"&gt;new
BizTalk site&lt;/a&gt; is in blue colours. And yess, I know that &lt;a href="http://andreas-og-emil.eliasen.dk" target="_blank"&gt;my
sons web page&lt;/a&gt; is in blue colours.
&lt;/p&gt;
&lt;p&gt;
Yes, I like blue colours - quit whining! :-D
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3b991326-9cfa-4ea0-b283-dd9aea2f55d3" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3b991326-9cfa-4ea0-b283-dd9aea2f55d3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=1cc537b1-8925-454e-9fcc-b823877de096</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,1cc537b1-8925-454e-9fcc-b823877de096.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,1cc537b1-8925-454e-9fcc-b823877de096.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=1cc537b1-8925-454e-9fcc-b823877de096</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi everyone.
</p>
        <p>
I often realize, that I need some information, but can't really remember what the
thing was called or where to get it.
</p>
        <p>
So I decided to keep track of all the BizTalk stuff I find on my way at <a href="http://biztalk.eliasen.dk">http://biztalk.eliasen.dk</a> -
which is now officially launched :-)
</p>
        <p>
Until now, not much information is there, but it will grow eventually. 
</p>
        <p>
Please, always also use the <a href="http://biztalk247.com">http://biztalk247.com</a> website,
since it really has a great collection of data... But feel free to use my new site,
if you want :-)
</p>
        <p>
Hope this is useful for someone...
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1cc537b1-8925-454e-9fcc-b823877de096" />
      </body>
      <title>New collection of BizTalk artefacts</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,1cc537b1-8925-454e-9fcc-b823877de096.aspx</guid>
      <link>http://blog.eliasen.dk/2008/08/17/NewCollectionOfBizTalkArtefacts.aspx</link>
      <pubDate>Sun, 17 Aug 2008 19:41:21 GMT</pubDate>
      <description>&lt;p&gt;
Hi everyone.
&lt;/p&gt;
&lt;p&gt;
I often realize, that I need some information, but can't really remember what the
thing was called or where to get it.
&lt;/p&gt;
&lt;p&gt;
So I decided to keep track of all the BizTalk stuff I find on my way at &lt;a href="http://biztalk.eliasen.dk"&gt;http://biztalk.eliasen.dk&lt;/a&gt; -
which is now officially launched :-)
&lt;/p&gt;
&lt;p&gt;
Until now, not much information is there, but it will grow eventually. 
&lt;/p&gt;
&lt;p&gt;
Please, always also use the &lt;a href="http://biztalk247.com"&gt;http://biztalk247.com&lt;/a&gt; website,
since it really has a great collection of data... But feel free to use my new site,
if you want :-)
&lt;/p&gt;
&lt;p&gt;
Hope this is useful for someone...
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=1cc537b1-8925-454e-9fcc-b823877de096" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,1cc537b1-8925-454e-9fcc-b823877de096.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=9e09918e-b8f1-4719-81d6-7cd211e64bc2</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,9e09918e-b8f1-4719-81d6-7cd211e64bc2.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,9e09918e-b8f1-4719-81d6-7cd211e64bc2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=9e09918e-b8f1-4719-81d6-7cd211e64bc2</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi everyone!
</p>
        <p>
A couple of hours ago, I received a mail from Microsoft stating, that I have been
awarded the MVP title!
</p>
        <p>
I cannot begin to describe, how happy I am with this, since I made it a personal goal
of mine a couple of years ago, to get the title back. I had it from July 2004 to July
2005, as some of you know.
</p>
        <p>
I have even danced a little bit in our living room with my hands above my head, I
must confess :-)
</p>
        <p>
I truly am happy to get the title back, since it means that Microsoft values my skills
within the BizTalk field and that I must have helped a lot of people in the online
communities.
</p>
        <p>
To learn more about the MVP program, you can <a href="http://mvp.support.microsoft.com/" target="_blank">click
here</a>.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9e09918e-b8f1-4719-81d6-7cd211e64bc2" />
      </body>
      <title>Microsoft Most Valuable Professional</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,9e09918e-b8f1-4719-81d6-7cd211e64bc2.aspx</guid>
      <link>http://blog.eliasen.dk/2008/07/01/MicrosoftMostValuableProfessional.aspx</link>
      <pubDate>Tue, 01 Jul 2008 20:03:41 GMT</pubDate>
      <description>&lt;p&gt;
Hi everyone!
&lt;/p&gt;
&lt;p&gt;
A couple of hours ago, I received a mail from Microsoft stating, that I have been
awarded the MVP title!
&lt;/p&gt;
&lt;p&gt;
I cannot begin to describe, how happy I am with this, since I made it a personal goal
of mine a couple of years ago, to get the title back. I had it from July 2004 to July
2005, as some of you know.
&lt;/p&gt;
&lt;p&gt;
I have even danced a little bit in our living room with my hands above my head, I
must confess :-)
&lt;/p&gt;
&lt;p&gt;
I truly am happy to get the title back, since it means that Microsoft values my skills
within the BizTalk field and that I must have helped a lot of people in the online
communities.
&lt;/p&gt;
&lt;p&gt;
To learn more about the MVP program, you can &lt;a href="http://mvp.support.microsoft.com/" target="_blank"&gt;click
here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br /&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9e09918e-b8f1-4719-81d6-7cd211e64bc2" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,9e09918e-b8f1-4719-81d6-7cd211e64bc2.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=89de7717-2ce8-475b-b603-87741967f770</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,89de7717-2ce8-475b-b603-87741967f770.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,89de7717-2ce8-475b-b603-87741967f770.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=89de7717-2ce8-475b-b603-87741967f770</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi everyone.
</p>
        <p>
I have just upgraded the software on my blog to dasBlog version 1.9.7174.1.
</p>
        <p>
I hope it has been smooth for you all, and if you notie any difficulties, please let
me know.
</p>
        <p>
Later, I will upgarde to dasBlog 2.0, which has been out forquite some time, but one
step at the time, ight? :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=89de7717-2ce8-475b-b603-87741967f770" />
      </body>
      <title>Upgraded dasBlog</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,89de7717-2ce8-475b-b603-87741967f770.aspx</guid>
      <link>http://blog.eliasen.dk/2008/05/04/UpgradedDasBlog.aspx</link>
      <pubDate>Sun, 04 May 2008 19:24:39 GMT</pubDate>
      <description>&lt;p&gt;
Hi everyone.
&lt;/p&gt;
&lt;p&gt;
I have just upgraded the software on my blog to dasBlog version 1.9.7174.1.
&lt;/p&gt;
&lt;p&gt;
I hope it has been smooth for you all, and if you notie any difficulties, please let
me know.
&lt;/p&gt;
&lt;p&gt;
Later, I will upgarde to dasBlog 2.0, which has been out forquite some time, but one
step at the time, ight? :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=89de7717-2ce8-475b-b603-87741967f770" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,89de7717-2ce8-475b-b603-87741967f770.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=38a12e2a-be9e-4bc8-bbde-d82cd93fe67a</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,38a12e2a-be9e-4bc8-bbde-d82cd93fe67a.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,38a12e2a-be9e-4bc8-bbde-d82cd93fe67a.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=38a12e2a-be9e-4bc8-bbde-d82cd93fe67a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Hi everyone<br /><br />
Well, after 7 months at thy:data it seemed clear to me, that thy:data wasn't the place
I wanted to work. Luckily at the same time, my old employer WM-data, that has changed
its name to Logica, was searching for someone exactly with my skills. So it didn't
take long for us to reach an agreement, and therefore, on the 1'st April, I am starting
at Logica. 
<br /><br />
I am really looking forward to this - I will be going back to all my old colleagues,
and my assignments will vary much, going from presale, writing quotes and promoting
Logica to Microsoft to actual design and development of large integration projects,
based on BizTalk, .NET3.0 and stuff.<br /><br />
Just 2 weeks to go...<br /><br />
-- 
<br />
eliasen<br /><p></p><img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=38a12e2a-be9e-4bc8-bbde-d82cd93fe67a" /></body>
      <title>Goodbye thy:data, hello Logica (WM-data)</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,38a12e2a-be9e-4bc8-bbde-d82cd93fe67a.aspx</guid>
      <link>http://blog.eliasen.dk/2008/03/18/GoodbyeThydataHelloLogicaWMdata.aspx</link>
      <pubDate>Tue, 18 Mar 2008 20:00:31 GMT</pubDate>
      <description>Hi everyone&lt;br&gt;
&lt;br&gt;
Well, after 7 months at thy:data it seemed clear to me, that thy:data wasn't the place
I wanted to work. Luckily at the same time, my old employer WM-data, that has changed
its name to Logica, was searching for someone exactly with my skills. So it didn't
take long for us to reach an agreement, and therefore, on the 1'st April, I am starting
at Logica. 
&lt;br&gt;
&lt;br&gt;
I am really looking forward to this - I will be going back to all my old colleagues,
and my assignments will vary much, going from presale, writing quotes and promoting
Logica to Microsoft to actual design and development of large integration projects,
based on BizTalk, .NET3.0 and stuff.&lt;br&gt;
&lt;br&gt;
Just 2 weeks to go...&lt;br&gt;
&lt;br&gt;
-- 
&lt;br&gt;
eliasen&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=38a12e2a-be9e-4bc8-bbde-d82cd93fe67a" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,38a12e2a-be9e-4bc8-bbde-d82cd93fe67a.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=7a40af33-5b9c-40d6-8a64-336c56707342</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,7a40af33-5b9c-40d6-8a64-336c56707342.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,7a40af33-5b9c-40d6-8a64-336c56707342.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=7a40af33-5b9c-40d6-8a64-336c56707342</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
Finally(!) I found time (Well, I should probably have done something else...) to review
the design of my <a href="http://www.eliasen.dk">eliasen.dk</a> homepage. It was awful,
black and very much outdated.
</p>
        <p>
The new design is better, updated, brighter, happier, implemented in .NET and much
more :-)
</p>
        <p>
If you have comments about it, feel free to send them to me.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=7a40af33-5b9c-40d6-8a64-336c56707342" />
      </body>
      <title>New design on my personal homepage</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,7a40af33-5b9c-40d6-8a64-336c56707342.aspx</guid>
      <link>http://blog.eliasen.dk/2008/02/24/NewDesignOnMyPersonalHomepage.aspx</link>
      <pubDate>Sun, 24 Feb 2008 01:58:32 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
Finally(!) I found time (Well, I should probably have done something else...) to review
the design of my &lt;a href="http://www.eliasen.dk"&gt;eliasen.dk&lt;/a&gt; homepage. It was awful,
black and very much outdated.
&lt;/p&gt;
&lt;p&gt;
The new design is better, updated, brighter, happier, implemented in .NET and much
more :-)
&lt;/p&gt;
&lt;p&gt;
If you have comments about it, feel free to send them to me.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=7a40af33-5b9c-40d6-8a64-336c56707342" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,7a40af33-5b9c-40d6-8a64-336c56707342.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a45f063c-786d-450c-b551-cda3b963a597</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a45f063c-786d-450c-b551-cda3b963a597.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a45f063c-786d-450c-b551-cda3b963a597.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a45f063c-786d-450c-b551-cda3b963a597</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
Well, the time has come for me to start running again.
</p>
        <p>
11 years ago (when I was a soldier), I was quite the runner. My best times are 5 km
in 17:30 and half a marathon (21,0975 km) in 1:32:46.
</p>
        <p>
Since then, the weight has come up, as the amount of exercise went down :-).
</p>
        <p>
Anyway, I have lost about 7kg in the last 3-4 months, and now was the time to start
running again... and today was the first time.
</p>
        <p>
A local fitness center had an offer for new members, that I have taken, so not only
did I run today for the first time in a very long time, I also did it on a running
machine. That took some getting used to! :-) I managed to get the damn machine running,
but then it stopped... then I started it again... and then it stopped. Probably next
time I will get some help figuring out how to set the machine appropriately. The run
itself went fairly well... around 7km. I will have to bring some music the next time,
though.
</p>
        <p>
It felt pretty weird, that I did some interval training, where the maximum speed (16
km/h) was just about the same speed as I ran for an hour without breaks in my earlier
years (15 km/h) :-)
</p>
        <p>
So, any goals, Jan? Yes, off course. I have a couple;
</p>
        <ol>
          <li>
I would like my average time to run 1 km to be about 4 minutes.</li>
          <li>
At "Limfjordsløbet" (14 km) at the end of May (2008 :-) ), I want to run faster than
a friend of mine called Tom. Also, running faster than my old boss Anne would be nice
:-). 4 minutes per kilometer would take care of both :-)</li>
          <li>
At some point, I want to run a marathon. I will wait a couple of months to set any
specific dates, times, etc. for this one, since I am really in no shape to guess right
now :-)</li>
        </ol>
        <p>
My legs are fine, I believe.. but perhaps tomorrow I will edit that part out of this
blog post :-)
</p>
        <p>
The plan now is to run every Tuesday, Thursday and Sunday on average.. sometimes it
will be Wednesday instead of Tuesday and so on.
</p>
        <p>
Wish me luck...
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a45f063c-786d-450c-b551-cda3b963a597" />
      </body>
      <title>Back on "track"</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a45f063c-786d-450c-b551-cda3b963a597.aspx</guid>
      <link>http://blog.eliasen.dk/2008/01/06/BackOnTrack.aspx</link>
      <pubDate>Sun, 06 Jan 2008 21:27:35 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
Well, the time has come for me to start running again.
&lt;/p&gt;
&lt;p&gt;
11 years ago (when I was a soldier), I was quite the runner. My best times are 5 km
in 17:30 and half a marathon (21,0975 km) in 1:32:46.
&lt;/p&gt;
&lt;p&gt;
Since then, the weight has come up, as the amount of exercise went down :-).
&lt;/p&gt;
&lt;p&gt;
Anyway, I have lost about 7kg in the last 3-4 months, and now was the time to start
running again... and&amp;nbsp;today was the first time.
&lt;/p&gt;
&lt;p&gt;
A local fitness center had an offer for new members, that I have taken, so not only
did I run today for the first time in a very long time, I also did it on a running
machine. That took some getting used to! :-) I managed to get the damn machine running,
but then it stopped... then I started it again... and then it stopped. Probably next
time I will get some help figuring out how to set the machine appropriately. The run
itself went fairly well... around 7km. I will have to bring some music the next time,
though.
&lt;/p&gt;
&lt;p&gt;
It felt pretty weird, that I did some interval training, where the maximum speed (16
km/h) was just about the same speed as I ran for an hour without breaks in my earlier
years (15 km/h)&amp;nbsp;:-)
&lt;/p&gt;
&lt;p&gt;
So, any goals, Jan? Yes, off course. I have a couple;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
I would like my average time to run 1 km to be about 4 minutes.&lt;/li&gt;
&lt;li&gt;
At "Limfjordsløbet" (14 km) at the end of May (2008 :-) ), I want to run faster than
a friend of mine called Tom. Also, running faster than my old boss Anne would be nice
:-). 4 minutes per kilometer would take care of both :-)&lt;/li&gt;
&lt;li&gt;
At some point, I want to run a marathon. I will wait a couple of months to set any
specific dates, times, etc. for this one, since I am really in no shape to guess right
now :-)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
My legs are fine, I believe.. but perhaps tomorrow I will edit that part out of this
blog post :-)
&lt;/p&gt;
&lt;p&gt;
The plan now is to run every Tuesday, Thursday and Sunday on average.. sometimes it
will be Wednesday instead of Tuesday and so on.
&lt;/p&gt;
&lt;p&gt;
Wish me luck...
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a45f063c-786d-450c-b551-cda3b963a597" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a45f063c-786d-450c-b551-cda3b963a597.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=3a40aef8-8caf-4a37-bfb9-c2a155616951</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,3a40aef8-8caf-4a37-bfb9-c2a155616951.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,3a40aef8-8caf-4a37-bfb9-c2a155616951.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=3a40aef8-8caf-4a37-bfb9-c2a155616951</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So... 
</p>
        <p>
People sometimes ask, what is the difference between catching System.Exception and
the General Exception in a Catch Exception shape in the orchestration designer in
BizTalk.
</p>
        <p>
Off course, an obvious difference is, that with the General Exception, you don't get
an object with properties to investigate. But then it seems that the General Exception
is useless... surely there is a point to it?
</p>
        <p>
Well, I was curious about this myself, so I investigated a bit, and found <a href="http://mark.michaelis.net/Blog/ExceptionHandlingChangesInC20.aspx">this
post</a>. So basically, I think the catch of the general exception in BizTalk 2006
is a left over from BizTalk 2004. In BizTalk 2004 it made sense, since you actually
have exceptions thrown at you that didn't derive from System.Exception. That is no
longer possible in .NET 2.0 - they just haven't removed it from the designer - probably
just to be backwards compatible.
</p>
        <p>
That's it...
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3a40aef8-8caf-4a37-bfb9-c2a155616951" />
      </body>
      <title>System.Exception vs. General Exception</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,3a40aef8-8caf-4a37-bfb9-c2a155616951.aspx</guid>
      <link>http://blog.eliasen.dk/2007/12/12/SystemExceptionVsGeneralException.aspx</link>
      <pubDate>Wed, 12 Dec 2007 18:53:15 GMT</pubDate>
      <description>&lt;p&gt;
So... 
&lt;/p&gt;
&lt;p&gt;
People sometimes ask, what is the difference between catching System.Exception and
the General Exception in a Catch Exception shape in the orchestration designer in
BizTalk.
&lt;/p&gt;
&lt;p&gt;
Off course, an obvious difference is, that with the General Exception, you don't get
an object with properties to investigate. But then it seems that the General Exception
is useless... surely there is a point to it?
&lt;/p&gt;
&lt;p&gt;
Well, I was curious about this myself, so I investigated a bit, and found &lt;a href="http://mark.michaelis.net/Blog/ExceptionHandlingChangesInC20.aspx"&gt;this
post&lt;/a&gt;. So basically, I think the catch of the general exception in BizTalk 2006
is a left over from BizTalk 2004. In BizTalk 2004 it made sense, since you actually
have exceptions thrown at you that didn't derive from System.Exception. That is no
longer possible in .NET 2.0 - they just haven't removed it from the designer - probably
just to be backwards compatible.
&lt;/p&gt;
&lt;p&gt;
That's it...
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=3a40aef8-8caf-4a37-bfb9-c2a155616951" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,3a40aef8-8caf-4a37-bfb9-c2a155616951.aspx</comments>
      <category>BizTalk 2004</category>
      <category>BizTalk 2006</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=c22d35a3-c0cb-4d6e-abce-67bfde21dcfe</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,c22d35a3-c0cb-4d6e-abce-67bfde21dcfe.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,c22d35a3-c0cb-4d6e-abce-67bfde21dcfe.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=c22d35a3-c0cb-4d6e-abce-67bfde21dcfe</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi everyone
</p>
        <p>
Right now I am attending the <a href="http://www.quicklearn.com/class_bizTalk_developer_deep_dive.aspx">Quicklearn
BizTalk 2006 R2 Deep Dive course</a>. I have taken their BizTalk 2004 deep dive and
2006 deep dive earlier, and now the time has come to the R2 one.
</p>
        <p>
The last two times I was taught by John Callaway, and this time it is Alan Smith. 
</p>
        <p>
Basically, if you feel like taking a BizTalk course, that goes deeper than the normal
courses, I highly recommend the quicklean course.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c22d35a3-c0cb-4d6e-abce-67bfde21dcfe" />
      </body>
      <title>Quicklearn BizTalk 2006 R2 Deep Dive course</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,c22d35a3-c0cb-4d6e-abce-67bfde21dcfe.aspx</guid>
      <link>http://blog.eliasen.dk/2007/12/12/QuicklearnBizTalk2006R2DeepDiveCourse.aspx</link>
      <pubDate>Wed, 12 Dec 2007 18:02:21 GMT</pubDate>
      <description>&lt;p&gt;
Hi everyone
&lt;/p&gt;
&lt;p&gt;
Right now I am attending the &lt;a href="http://www.quicklearn.com/class_bizTalk_developer_deep_dive.aspx"&gt;Quicklearn
BizTalk 2006 R2 Deep Dive course&lt;/a&gt;. I have taken their BizTalk 2004 deep dive and
2006 deep dive earlier, and now the time has come to the R2 one.
&lt;/p&gt;
&lt;p&gt;
The last two times I was taught by John Callaway, and this time it is Alan Smith. 
&lt;/p&gt;
&lt;p&gt;
Basically, if you feel like taking a BizTalk course, that goes deeper than the normal
courses, I highly recommend the quicklean course.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=c22d35a3-c0cb-4d6e-abce-67bfde21dcfe" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,c22d35a3-c0cb-4d6e-abce-67bfde21dcfe.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=63893947-675f-4665-9e60-5a3aebfb2897</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,63893947-675f-4665-9e60-5a3aebfb2897.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,63893947-675f-4665-9e60-5a3aebfb2897.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=63893947-675f-4665-9e60-5a3aebfb2897</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
Inspired by my post some weeks ago about me mending a fuse on our car, I really have
outdone myself this time.
</p>
        <p>
First of all, I have changed a light bulbe on my parents car.
</p>
        <p>
Secondly, I have exchanged the dripping faucet in our kitchen for a brand new none-dripping
one. It was actually quite a mess, and after a couple of trial-and-errors, I got it
working. So now we have a new faucet in the kitchen - it doesn't drip, and I made
the switch!
</p>
        <p>
:-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=63893947-675f-4665-9e60-5a3aebfb2897" />
      </body>
      <title>Handyman</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,63893947-675f-4665-9e60-5a3aebfb2897.aspx</guid>
      <link>http://blog.eliasen.dk/2007/11/21/Handyman.aspx</link>
      <pubDate>Wed, 21 Nov 2007 23:37:43 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
Inspired by my post some weeks ago about me mending a fuse on our car, I really have
outdone myself this time.
&lt;/p&gt;
&lt;p&gt;
First of all, I have changed a light bulbe on my parents car.
&lt;/p&gt;
&lt;p&gt;
Secondly, I have exchanged the dripping faucet in our kitchen for a brand new none-dripping
one. It was actually quite a mess, and after a couple of trial-and-errors, I got it
working. So now we have a new faucet in the kitchen - it doesn't drip, and I made
the switch!
&lt;/p&gt;
&lt;p&gt;
:-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=63893947-675f-4665-9e60-5a3aebfb2897" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,63893947-675f-4665-9e60-5a3aebfb2897.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a46d79f2-1d70-4c51-a3de-21b0a0d03998</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a46d79f2-1d70-4c51-a3de-21b0a0d03998</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
Recently, I ran into a peculiar problem, which really had me fooled a long time.
</p>
        <p>
Basically, I had a BizTalk Server 2006 R2 solution running. It consisted of 10 assemblies.
One of the orchestrations in each of 9 of the assemblies was exposed as a web service,
all using complex types - no strings, ints and so on.
</p>
        <p>
And then there was the system, that was to call my web services. I had no saying over
that system. We started calling the first web service. Everything went ok. Then they
implemented code to call the second web service, everything OK... all was well (except
some minor things here and there) for the first eight web services.
</p>
        <p>
But at the ninth web service, strange things started to happen.
</p>
        <p>
Basically, the other system would call my web service, IIS would return http 200 OK,
but still, no data came into BizTalk. I had NOTHING in group hub page, nothing in
HAT, nothing in the eventlog, NOTHING! IIS log said: I received a post on this url
and responded with 200 OK - that's it - nothing more.
</p>
        <p>
Really weird - I mean... where did the XML go? Why were there no errors? So we installed
YATT, which is an http sniffer tool, that would be able to tell us what was exatly
sent across the wires. Basically, what we found out was, that allthough the sender
might have send 13000 bytes, the sniffer only reported maybe 10500 bytes. So we started
investigating the network. The two servers were on the same subnet, one hop away from
eachother. So no servers on the route could mingle with the traffic. 
</p>
        <p>
I decided that I would write my own little C# test program, that would call the web
service and see if that failed as well. It didn't. I ended up calling the web service
succesfully with more than 100k (I didn't bother to try anything higher than that.)
</p>
        <p>
But it turned out, that the sniffer must have a bug - it reported all sorts of different
numbers, when using my test program, and none were correct. Apparently, it wasn't
created to handle large packets, but just a few kilobytes. So we installed wireshark
instead (get it from sourceforge). Now THAT is a nice tool! Totally professional (and
free), and it showed us everything that came in and out - no limitations.
</p>
        <p>
So we did a test with my tool, and a test with the other system, and tried comparing
the http headers, the soap action, and so on. It turned out, that all the other web
services, when called by the other system, returned http 202 Accept and not http 200
OK. And when my test program called the web service, it got the http 202 Accept.
</p>
        <p>
We ended up discovering what the issue was. The other system (programmed in .NET)
wasn't calling my web services the "right way". They were sending everything using
httprequests. Now, this is a perfectly legal way of doing it, but it really requires
that you know what you are doing. I mean: They added a header to the httprequest for
the SOAPAction, and then they built up XML with the soap envelope, soap body, elements
for the web method and inside that the actual XML. This was just a string that they sent
using httprequest.
</p>
        <p>
The answer ended up being that the XML that the other system was sending me had invalid
data in elements of type xsd:date. So basically, the XML couldn't be deserialized
into the object that my web method on the web service was expecting. Therefore, the
web method was never called, and therefore there was no data in biztalks log, the
eventlog or anywhere else.
</p>
        <p>
So, I have learned two things from this:
</p>
        <p>
1. You should always accept the help your programming environment gives you. If the
programmer of the other system had added a web reference to the web service and built
XML and deserialized it into the object that was the parameter, he would have gotten
an exception at runtime, that he could debug. The way he did it meant that we got
NO errors at all - the data just disappeared (which I think .NET shouldn't do. Some
sort of warning somewhere would have been nice.)
</p>
        <p>
2. When debugging, don't trust the tools you download you to help debugging :-)
</p>
        <p>
I hope this can help someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a46d79f2-1d70-4c51-a3de-21b0a0d03998" />
      </body>
      <title>XML disappearing when calling a BizTalk Web Service</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</guid>
      <link>http://blog.eliasen.dk/2007/11/21/XMLDisappearingWhenCallingABizTalkWebService.aspx</link>
      <pubDate>Wed, 21 Nov 2007 23:34:20 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
Recently, I ran into a peculiar problem, which really had me fooled a long time.
&lt;/p&gt;
&lt;p&gt;
Basically, I had a BizTalk Server 2006 R2 solution running. It consisted of 10 assemblies.
One of the orchestrations in each of 9 of the assemblies was exposed as a web service,
all using complex types - no strings, ints and so on.
&lt;/p&gt;
&lt;p&gt;
And then there was the system, that was to call my web services. I had no saying over
that system. We started calling the first web service. Everything went ok. Then they
implemented code to call the second web service, everything OK... all was well (except
some minor things here and there) for the first eight web services.
&lt;/p&gt;
&lt;p&gt;
But at the ninth web service, strange things started to happen.
&lt;/p&gt;
&lt;p&gt;
Basically, the other system would call my web service, IIS would return http 200 OK,
but still, no data came into BizTalk. I had NOTHING in group hub page, nothing in
HAT, nothing in the eventlog, NOTHING! IIS log said: I received a post on this url
and responded with 200 OK - that's it - nothing more.
&lt;/p&gt;
&lt;p&gt;
Really weird - I mean... where did the XML go? Why were there no errors? So we installed
YATT, which is an http sniffer tool, that would be able to tell us what was exatly
sent across the wires. Basically, what we found out was, that allthough the sender
might have send 13000 bytes, the sniffer only reported maybe 10500 bytes. So we started
investigating the network. The two servers were on the same subnet, one hop away from
eachother. So no servers on the route could mingle with the traffic. 
&lt;/p&gt;
&lt;p&gt;
I decided that I would write my own little C# test program, that would call the web
service and see if that failed as well. It didn't. I ended up calling the web service
succesfully with more than 100k (I didn't bother to try anything higher than that.)
&lt;/p&gt;
&lt;p&gt;
But it turned out, that the sniffer must have a bug - it reported all sorts of different
numbers, when using my test program, and none were correct. Apparently, it wasn't
created to handle large packets, but just a few kilobytes. So we installed wireshark
instead (get it from sourceforge). Now THAT is a nice tool! Totally professional (and
free), and it showed us everything that came in and out - no limitations.
&lt;/p&gt;
&lt;p&gt;
So we did a test with my tool, and a test with the other system, and tried comparing
the http headers, the soap action, and so on. It turned out, that all the other web
services, when called by the other system, returned http 202 Accept and not http 200
OK. And when my test program called the web service, it got the http 202 Accept.
&lt;/p&gt;
&lt;p&gt;
We ended up&amp;nbsp;discovering what the issue was. The other system (programmed in .NET)
wasn't calling my web services the "right way". They were sending everything using
httprequests. Now, this is a perfectly legal way of doing it, but it really requires
that you know what you are doing. I mean: They added a header to the httprequest for
the SOAPAction, and then they built up XML with the soap envelope, soap body, elements
for the web method and inside that the actual XML. This was just a string that they&amp;nbsp;sent
using httprequest.
&lt;/p&gt;
&lt;p&gt;
The answer ended up being that the XML that the other system was sending me had invalid
data in elements of type xsd:date. So basically, the XML couldn't be deserialized
into the object that my web method on the web service was expecting. Therefore, the
web method was never called, and therefore there was no data in biztalks log, the
eventlog or anywhere else.
&lt;/p&gt;
&lt;p&gt;
So, I have learned two things from this:
&lt;/p&gt;
&lt;p&gt;
1. You should always accept the help your programming environment gives you. If the
programmer of the other system had added a web reference to the web service and built
XML and deserialized it into the object that was the parameter, he would have gotten
an exception at runtime, that he could debug. The way he did it meant that we got
NO errors at all - the data just disappeared (which I think .NET shouldn't do. Some
sort of warning somewhere would have been nice.)
&lt;/p&gt;
&lt;p&gt;
2. When debugging, don't trust the tools you download you to help debugging :-)
&lt;/p&gt;
&lt;p&gt;
I hope this can help someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a46d79f2-1d70-4c51-a3de-21b0a0d03998" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</comments>
      <category>.NET</category>
      <category>BizTalk 2006</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=9f323fab-d449-48a0-b557-aa8da20f1aa1</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,9f323fab-d449-48a0-b557-aa8da20f1aa1.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,9f323fab-d449-48a0-b557-aa8da20f1aa1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=9f323fab-d449-48a0-b557-aa8da20f1aa1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font color="#000000">Hi</font>
        </p>
        <p>
          <font color="#000000">I am currently supporting an existing BizTalk 2004 environment,
and came across the need to debug an orchestration in the production environment.
Yes, I know - "Not in the production environment", you scream... but yes, indeed -
in the production environment.</font>
        </p>
        <p>
          <font color="#000000">Anyway, I set some breakpoints, waited for the orchestration
to hit the breakpoint and tried to attach to the orchestration. I got this error:</font>
        </p>
        <p>
          <font face="Verdana" color="#000000">Debugging user validation against group '&lt;servername&gt;\BizTalk
Server Administrators' failed with error: Debuging Client is not a BizTalk Server
Administrator.</font>
        </p>
        <p>
          <font face="Verdana" color="#000000">This seemed odd, so I investigated a bit further.
It turns out, that the setup is a multiple server setup, ie. one server for SQL Server
and one for BizTalk 2004. Also, it tunrs out, that the gyuy who installed the servers
didn't use domain groups. The services were running under domain accounts, but the
BizTalk groups were created on both machines. Not a supported setup, but I am hoping
they will upgrade to BizTalk 2006 R2 before long, and therefore, we are not going
to touch that.</font>
        </p>
        <p>
          <font color="#000000">Anyway, it turns out, that the user I was logged in as was a
member of the "BizTalk Server Administrators" group - but only on the BizTalk Server.
Once I added him to the same group on the SQL Server server, all was fine.</font>
        </p>
        <p>
          <font color="#000000">I googled the error, and didn't stumble upon an answer, so I
just thought I'd blog about it in case anyone has the need for the answer some day
:-)</font>
        </p>
        <p>
          <font color="#000000">-- 
<br />
eliasen</font>
        </p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9f323fab-d449-48a0-b557-aa8da20f1aa1" />
      </body>
      <title>Error debugging orchestration in BizTalk 2004</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,9f323fab-d449-48a0-b557-aa8da20f1aa1.aspx</guid>
      <link>http://blog.eliasen.dk/2007/11/21/ErrorDebuggingOrchestrationInBizTalk2004.aspx</link>
      <pubDate>Wed, 21 Nov 2007 23:11:37 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font color=#000000&gt;Hi&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;I am currently supporting an existing BizTalk 2004 environment,
and came across the need to debug an orchestration in the production environment.
Yes, I know - "Not in the production environment", you scream... but yes, indeed -
in the production environment.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;Anyway, I set some breakpoints, waited for the orchestration to
hit the breakpoint and tried to attach to the orchestration. I got this error:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Verdana color=#000000&gt;Debugging user validation against group '&amp;lt;servername&amp;gt;\BizTalk
Server Administrators' failed with error: Debuging Client is not a BizTalk Server
Administrator.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Verdana color=#000000&gt;This seemed odd, so I investigated a bit further.
It turns out, that the setup is a multiple server setup, ie. one server for SQL Server
and one for BizTalk 2004. Also, it tunrs out, that the gyuy who installed the servers
didn't use domain groups. The services were running under domain accounts, but the
BizTalk groups were created on both machines. Not a supported setup, but I am hoping
they will upgrade to BizTalk 2006 R2 before long, and therefore, we are not going
to touch that.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;Anyway, it turns out, that the user I was logged in as was a member
of the "BizTalk Server Administrators" group - but only on the BizTalk Server. Once
I added him to the same group on the SQL Server server, all was fine.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;I googled the error, and didn't stumble upon an answer, so I just
thought I'd blog about it in case anyone has the need for the answer some day :-)&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;-- 
&lt;br&gt;
eliasen&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=9f323fab-d449-48a0-b557-aa8da20f1aa1" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,9f323fab-d449-48a0-b557-aa8da20f1aa1.aspx</comments>
      <category>BizTalk 2004</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=082d8501-dff1-4093-a876-69371bf64226</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,082d8501-dff1-4093-a876-69371bf64226.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,082d8501-dff1-4093-a876-69371bf64226.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=082d8501-dff1-4093-a876-69371bf64226</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
I just thought I would share my experiences from the first BizTalk 2006 R2 I have
installed and configured. 
</p>
        <p>
It was on two different boxes - one for SQL Server and one for BizTalk. Domain groups
were created beforehand, as well as a service account for the services. So everything
should be in place.
</p>
        <p>
Installation went fine, naturally, but the configuration wouldn't let me configure
Group and Runtime. I checked the logs, off course, and the first error was this one:
</p>
        <p>
[09:14:15 Info ConfigHelper]  is not a local entity.<br />
[09:14:15 Error ConfigHelper] d:\depot2300\mercury\private\common\configwizard\confighelper\service.cpp(729):
FAILED hr = 80070421
</p>
        <p>
[09:14:15 Warning ConfigHelper] The account name is invalid or does not exist, or
the password is invalid for the account name specified.<br />
[09:14:15 Warning ConfigHelper]  Failed to validate service credentials for account:
%1
</p>
        <p>
So it had to be something about the credentials I have specified. So I unconfigured,
reconfigured, being very carefully to enter the correct credentials - same error.
I tried again, with extra extra focus on not mistyping anything. Same error.
</p>
        <p>
Then I searched some more in the log file, and found this:
</p>
        <p>
2007-09-25 09:16:49:0441 [INFO] WMI Deploying 'C:\Program Files\Microsoft BizTalk
Server 2006\Microsoft.BizTalk.GlobalPropertySchemas.dll'<br />
2007-09-25 09:16:49:0723 [WARN] AdminLib GetBTSMessage: hrErr=80070002; Msg=The system
cannot find the file specified.; 
<br />
2007-09-25 09:16:49:0723 [WARN] AdminLib GetBTSMessage: hrErr=c0c02560; Msg=Failed
to read "KeepDbDebugKey" from the registry.<br />
The system cannot find the file specified.; 
</p>
        <p>
But the file actually existed. Then I searched the log file some more, and found this:
</p>
        <p>
2007-09-25 09:16:49:0863 [INFO] WMI Error occurred during database creation; attempt
to rollback and delete the partially created database'hcpr-hd-axa-01\BizTalkMgmtDb'<br />
2007-09-25 09:16:49:0863 [INFO] WMI Calling CDataSource.Open() against hcpr-hd-axa-01\master<br />
2007-09-25 09:16:49:0879 [INFO] WMI CDataSource.Open() returned<br />
2007-09-25 09:17:09:0942 [WARN] WMI Rollback failed.  Could not delete database.<br />
2007-09-25 09:17:09:0942 [ERR] WMI Failed in pAdmInst-&gt;Create() in CWMIInstProv::PutInstance().
HR=c0c025b3<br />
2007-09-25 09:17:09:0942 [ERR] WMI WMI error description is generated: Exception of
type 'System.EnterpriseServices.TransactionProxyException' was thrown.<br />
2007-09-25 09:17:09:0942 [INFO] WMI CWMIInstProv::PutInstance() finished. HR=c0c025b3<br />
[09:17:09 Error BtsCfg] d:\depot2300\mercury\private\mozart\source\setup\btscfg\btswmi.cpp(358):
FAILED hr = c0c025b3
</p>
        <p>
[09:17:09 Error BtsCfg] Exception of type 'System.EnterpriseServices.TransactionProxyException'
was thrown.<br />
[09:17:09 Error BtsCfg] d:\depot2300\mercury\private\mozart\source\setup\btscfg\btscfg.cpp(1769):
FAILED hr = c0c025b3
</p>
        <p>
This error pointed to some transaction error, so I downloaded and ran <a href="http://support.microsoft.com/kb/293799">dtctester</a> and
it turned out my MSDTC settigns were not good enough. I spend the better part of a
day looking for this. What really had me confused was that the SSODB was created fine
- the BRE-DB was created fine... and the BizTalkMgmtDb database was sometimes created
just fine. I mean... sometimes it would create the BizTalkMgmtDB database and fail
during creation of the MessageBox. Other times it would fail on the Management database.
So seing as two databases were created just fine, I really didn't think there were
any issues with DTC. 
</p>
        <p>
BUT, this just goes to show; Before starting a multibox installation of BizTalk, ALWAYS
run dtc tester first - just to be sure :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=082d8501-dff1-4093-a876-69371bf64226" />
      </body>
      <title>Error configuring BizTalk Server 2006 R2</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,082d8501-dff1-4093-a876-69371bf64226.aspx</guid>
      <link>http://blog.eliasen.dk/2007/10/21/ErrorConfiguringBizTalkServer2006R2.aspx</link>
      <pubDate>Sun, 21 Oct 2007 18:02:05 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
I just thought I would share my experiences from the first BizTalk 2006 R2 I have
installed and configured. 
&lt;/p&gt;
&lt;p&gt;
It was on two different boxes - one for SQL Server and one for BizTalk. Domain groups
were created beforehand, as well as a service account for the services. So everything
should be in place.
&lt;/p&gt;
&lt;p&gt;
Installation went fine, naturally, but the configuration wouldn't let me configure
Group and Runtime. I checked the logs, off course, and the first error was this one:
&lt;/p&gt;
&lt;p&gt;
[09:14:15 Info ConfigHelper]&amp;nbsp; is not a local entity.&lt;br&gt;
[09:14:15 Error ConfigHelper] d:\depot2300\mercury\private\common\configwizard\confighelper\service.cpp(729):
FAILED hr = 80070421
&lt;/p&gt;
&lt;p&gt;
[09:14:15 Warning ConfigHelper] The account name is invalid or does not exist, or
the password is invalid for the account name specified.&lt;br&gt;
[09:14:15 Warning ConfigHelper] &amp;nbsp;Failed to validate service credentials for account:
%1
&lt;/p&gt;
&lt;p&gt;
So it had to be something about the credentials I have specified. So I unconfigured,
reconfigured, being very carefully to enter the correct credentials - same error.
I tried again, with extra extra focus on not mistyping anything. Same error.
&lt;/p&gt;
&lt;p&gt;
Then I searched some more in the log file, and found this:
&lt;/p&gt;
&lt;p&gt;
2007-09-25 09:16:49:0441 [INFO] WMI Deploying 'C:\Program Files\Microsoft BizTalk
Server 2006\Microsoft.BizTalk.GlobalPropertySchemas.dll'&lt;br&gt;
2007-09-25 09:16:49:0723 [WARN] AdminLib GetBTSMessage: hrErr=80070002; Msg=The system
cannot find the file specified.; 
&lt;br&gt;
2007-09-25 09:16:49:0723 [WARN] AdminLib GetBTSMessage: hrErr=c0c02560; Msg=Failed
to read "KeepDbDebugKey" from the registry.&lt;br&gt;
The system cannot find the file specified.; 
&lt;/p&gt;
&lt;p&gt;
But the file actually existed. Then I searched the log file some more, and found this:
&lt;/p&gt;
&lt;p&gt;
2007-09-25 09:16:49:0863 [INFO] WMI Error occurred during database creation; attempt
to rollback and delete the partially created database'hcpr-hd-axa-01\BizTalkMgmtDb'&lt;br&gt;
2007-09-25 09:16:49:0863 [INFO] WMI Calling CDataSource.Open() against hcpr-hd-axa-01\master&lt;br&gt;
2007-09-25 09:16:49:0879 [INFO] WMI CDataSource.Open() returned&lt;br&gt;
2007-09-25 09:17:09:0942 [WARN] WMI Rollback failed.&amp;nbsp; Could not delete database.&lt;br&gt;
2007-09-25 09:17:09:0942 [ERR] WMI Failed in pAdmInst-&amp;gt;Create() in CWMIInstProv::PutInstance().
HR=c0c025b3&lt;br&gt;
2007-09-25 09:17:09:0942 [ERR] WMI WMI error description is generated: Exception of
type 'System.EnterpriseServices.TransactionProxyException' was thrown.&lt;br&gt;
2007-09-25 09:17:09:0942 [INFO] WMI CWMIInstProv::PutInstance() finished. HR=c0c025b3&lt;br&gt;
[09:17:09 Error BtsCfg] d:\depot2300\mercury\private\mozart\source\setup\btscfg\btswmi.cpp(358):
FAILED hr = c0c025b3
&lt;/p&gt;
&lt;p&gt;
[09:17:09 Error BtsCfg] Exception of type 'System.EnterpriseServices.TransactionProxyException'
was thrown.&lt;br&gt;
[09:17:09 Error BtsCfg] d:\depot2300\mercury\private\mozart\source\setup\btscfg\btscfg.cpp(1769):
FAILED hr = c0c025b3
&lt;/p&gt;
&lt;p&gt;
This error pointed to some transaction error, so I downloaded and ran &lt;a href="http://support.microsoft.com/kb/293799"&gt;dtctester&lt;/a&gt; and
it turned out my MSDTC settigns were not good enough. I spend the better part of a
day looking for this. What really had me confused was that the SSODB was created fine
- the BRE-DB was created fine... and the BizTalkMgmtDb database was sometimes created
just fine. I mean... sometimes it would create the BizTalkMgmtDB database and fail
during creation of the MessageBox. Other times it would fail on the Management database.
So seing as two databases were created just fine, I really didn't think there were
any issues with DTC. 
&lt;/p&gt;
&lt;p&gt;
BUT, this just goes to show; Before starting a multibox installation of BizTalk, ALWAYS
run dtc tester first - just to be sure :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=082d8501-dff1-4093-a876-69371bf64226" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,082d8501-dff1-4093-a876-69371bf64226.aspx</comments>
      <category>BizTalk 2006</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=d8ed8495-b466-4c2e-9ee1-96a7556b174f</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,d8ed8495-b466-4c2e-9ee1-96a7556b174f.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,d8ed8495-b466-4c2e-9ee1-96a7556b174f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=d8ed8495-b466-4c2e-9ee1-96a7556b174f</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi all
</p>
        <p>
This isn't about BizTalk, .NET or anything else technical. This is about ME!
</p>
        <p>
The other day I mended a fuse in our car.
</p>
        <p>
Really? you might say.. so what? Well, to me this is a big deal :-) I don't like getting
dirty hands - I generally never do anything practical around the house... I am lousy
at it, I hate it, and I would rather pay someone else to do it.
</p>
        <p>
But then, the back light on the car stopped working. I changed the light bulbe, which
in itself took me about 2 hours, including driving to the gas station to buy a new
bulbe... and then it turned out the original bulbe wasn't broken. That sucked! Then
I decided I had to take the car to the mechanic... but a friend asked me if I had
checked the fuses. Well, duh... off course not - how would I do that? So with the
manual in one hand and a screwdriver (YES, a screwdriver... me... a screwdriver...)
in the other hand, I found the fuse that wasn't working anymore. I drove, once again,
to the gas station, bought a new one (approximately one dollar) and put it into place.
And now the back lights are working again.
</p>
        <p>
WOW! What en experience, eh? :-)
</p>
        <p>
So after reading this, you might still think: "Is this guy crazy? All this fuzz about
mending a fuse (Thanks to Mads Orbesen Troest for telling me how to say this in English)?
YES! It's a bg deal! :-)
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d8ed8495-b466-4c2e-9ee1-96a7556b174f" />
      </body>
      <title>I have mended a fuse</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,d8ed8495-b466-4c2e-9ee1-96a7556b174f.aspx</guid>
      <link>http://blog.eliasen.dk/2007/10/18/IHaveMendedAFuse.aspx</link>
      <pubDate>Thu, 18 Oct 2007 20:07:20 GMT</pubDate>
      <description>&lt;p&gt;
Hi all
&lt;/p&gt;
&lt;p&gt;
This isn't about BizTalk, .NET or anything else technical. This is about ME!
&lt;/p&gt;
&lt;p&gt;
The other day I&amp;nbsp;mended a fuse in our car.
&lt;/p&gt;
&lt;p&gt;
Really? you might say.. so what? Well, to me this is a big deal :-) I don't like getting
dirty hands - I generally never do anything practical around the house... I am lousy
at it, I hate it, and I would rather pay someone else to do it.
&lt;/p&gt;
&lt;p&gt;
But then, the back light on the car stopped working. I changed the light bulbe, which
in itself took me about 2 hours, including driving to the gas station to buy a new
bulbe... and then it turned out the original bulbe wasn't broken. That sucked! Then
I decided I had to take the car to the mechanic... but a friend asked me if I had
checked the fuses. Well, duh... off course not - how would I do that? So with the
manual in one hand and a screwdriver (YES, a screwdriver... me... a screwdriver...)
in the other hand, I found the fuse that wasn't working anymore. I drove, once again,
to the gas station, bought a new one (approximately one dollar) and put it into place.
And now the back lights are working again.
&lt;/p&gt;
&lt;p&gt;
WOW! What en experience, eh? :-)
&lt;/p&gt;
&lt;p&gt;
So after reading this, you might still think: "Is this guy crazy? All this fuzz about
mending a fuse (Thanks to Mads Orbesen Troest for telling me how to say this in English)?
YES! It's a bg deal! :-)
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=d8ed8495-b466-4c2e-9ee1-96a7556b174f" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,d8ed8495-b466-4c2e-9ee1-96a7556b174f.aspx</comments>
      <category>Personal</category>
    </item>
  </channel>
</rss>