<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Functiods</title>
        <link>http://geekswithblogs.net/PsudoKnowledgeBase/category/9097.aspx</link>
        <description>Functiods</description>
        <language>en-CA</language>
        <copyright>Geordie</copyright>
        <managingEditor>Martin.palmer@mjpalmer.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>How to Map the Selection of the First Item in a Collection to the Final Document</title>
            <link>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/05/13/how-to-map-the-selection-of-the-first-item-in.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;I recently came across a new mapping problem.  I needed to make sure that the final document only had one address for a paper mill to satisfy the requirement of a standard documentation format (PAPINet).  Usually the product is all made to order but every so often paper may be available from stock that was made in a different mill.  The SAP system providing the information contains information on both mills.  The challenge here was to remove the additional mills and only include the mill data for the first mill.  In this case the mill information is not important as the ID for the paper (TAPI) includes a character that identifies the producing mill.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;My first attempt was to limit the number of occurrences of the Mill element.  BizTalk ignored the limit.&lt;/font&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;img height="402" alt="Tried to limit the number of occurances using the schema.  Unsuccessful" width="523" src="/images/geekswithblogs_net/PsudoKnowledgeBase/Mill Attribute Limit Occurances.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
I then tried to use the 'Data Flattening' functoids with an 'Iteration' functoid.  I set the 'Equal' functoid to receive the value from the 'Iteration' functiod and added a constant value of 1 (BizTalk must use 1 base in it's iterations).  When the 'Iteration' functoid equals 1 it will resolve to true allowing the 'Data Flattening' functoids to only process the first occurrence of the Mill attribute.&lt;/p&gt;
&lt;p&gt;&lt;font style="BACKGROUND-COLOR: #ffff00"&gt;&lt;img height="250" alt="Using the iteration functoid to limit the number of occurances" width="687" src="/images/geekswithblogs_net/PsudoKnowledgeBase/Iteration limiting occuances.JPG" /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
The overall solution is a complex mapping from SAP to PAPINet.  It uses a canonical structure to assist in the transformation.  This problem was greatly simplified by using the canonical to canonical mapping (added to allow some complex calculations to be preformed). &lt;/p&gt; &lt;img src="http://geekswithblogs.net/PsudoKnowledgeBase/aggbug/132090.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Geordie</dc:creator>
            <guid>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/05/13/how-to-map-the-selection-of-the-first-item-in.aspx</guid>
            <pubDate>Wed, 13 May 2009 16:04:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PsudoKnowledgeBase/comments/132090.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/05/13/how-to-map-the-selection-of-the-first-item-in.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PsudoKnowledgeBase/comments/commentRss/132090.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How to block the creation of parent nodes when using the data flattening functoid</title>
            <link>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/03/12/how-to-block-the-creation-of-parent-nodes-when-using.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;I've had a few BizTalk maps that have caused me to stop and think as to how to get over the problem of suppressing nodes when the child node has no data.  The issue arises if you use Data flattening shape to block the creation of an element. The child node is suppressed but the parent node is still created.  I just found out how to block the parent node from being created so I’m posting it here so I can find it again the next time I need it.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;img height="362" alt="Suppressing parent nodes" width="887" src="/images/geekswithblogs_net/PsudoKnowledgeBase/BizTalkSuppressNodeMapping.JPG" /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;By connecting the parent nodes to the functoid that provides the condition to the data flattening functoids the parent nodes will be suppressed.&lt;/p&gt;
&lt;p&gt;Thanks to &lt;span id="ctl00_plcHolder_Main_dlistSections_ctl00_lblCategoryHeading"&gt;&lt;a href="http://blogs.digitaldeposit.net/saravana/post/2007/05/18/BizTalk-Map-Suppress-Element-if-Attribute-is-not-required.aspx"&gt;Saravana Kumar&lt;/a&gt;&lt;/span&gt; for posting the answer on his blog.&lt;/p&gt;
&lt;p&gt;Geordie&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PsudoKnowledgeBase/aggbug/130048.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Geordie</dc:creator>
            <guid>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/03/12/how-to-block-the-creation-of-parent-nodes-when-using.aspx</guid>
            <pubDate>Thu, 12 Mar 2009 20:17:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PsudoKnowledgeBase/comments/130048.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/03/12/how-to-block-the-creation-of-parent-nodes-when-using.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PsudoKnowledgeBase/comments/commentRss/130048.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Installing custom functoids</title>
            <link>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/01/21/installing-custom-functoids.aspx</link>
            <description>&lt;p&gt;I just got bit by this one a second time.  So it is time to store the information here to avoid a third occurrence.&lt;/p&gt;
&lt;p&gt;If you get an exception that the functoid was not found.&lt;/p&gt;
&lt;pre&gt;For example:- 'Exception Caught: Functoid not found:
guid({5DE500CC-45BC-454b-A23D-24449899042C})  funcid(6123)'&lt;/pre&gt;
&lt;p&gt;Check that the dll is installed in the mapper extension folder '&lt;font face="Arial"&gt;C:\Program Files\Microsoft BizTalk Server 2006\Developer Tools\Mapper Extensions&lt;/font&gt;' as well as the GAC.&lt;/p&gt;
&lt;p&gt;Geordie&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PsudoKnowledgeBase/aggbug/128875.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Geordie</dc:creator>
            <guid>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/01/21/installing-custom-functoids.aspx</guid>
            <pubDate>Wed, 21 Jan 2009 22:46:51 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PsudoKnowledgeBase/comments/128875.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2009/01/21/installing-custom-functoids.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PsudoKnowledgeBase/comments/commentRss/128875.aspx</wfw:commentRss>
        </item>
        <item>
            <title>XTransformationFailureException: encountered while executing the transform…</title>
            <link>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2008/12/02/xtransformationfailureexception-encountered-while-executing-the-transform.aspx</link>
            <description>&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;I recently encounter this error. It took a little bit of head scratching to work out why we were getting the error. The possible causes were quite high as we are using dynamically assigned maps (see code below).&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;strong&gt;&lt;u&gt;Message Assignment Shape Code&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;
&lt;table cellspacing="1" cellpadding="1" width="80%" align="left" summary="" border="0"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;           &lt;/td&gt;
            &lt;td&gt;&lt;font face="Arial"&gt;SapOrderMapType = System.Type.GetType(SapOrdersMapName);&lt;/font&gt;
            &lt;p&gt;//transform(MyOutputMsg) = MyMapType(MyInputMsg);&lt;/p&gt;
            &lt;p&gt;transform (SapOrder) = SapOrderMapType(CanonicalPO);&lt;/p&gt;
            &lt;p&gt;System.Diagnostics.Trace.WriteLineIf(TraceEnabled, "Transform to SAP schema complete.", TraceCategory);&lt;/p&gt;
            &lt;p&gt;SapOrder(FILE.ReceivedFileName) = "PO_" + CustomerNumber + "_" + PONumber + "_";&lt;/p&gt;
            &lt;p&gt;System.Diagnostics.Trace.WriteLineIf(TraceEnabled, "SAP Order Msg Created", TraceCategory);&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&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; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The error information identifies the transform as the problem but not what the problem is. The inner exception is no additional help- ‘Value cannot be null. Parameter name: extension Exception type: ArgumentNullException’.&lt;/p&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;The problem was eventually tracked down to the custom functoids. In the last map a new functoid was added to convert standard BizTalk dates into standard SAP dates. When the project was deployed the custom functoid dll was not updated.&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;Interestingly this error might occur intermittently as the functiod may not be needed every time the map is used.&lt;/div&gt; &lt;img src="http://geekswithblogs.net/PsudoKnowledgeBase/aggbug/127545.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Geordie</dc:creator>
            <guid>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2008/12/02/xtransformationfailureexception-encountered-while-executing-the-transform.aspx</guid>
            <pubDate>Wed, 03 Dec 2008 04:00:49 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PsudoKnowledgeBase/comments/127545.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PsudoKnowledgeBase/archive/2008/12/02/xtransformationfailureexception-encountered-while-executing-the-transform.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PsudoKnowledgeBase/comments/commentRss/127545.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
