我可以使用 Siebel 数据映射合并集成组件吗?

Can I merge integration components using Siebel data mapping?

我有一个具有此 XML 表示的集成对象:

<root>
  <request code="123" title="Test">
    <user name="Chuck Bartowski" email="-" />
    <data d1="aaa" d2="bbb" d3="ccc" />
    <attachments>
      <attachment name="text.txt" size="50" />
      <attachment name="image.png" size="385" />
    </attachments>
  </request>
</root>

我需要将一些节点(集成组件)合并为一个,将 XML 转换成这样:

<root>
  <request code="123" title="Test" userName="Chuck Bartowski" userEmail="-"
           data1="aaa" data2="bbb" data3="ccc" />
    <attachments>
      <attachment name="text.txt" size="50" />
      <attachment name="image.png" size="385" />
    </attachments>
  </request>
</root>

我正在尝试使用 Siebel 7.8 数据映射(EAI 数据转换引擎)来实现这一点。因此,我创建了一个集成对象映射,具有以下集成组件映射:

NAME  SOURCE IC     TARGET IC
r1    request    -> request
r2    user       -> request
r3    data       -> request
att   attachment -> attachment

不幸的是,它没有达到我的预期。相反,它输出这个:

<root>
  <request code="123" title="Test">
    <attachments>...</attachments>
  </request>
  <request userName="Chuck Bartowski" userEmail="-">
    <attachments>...</attachments>
  </request>
  <request data1="aaa" data2="bbb" data3="ccc">
    <attachments>...</attachments>
  </request>
</root>

我知道可以将单个源组件映射到多个目标,但是,可以做相反的事情吗?我可以将多个源合并到一个目标中吗?

到目前为止,我已经尝试在 r2r3 中将 Parent Component Map Name 字段设置为 r1,但它只为我赢得了一个不错的 SBL- EAI-04008 错误:集成组件类型 'request' 不是组件类型 'request'.

的有效子类型

我是不是遗漏了一些配置步骤,或者仅使用数据映射引擎是不可能做到的?我是从服务器脚本调用它的,所以如果没有其他效果,我可以在映射完成后调整那里的 属性 集。

我在 Siebel bookshelf 中找到了答案。是的,它可以做到,但不是我试图做到的:

You may want to address fields in components other than the source component. This is because your target component may depend on more than one component in the source object. In such cases, you cannot use different component maps with different source components, and the same target component, because each component map creates a different instance of the target component. Data Mapping Engine expressions allow you to use the dot notation to address fields, other than the source component, in source integration object components —for example, [Component Name.Field Name].

Addressing fields in other components is legal only if the cardinality of the component is less than or equal to one relative to the source component —that is, only if the component can be uniquely identified from the context of the source component without using any qualifiers other than the component name.

因此,关键是为每个目标只创建一个组件映射,然后包括来自其他源的字段映射。在我的示例中,我会:

NAME  SOURCE IC     TARGET IC
req   request    -> request
att   attachment -> attachment

req 内,以下字段映射:

SOURCE            TARGET
[code]        ->  code
[title]       ->  title
[user.name]   ->  userName
[user.email]  ->  userEmail
[data.d1]     ->  data1
...