Scenario:
If a fault occurs then we need to store the fault message in DB also sent the same fault to the consumer for Sync Process.
->
In BPEL whenever we call the external services and that services are not available then we get remote/binding fault.
In our scenario we are calling DB to store data suppose DB is down then in that case we can handle the error by using catch/catchAll/throw activity.
Note:
Throw
The throw activity provides one way to handle errors in a BPEL process by generating a fault.
A throw activity in a BPEL process can throw any type of fault, including standard faults,
A fault thrown by a throw activity should be caught and handled in the BPEL process.
The throw activity has three elements: its name, the name of the fault, and the fault variable
Catch
defines a set of custom fault-handling activities that execute based on an optional fault name and/or fault variable. If the fault name is missing, then the catch intercepts all faults with the same type of fault data.
CatchAll
CatchAll fault handler that executes if a thrown fault is not caught by a catch block.
Catch all is a variant of catch. It does not specify a fault name or variable to catch.
Step 1: For custome error create catch block in your block, once u define define any system error like binding/remote fault also create variable faultVar.
-> This variable will create runtime.wsdl
No comments:
Post a Comment