SoftwareAG webMethods EDI映射问题:如何将一个记录映射到多个记录

时间:2020-09-18 02:09:25

标签: mapping edi webmethods

我正在尝试使用webMethods Designer流服务将一个记录映射到多个记录。 1行转换为几行。 请帮助我连接Webethods Flow服务以使用LOOP,REPEAT,MAP等映射以下内容。

SourceRecord
DateFields TargetRecord
DT(记录启动器)(1 .. 1)DTM(记录启动器)(1 ..很多次) 订单日期DTM_01 销售日期DTM_02 ExpireDate

Sample Input data ( element delimiter "," and segment terminator newline)

DT,20200914,20200916,20230913   <-- where DT is record initiator "," is element separator 
                                    and orderDate = 20200914
                                        SalesDate = 20200916
                                        ExpireDate = 20230913

Desired Output Data ( multiple rows)  ( DTM is record initiator element delimiter "*" and segment terminator newline)
DTM*002*20200914   <-- 002 is qualifier for OrderDate
DTM*007*20200916   <-- 007 is the qualifier for SalesDate
DTM*036*20230913   <-- 036 is the qulifier for ExpireDate

1 个答案:

答案 0 :(得分:0)

没有足够的信息。您是否有一个字符串包含一个输入数据记录?您有字符串列表还是文档列表?记录最有可能来自平面文件吗? 输出是字符串列表还是文档列表?

无论如何,对您的问题(假设有一条记录)的简单解决方案是对输入字符串进行标记化(使用pub.string:tokenize),并使用将其与预设限定词连接的索引将其映射到输出对象:

enter image description here enter image description here

现在,您可以使用pub.string:makeString从字符串列表中构建字符串,并使用新行作为分隔符(注意,光标位于第二行): enter image description here

相关问题