Interesting try "one" in WebMethods

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.