且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如果记录存在,则映射;如果不存在,则映射另一个-Biztalk映射

更新时间:2023-02-22 08:15:46

这些是我要实现这一目标的步骤-由于您未包含任何架构定义,因此它必须是解决方案的高级描述或Xml样本.

These are the steps I would take to achieve this - it'll have to be a high level description of a solution as you haven't included any schema definition or Xml sample.

您可以使用XSLT或Mapping Designer来执行此操作.我描述后者;

You can use XSLT or The Mapping Designer to do this. I describe the latter;

1)使用Logical Existence函数来检查地址2"节点是否存在.如果源模式中存在地址2,则返回True.

1) Use the Logical Existence Functoid to Check if the Address 2 node exists. It return True if Address 2 is present in your source schema.

2)将Logical Existence仿函数连接到Value Mapping仿函数(作为第一个输入),并将地址2的值拖到相同的位置(作为第二个输入).

2) Connect the Logical Existence functoid to a Value Mapping functoid (as the first input) and drag the Address 2 value to the same (as your second input).

3)将Value Mapping Functoid连接到地址目标"节点.

3) Connect the Value Mapping Functoid to the Address Destination node.

4)接下来,您需要满足不存在的地址2.因此,向您的映射器表面添加Logical Not functoid.

4) Next, you need to cater for non-existent Address 2's. So, add a Logical Not functoid to your mapper surface.

5)将Logical Not连接到您Logical Existence.这显示为不存在".

5) Connect the Logical Not to you Logical Existence. This reads "Not Exists".

6)将Logical Not连接到另一个Value Mapping Functoid作为第一个输入.

6) Connect your Logical Not to Another Value Mapping Functoid as the First input.

7)将地址1的值连接到Value Mapping函数,作为您的第二个输入.

7) Connect your Address 1 value to the Value Mapping functoid as your second input.

8)将第二个Value Mapping连接到地址目标.

8) Connect the Second Value Mapping to the Address Destination.

因此,您应该具有到目标节点的两个连接,但是只有一个路径为true,从而导致一个映射.

So, you should have two connections to the destination node but only one path with be true, resulting in one mapping.

希望这会为您提供有关如何实现此目标的指南.大声喊叫,如果您需要更多帮助!

Hope this gives you a guide on how to approach this. Shout if you need more help!

这是帮助您的插图!

TJ