本文介绍了连续选择唯一值并在BizTalk Map中添加相应数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我对这个BizTalk Server 2010及其在visual studio中的映射非常陌生。


我正面临着通过连续检查并添加相应的其他数据来发送唯一数据时出现问题。


我的输入:



< ns0:Root xmlns:ns0 =" http://ConsecutiveCheck.Input">

 <输入>

  < PO>

   < PONum> PO123< / PONum> 

  < / PO>

  < SKU>

   < SKUNum> SKU123< / SKUNum> 

   < Qty> 100< / Qty> 

   < Desc> Desc_1< /" 

  < / SKU>

  < SKU>

   < SKUNum> SKU123< / SKUNum> 

   < Qty> 200< / Qty> 

   < Desc&Desc; Desc_2< /" 

  < / SKU>

  < SKU>

   < SKUNum> SKU125< / SKUNum> 

   < Qty> 300< / Qty> 

   < Desc&Desc; Desc_3< / Desc> 

  < / SKU>

  < SKU>

   < SKUNum> SKU125< / SKUNum> 

   < Qty> 400< / Qty> 

   < Desc&Desc; Desc_4< / Desc> 

  < / SKU>

  < SKU>

   < SKUNum> SKU123< / SKUNum> 

   < Qty> 500< / Qty> 

   < Desc&Desc; Desc_5< / Desc> 

  < / SKU>

  < SKU>

   < SKUNum> SKU125< / SKUNum> 

   < Qty> 600< / Qty> 

   < Desc&Desc; Desc_6< / Desc> 

  < / SKU>

 < /输入>

< / ns0:Root>




预期输出:


< ns0:Root xmlns:ns0 =" http://ConsecutiveCheck.Input" ;>
$
 <输出>

  < PO>

   < PONum> PO123< / PONum> 

  < / PO>


  < SKU>

   < SKUNum> SKU123< / SKUNum> 

  &NBSP;<数量> 300℃; /数量>   //连续检查(向下看)SKUNum数量已添加100 + 200

   < Desc >> Desc_1 Desc_2< /'  //连续检查SKUNUM Desc已与空格连接

  < / SKU>


  < SKU>

   < SKUNum> SKU125< / SKUNum> 

   < Qty> 700< / Qty>   //连续检查SKUNUM数量已添加300 + 400

   < Desc&Desc; Desc_3 Desc_4< / Desc;  //连续检查SKUNum Desc已与空格连接

  < / SKU>


< SKU>

  &NBSP;< SKUNum> SKU123< / SKUNum> //按原样发送,与SKUNum不同为
   < Qty> 500< / Qty> 

   < Desc&Desc; Desc_5< / Desc> 

  < / SKU>


< SKU>

  &NBSP;< SKUNum> SKU125< / SKUNum> //发送原样,因为下一个没有数据或检查下一个索引是否为空
   < Qty> 600< / Qty> 

   < Desc&Desc; Desc_6< / Desc> 

  < / SKU>


 < / output>

< / ns0:Root>


这是一种情况。


添加到此我有多个< Input>循环,所以在相应的< PO>下循环我想执行上述操作。


需要映射链接/ Functoid或C#脚本编码。


任何提示或逻辑都非常有帮助。迫切需要。


谢谢&最好的问候

解决方案



Hi,

I am very new to this BizTalk Server 2010 and its mapping in visual studio.

I am facing an issue while sending the unique data by consecutive checking and adding the respective other data.

My input:

<ns0:Root xmlns:ns0="http://ConsecutiveCheck.Input">
 <Input>
  <PO>
   <PONum>PO123</PONum> 
  </PO>
  <SKU>
   <SKUNum>SKU123</SKUNum> 
   <Qty>100</Qty> 
   <Desc>Desc_1</Desc> 
  </SKU>
  <SKU>
   <SKUNum>SKU123</SKUNum> 
   <Qty>200</Qty> 
   <Desc>Desc_2</Desc> 
  </SKU>
  <SKU>
   <SKUNum>SKU125</SKUNum> 
   <Qty>300</Qty> 
   <Desc>Desc_3</Desc> 
  </SKU>
  <SKU>
   <SKUNum>SKU125</SKUNum> 
   <Qty>400</Qty> 
   <Desc>Desc_4</Desc> 
  </SKU>
  <SKU>
   <SKUNum>SKU123</SKUNum> 
   <Qty>500</Qty> 
   <Desc>Desc_5</Desc> 
  </SKU>
  <SKU>
   <SKUNum>SKU125</SKUNum> 
   <Qty>600</Qty> 
   <Desc>Desc_6</Desc> 
  </SKU>
 </Input>
</ns0:Root>

Expected Output:

<ns0:Root xmlns:ns0="http://ConsecutiveCheck.Input">
 <Output>
  <PO>
   <PONum>PO123</PONum> 
  </PO>

  <SKU>
   <SKUNum>SKU123</SKUNum> 
   <Qty>300</Qty>  //consecutively checking (looking to next) the SKUNum Qty has been added 100+200
   <Desc>Desc_1 Desc_2</Desc> //consecutively checking the SKUNum Desc has been concatenated with space
  </SKU>

  <SKU>
   <SKUNum>SKU125</SKUNum> 
   <Qty>700</Qty>  //consecutively checking the SKUNum Qty has been added 300+400
   <Desc>Desc_3 Desc_4</Desc> //consecutively checking the SKUNum Desc has been concatenated with space
  </SKU>

<SKU>
   <SKUNum>SKU123</SKUNum> //send as it is as next is different with SKUNum
   <Qty>500</Qty> 
   <Desc>Desc_5</Desc> 
  </SKU>

<SKU>
   <SKUNum>SKU125</SKUNum> //send as it is as next has no data or checking with next index is null
   <Qty>600</Qty> 
   <Desc>Desc_6</Desc> 
  </SKU>

 </Output>
</ns0:Root>

This is one scenario.

Added to this I have multiple <Input> loop, so under respective <PO> loop I want to perform the above operation.

Need Mapping Link/Functoids or C# Script Coding for this.

Any hint or logic is greatly helpful. Need Urgently.

Thanks & Best Regards

解决方案




这篇关于连续选择唯一值并在BizTalk Map中添加相应数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 09:36