为什么我们使用tibco mapper活动? [英] why do we use tibco mapper activity?

查看:121
本文介绍了为什么我们使用tibco mapper活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tibco文档说

Mapper活动将新的流程变量添加到流程定义中.此变量可以是简单的数据类型,TIBCO ActiveEnterprise架构,XML架构或复杂的结构.

所以我的问题是,tibco mapper只做这个简单的功能.我们也可以在流程定义中创建流程变量(通过右键单击流程定义).我也曾在youtube上尝试过,而且也只有一个视频,并且视频解释不清晰.我正在寻找一个示例,以了解如何在大型组织中使用它,以及一个实时示例.在此先感谢

so my question is tibco mapper does only this simple function.We can create process variables in process definition also(by right clicking on process definition).I looked for it in google but no body clearly explains why to use this activity and I have also tried in youtube and there also only one video and it does not explain clearly.I am looking for an example how it is used in large organizations and a real time example.Thanks in advance

推荐答案

我猜术语过程变量"有点重载:

The term "process variable" is a bit overloaded I guess:

您在流程"属性中定义的流程变量是有状态的.您可以在过程中的任何地方使用(读取)它们的值,并且可以在过程中使用Assign任务(带有黑色等号的黄色菱形)更改它们的值.

The process variables that you define in the Process properties are stateful. You can use (read) their values anywhere in the process and you can change their values during the process using the Assign task (yellow diamond with a black equals sign).

mapper活动会生成该任务的新输出变量,您只能在其下游的活动中使用(读取)该变量.映射器活动之后,您无法更改其值,就像其他活动的输出一样.

The mapper activity produces a new output variable of that task that you can only use (read) in activities that are downstream from it. You cannot change its value after the mapper activity, as for any other activity's output.

映射器活动主要用于在其中而不是其他活动的映射器中执行复杂且可重用的数据映射.例如,您有一个过程,该过程必须将其输入数据映射到其他数据结构中,然后都必须通过JMS消息将其发送并记录到文件中.映射器允许您仅执行一次映射,而不是执行两次映射(在发送JMS"和写入文件"活动中都是如此).

The mapper activity is mainly useful to perform complex and reusable data mappings in it rather than in the mappers of other activities. For example, you have a process that has to map its input data into a different data structure and then has to both send this via a JMS message and log it to a file. The mapper allows you to perform the mapping only once rather than doing it twice (both in the Send JMS and Write to File activity).

您会发现,在现实世界的项目中,映射程序活动通常用于独立于其他活动执行数据映射,它只是为流程提供了更好的结构.相比之下,在过程"属性中定义的过程变量"以及分配"任务的使用频率要低得多.

You'll find that in real world projects, the mapper activity is quite often used to perform data mapping independently of other activities, it just gives a nicer structure to the processes. In contrast the Process Variables defined in the Process properties together with the Assign task are used much less frequently.

这是一个非常简单的示例,在该示例中,您一次使用mapper活动设置一个过程变量(此处为文件名),然后在随后的两个不同活动(创建CSV文件和写入文件)中使用它.显然,如果映射不像这里那么琐碎,则mapper活动变得更加有趣(尽管即使在这个简单的示例中,您也只能在一个位置更改文件名的生成方式,而不是在两个位置):

Here's a very simple example, where you use the mapper activity once to set a process variable (here the filename) and then use it in two different following activities (create CSV File and Write File). Obviously, the mapper activity becomes more interesting if the mapping is not as trivial as here (though even in this simple example, you only have one place to change how the filename is generated rather than two):

映射器活动

在创建文件"中首次使用文件名变量

在写入文件中第二次使用文件名变量

这篇关于为什么我们使用tibco mapper活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆