WebMethods's Flowservice is a typical workflow pattern programming, so some uses are different from the code. For this reason, I have done some tests on the utilization of Flowservice.
First, recursion
Call itself in the Flowservice.
Test Result: Recursive function can be implemented, same as coding. You need to specify a bounce condition, or there will be a compilation error for the Dead loop.
Second, exit
The exit feature has three usage jumps out of the loop (equivalent to break in Java), jumps out of flow (equivalent to exit ()), jumps to the parent node (equivalent to continue).
Good use of these three functions can be a good way to control the end of the program.
Third, the realization of try-catch-finally
It is interesting to implement try-catch-finally in workflow, and it is clear to understand Try-catch-finally's design ideas and implementation principles through the graphical steps.
First of all to define a main, this main sequence exit from the property is set to success, so you can ensure that the sequence even if an error can be run into the catch program to get the exception, rather than direct error, stop running. The try and catch are sub-sequence under Main, set the exit from property to failure and done, respectively. The failure property is the default property of exit from in normal sequence, and when the sequence error occurs, it automatically stops running down and jumps directly out of the sequence. The done attribute is only used when the program above the sequence has an exception, so it is the condition that catches the exception. Finally, Finally,finally is the same as main, below main. Set into failure or success can be, depends on the situation.
This differs from Java in that Java executes a finally before the end of a try or catch is executed, while WebMethods executes finally after the end point of the Trycatch.
Interesting try "one" in WebMethods