Help with Mapping Scenario
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Help with Mapping Scenario




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Help with Mapping Scenario  
Daren


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-30-04 07:49 AM

Hi

Using correlation I've been able to map values from two source messages to
one destination message, my problem is in comparing all repetitions of a nod
e
in one message for each loop through a repeating strcuture in the other
message. For example the source is:

<inputmessagepart_0>
<ns1:POResponse>
<GUID>12345</GUID>
<ChangeToItemDetail>
<LineNum>1</LineNum>
<ChangesString>Change Qty to 8</ChangesString>
</ChangeToItemDetail>
<ChangeToItemDetail>
<LineNum>1</LineNum>
<ChangesString>Change UnitCost to 0.5</ChangesString>
</ChangeToItemDetail>
</ns1:POResponse>
</inputmessagepart_0>
<inputmessagepart_1>
<ns2:OriginalPO>
<ItemDetail>
<LineNum>1</LineNum>
<Qty>15</Qty>
<UnitCost>1.50</UnitCost>
</ItemDetail>
<ItemDetail>
<LineNum>2</LineNum>
<Qty>25</Qty>
<UnitCost>2.50</UnitCost>
</ItemDetail>
<inputmessagepart_1>
<ns2:OriginalPO>

What I want to be able to do in my mapping is:
while looping through ItemDetails in the OriginalPO message, check if the
<LineNum> matches with any entries for <LineNum> in the repeating
<ChangesToItemDetails> structure in the POResponse message. If there is a
match, extract the <ChangesString>, determine if this is a qty or unitcost
change (I can do this easily with other functoids) and write the numeric
value in the string into the appropriate destination node. If there is not a
match, write the appropriate <Qty> or <UnitCost> value into the destination
node. The problem is that the same line number can appear many times in the
POResponse repeating structure so how do I go through and compare every
repeating node set <ChangesToItemDetail> in the POResponse for each loop
through the OriginalPO <ItemDetail> repeating node set?

I hope that makes sense - any help greatly appreciated.
Daren





[ Post a follow-up to this message ]



    RE: Help with Mapping Scenario  
Tatyana Yakushev [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-30-04 10:55 PM

You have to use scripting function with XSLT Call Template.

Thanks
Tatyana
--------------------
>Thread-Topic: Help with Mapping Scenario
>thread-index: AcSObM7/dSTo3fa0TBCTAqelz2Aa0w==
>X-WBNR-Posting-Host: 144.138.194.134
>From: "examnotes" <Daren@discussions.microsoft.com>
>Subject: Help with Mapping Scenario
>Date: Mon, 30 Aug 2004 01:39:05 -0700
>Lines: 50
>Message-ID: <5F9DA05B-37F8-467C-A479-51B249474F80@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>	charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.biztalk.general
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:19138
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Hi
>
>Using correlation I've been able to map values from two source messages to
>one destination message, my problem is in comparing all repetitions of a no
de
>in one message for each loop through a repeating strcuture in the other
>message. For example the source is:
>
><inputmessagepart_0>
>  <ns1:POResponse>
>    <GUID>12345</GUID>
>    <ChangeToItemDetail>
>      <LineNum>1</LineNum>
>      <ChangesString>Change Qty to 8</ChangesString>
>    </ChangeToItemDetail>
>    <ChangeToItemDetail>
>      <LineNum>1</LineNum>
>      <ChangesString>Change UnitCost to 0.5</ChangesString>
>    </ChangeToItemDetail>
>  </ns1:POResponse>
></inputmessagepart_0>
><inputmessagepart_1>
>  <ns2:OriginalPO>
>    <ItemDetail>
>      <LineNum>1</LineNum>
>      <Qty>15</Qty>
>      <UnitCost>1.50</UnitCost>
>    </ItemDetail>
>    <ItemDetail>
>      <LineNum>2</LineNum>
>      <Qty>25</Qty>
>      <UnitCost>2.50</UnitCost>
>    </ItemDetail>
>  <inputmessagepart_1>
><ns2:OriginalPO>
>
>What I want to be able to do in my mapping is:
>while looping through ItemDetails in the OriginalPO message, check if the
><LineNum> matches with any entries for <LineNum> in the repeating
><ChangesToItemDetails> structure in the POResponse message. If there is a
>match, extract the <ChangesString>, determine if this is a qty or unitcost
>change (I can do this easily with other functoids) and write the numeric
>value in the string into the appropriate destination node. If there is not 
a
>match, write the appropriate <Qty> or <UnitCost> value into the destination
>node. The problem is that the same line number can appear many times in the
>POResponse repeating structure so how do I go through and compare every
>repeating node set <ChangesToItemDetail> in the POResponse for each loop
>through the OriginalPO <ItemDetail> repeating node set?
>
>I hope that makes sense - any help greatly appreciated.
>Daren
>


--

This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this mess
age are best directed to the newsgroup/thread from which they originated.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:45 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register