webMethods遍历文档列表 [英] webMethods loop over Document list

查看:131
本文介绍了webMethods遍历文档列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个流服务,并在其中插入了另一个流,该流具有文档列表作为输出,并包含5个字符串字段. 问题是我无法遍历该文档列表,无论我放置在Input数组(getPropertyOutput,getPropertyOutput [0])中的任何内容都将被忽略(在调试模式下,它只是跳过循环步骤).序列步骤也发生了同样的事情...

I am creating a flow service, and inside it, I inserted another flow, which has document list as output and contains 5 string fields. Problem is that I can't loop over that document list, whatever I put in Input array (getPropertyOutput, getPropertyOutput[0]) is ignored (in debug mode, it just skips the loop step). Same happening with the sequence step...

任何帮助将不胜感激

推荐答案

假设我要遍历具有简单流服务的字符串列表:

Let say I want to loop over list of Strings I have simple flow service:

第一步(MAP),我创建了列表...

In first step (MAP) I created the list...

第二步,有LOOP重要属性:

Input array: /list

但这是技巧,请注意MAP步骤中的图标-有字符串列表,但是在debugLog步骤的管道中,有list变量为 String -它是列表中的当前String变量(我同意,这是SAG的非常不好的做法).

But here is the trick, notice the icon in MAP step - there is String list, but in pipeline for debugLog step, there is list variable as String - it is the current String variable from list (I agree, very bad practice of SAG).

与文档列表一样,......

With Document list it will be very the same...

我建议将remap作为循环的第一步,例如:

I'd recommend to the the remap as first step in loop, for example:

警告:

LOOP是一种非常非常缓慢的构造,因此完全不应该使用它.另一种选择是使用Java进行循环(是的,再丑陋,但是LOOP的性能或早或晚都会使您陷入困境).

LOOP is a very very slow construct in flow, so one shouldn't be using this at all. Alternative is to use Java for looping (yes, ugly again, but LOOP performance will kick you to a butt, sooner or later).

这篇关于webMethods遍历文档列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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