Hi
Im using sequence flow step to catch exceptions .Is there any other way to catch exceptions?
sequences are the way to handle exceptions in flow services, if you write java services you they can have their own exception handeling using try/catch.
A try/catch block can be executed by having the following ‘SEQUENCE’ structure:
->SEQUENCE A (Exit on Success)
->SEQUENCE B (Exit on Failure)
[INDENT]-> code to be enclosed in Try block [/INDENT]
->SEQUENCE C (Exit on Done)
[INDENT]-> exception handling[/INDENT]
Each SEQUENCE contains a block of code.
Here Seq B behaves as a Try block, Seq C as a catch block, and Seq A encloses the composite try/catch block.
FYI, the service pub.flow:getLastError can be used in your catch block to fetch the exception.
Hi
I have to know is there any another way to handle exception with out using sequence flow step.
!!why dont you use java/c to catch the exceptions???
I dont know java.how can i write java services?
Now two things.
- learn java
- read the webMethods user guides and documents
There is at least one alternative for catching and handling errors:
- Write a process calling your services
- Use either a standard error step for all errors or transitions with error condition to handle errors from signle steps in a specific way.
However imho this makes only sense if you plan to use processes anyway.
What is the concern/issue with using the typical SEQUENCE structure?
The other special way is BPM, if you set the Error Step in BPM process, then IS process engine will catch the exception.