SEQUENCE (EXIT ON SUCCESS) Behaviour in webMethods

Dear All,

I observed something strange (may not) and would like to ask your comments or views on this!

Say I have written a flow like below:

Input: num1, num2
Output: sum, diff, multi

SEQUENCE (Exit on Success)
→ MAP (Invoke addInts as a transformer service)
→ MAP (Invoke subtractInts as a transformer service)
→ MAP (Invoke multiplyInts as a transformer service)

As per the SEQUENCE (exit on success property) it should Exit the sequence when a child step executes successfully or after all child steps fail.

From the above statement, if I pass num1=1 and num2=2 to the code I should expect only sum=2 but that is not the case I see sum, diff, multi.

And also in the code if I replace MAP with Invoke step I see only sum=2.

Is it a bug in the product or it is a expected behavior for a MAP (invoke svc as a transformer) step within sequence (exit on success). :slight_smile:

1 Like

Hi Mahesh ,

If you use a flow step instead of invoking a transformer then your condition might have been true . But here you used a MAP step which will never succeed . As per the points in documentation.

A failure in a MAP step (that is, a failure in one of the transformers) will cause
the containing SEQUENCE to exit when you set Exit on to FAILURE. However, a MAP
step that does not fail will not cause the containing SEQUENCE to exit when you set
Exit on to SUCCESS. That is, a MAP can fail but it does not “succeed.”

Thanks
Nithin

1 Like

I agree with Nithin on the above reference.

Good Question

I see this point as a NOTE. But why is it designed in this way. Is there a reason behind this. In real time how is this behavior useful.

Question goes to SAG in practical :smiley:

May be SAG knows it better :slight_smile: I hope the moderator is watching this topic!

sure thing! :smiley:

good question