REPEAT in webMethods

12 篇文章 0 订阅
1. The REPEAT step allows you to conditionally repeat a sequence of child steps based on the success or failure of those steps. You can use REPEAT to :

        Re-execute (retry) a set of steps if any step within the set fails.

        Re-execute a set of steps until one of the steps within the set fails.

2. Specifying the REPEAT Condition : Repeat on (FAILURE or SUCCESS) .

3. Specifying the REPEAT Counter :

         0 : does not re-execute children.
         Any value > 0 : re-execute children up to this number of times.

        -1 or blank : re-execute children as long as the specified Repeat on condition is true.

4. Important :

  • note that the children of a REPEAT always execute at least once. The Counter property specifies the maximum number the children will be re-executed.
5. Using REPEAT to Retry a Failed Step
  • If your flow invokes services that access external systems, you can use the REPEAT step to accommodate network errors, such as busy servers or connection errors, at run time. If you use the REPEAT step for this purpose, keep the following points in mind:

6. The following types of failures satisfy the FAILURE condition:

  • Expiration of a child step's Timeout limit
  • An exception thrown by a Java service
  • A document query that returns an un-permitted null value
  • If you specify multiple children under a REPEAT step, the failure of any one of the children will cause the entire set of children to be re-executed.
  • The REPEAT step immediately exits a set of children at the point of failure (that is, if the second child in a set of three fails, the third child is not executed).
  • When Repeat on is set to FAILURE, the failure of a child within a REPEAT step does not cause the REPEAT step itself to fail unless the Count limit is also reached.
  • The Timeout property for the REPEAT step specifies the amount of time in which the entire REPEAT step, including all of its possible iterations, must complete. When you use REPEAT to retry on failure, you may want to leave the Timeout value at 0 (no limit) or set it to a very high value. You can also set the property to the value of a pipeline variable by typing the name of the variable between % symbols.
  • As a developer, you must be thoroughly familiar with the processes you include  within a REPEAT step. Make  certain that the child steps you specify can safely be repeated in the event that a failure occurs. You don’t want to use REPEAT if there is  the possibility that a single action, such as accepting an order or crediting an account balance, could be applied twice.
7. Using REPEAT to Retry a Successful Step. Apart from using REPEAT to retry a failed step, you can also use it as a looping device to repeat.  a series of steps until a failure occurs. If you use the REPEAT step to re-execute successful child steps, keep the following points in mind:
  • The success condition is met if all children of the REPEAT step execute without returning a single exception.
  • If one child in the set fails, the REPEAT step exits at the point of failure, leaving the remaining children unexecuted.
The failure of a child does not cause the REPEAT step to fail; it merely ends the loop. (In this case, the REPEAT step itself succeeds and execution of the flow proceeds normally)

Original post: http://abushay3tech.blogspot.com/2011/09/webmethods-repeat-step.html


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值