Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

Testing Multi-part Map


Recently I was debugging an orchestration and found unexpected output from the map. The obvious decision was to use Visual Studio’s “Test Map” option. I opened the Map and realized that “Input” schema is a multi-part schema.

Combining two xml messages into one file will produce the multiple roots exception. So, I looked at the map’s source to figure out the structure. In order to view the map source, I simply ran “Validate map” and opened the generated xslt stylesheet.

The interesting part I found on the top of the schema was:

<?xml version=”1.0″ encoding=”UTF-16″?>
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform
exclude-result-prefixes=”msxsl var s1 s0 userCSharp”

The aggregation schema

Here is the root
<xsl:apply-templates select=”/s1:Root” />

The  catch statement
<xsl:template match=”/s1:Root”>
<xsl:for-each select=”InputMessagePart_1/ns0:WorkflowTaskList…”>

The Input message has to have the following structure in order to comply with the generated schema:

<ns0:Root xmlns:ns0=”http://schemas.microsoft.com/BizTalk/2003/aggschema>
Message 1
Message 2

Here is the resulting message I came up with for testing.

<ns0:Root xmlns:ns0=”http://schemas.microsoft.com/BizTalk/2003/aggschema>
<ns0:IssueProcessRequest xmlns:ns0=http://Workflow.IssueProcessing.IssueProcessRequest>
<IssueId xmlns=””>16</IssueId>
<IssueTypeId xmlns=””>1</IssueTypeId>
<IssueTypeCode xmlns=””>REQUEST</IssueTypeCode>
<IssuePurposeId xmlns=””>2</IssuePurposeId>
<WorkflowTaskId xmlns=””>0</WorkflowTaskId>
<IssueStatusCode xmlns=””>O</IssueStatusCode>
<IsApprovalNeeded xmlns=””>false</IsApprovalNeeded>
<SpecialInstraction xmlns=”” />
<ns0:WorkflowTaskList nodeid=”1″ xmlns:ns0=”Oakleaf.Workflow.IssueProcessing”>
<WorkflowTask id=”1″ WorkflowTaskTypeCode=”I”    Resolution1=”SVS_SCHD”
Resolution2=”” xmlns=”Oakleaf.Workflow.IssueProcessing”      workflowTaskAssignedToUserTeam=”CS_SVC_CONFIRM” />

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>