Database Reference
In-Depth Information
The ora-terminate option is similar to human intervention; it's a simple realization,
and no parameters are really needed. We can also rethrow the fault or replay the scope. No
doubt, the most powerful option is ora-java , which allows you to execute any Java
class defined in the related element as shown in the following code:
javaAction className="somepackage.someClass"
Generally, all that you should do is describe an error's condition and declare the action
(reference to action) for this condition. The condition will be tested against the fault code,
part of fault message/payload, and so on. See the following examples:
$fault / *:reason/text();
$fault / ctx:errorCode/text();
ora:getFaultAsString();
$fault.payload
$fault.code
The list is not complete; you have great freedom when it comes to selecting error sources
in addition to the standard $fault . Conditions/faults can be (and actually shall be)
grouped into Business, Technical, and so on, with the desired level of details. For in-
stance, refer to the following bullet list:
• The $fault.code="WSDLReadingError" error is purely a technical error,
but it is in fact related to the remote API availability, that is, the error is related to
service edges on North/South. When $fault.code="3220" , it indicates the
standard ORA-03220 code, which is a problem related to the data quality (we got
NULL instead of something meaningful). Necessary automated actions can be
clearly defined for these situations.
• A fault (raised by your application) that is displayed with
$fault.payload="Client with bad credit history" is a busi-
ness fault (not really a fault, but the condition is still critical). Although the
temptation to put this kind of fault on the ora-human-intervention resol-
ution is high, it is better if you devise an automated solution; it's not that hard.
The last step is to associate all policies with the SOA composite application or individual
component (BPEL or Mediator as in the Policy-based handling section) using fault bind-
ing. It would be either <composite faultPolicy=…> or <component
faultPolicy=…> , where you list all your individual policies, associated with the com-
ponent/composite name.
Search WWH ::




Custom Search