Current Position:Home > How to use Java Action in fault policy

How to use Java Action in fault policy

Update:11-30Source: network consolidation
Hi ,
I want to execute custom java Action as fault handler in fault-policy implemntation. I have done but it is not working. I am putting code for fault-policies.xml and also java Action class.
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies xmlns=""
<faultPolicy version="0.0.1" id="FusionMidFaults"
<faultName xmlns:bpelx=""
<action ref="ora-java"/>
* <faultName>
<action ref="ora-java"/>
<Action id="ora-java">
<JavaAction ClassName="JavaPolicy.TestJavaAction"
defaultAction="ora-human-intervention" >
<ReturnValue value="ABORT" ref="ora-terminate"/>
<ReturnValue value="MANUAL" ref="ora-human-intervention"/>
</JavaAction> *
<Action id="ora-terminate">
<Action id="ora-human-intervention">
2. Java class in JavaPolicy package
package JavaPolicy;
import com.collaxa.cube.engine.fp.BPELFaultRecoveryContextImpl;
import oracle.integration.platform.faultpolicy.IFaultRecoveryContext;
import oracle.integration.platform.faultpolicy.IFaultRecoveryJavaClass;
public class TestJavaAction implements IFaultRecoveryJavaClass {
public void handleRetrySuccess(IFaultRecoveryContext ctx) {
System.out.println("This is for retry success");
public String handleFault(IFaultRecoveryContext ctx) {
System.out.println("-----Inside handleFault-----\n" +
BPELFaultRecoveryContextImpl bpelCtx =
bpelCtx.addAuditTrailEntry("hi there");
System.out.println("Policy Id" + ctx.getPolicyId());
return "MANUAL";
I have kept the java file in 'AExpPrj\src\JavaPolicy' where AExpPrj is my project Name.
Where I am doing mistake, I could not find. Is there any link including complete example of Java Action in fault policies.
Thanks & Regards
Yogendra Rishishwar

The Best Answer

A bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.
  • How to use Java Action in fault policy Update:11-30

    Hi , I want to execute custom java Action as fault handler in fault-policy implemntation. I have done but it is not working. I am putting code for fault-policies.xml and also java Action class. <?xml version="1.0" encoding="UTF-8"?&

  • BPEL 11g fault policy action java class not sending email Update:10-11

    Hi All, I am trying to attach fault policy to my bpel process. The fault conditions are working fine but the email part from the action class is not able to send email. The code execute properly , i can't see any error message in the log but I cant a

  • Soa suite 12c fault policy invokeWS action enqueue action resolveAndrecover: error in fault resolution:java.lang.NullPointerException Update:11-30

    Hi, I'm trying to use the new fault actions in Oracle SOA Suite 12c ( invokeWS and enqueue. I've done the following: fault-policies.xml <faultName name="custom:MyFault" xmlns:custom="

  • Urgent : 11g Fault Policy Java Handler Update:10-11

    Im trying to use fault policies in 11g and in fault policies want to catch the remote faults and pass it to a custom java handler. in Custom Handler use IFaultRecoveryJavaClass and also BPELFaultRecoveryContextImpl , i want to pick fault information

  • Java Fault Policy Update:11-30

    Hi, I'm trying to develop a Fault policy that has the following behavior: Retry's 3 times Call a SP to audit the error in a BD Opens a Human Interaction According to what i read from the documentation and web examples i came up with the following:   

  • Is it possible to throw another Fault from Fault Policy handler Java Class? Update:11-30

    Hi, I am using SOA Suite 11g. My requirement is to catch any Fault that occurs in BPEL in the Fault Policy java handler, and then throw back another Fault (Which i want to create from the java class hander) by setting the Fault Part and other Fault d

  • SOA BPEL 11g ( - Using encapsulated retries in fault-policy file Update:10-11

    Hi, We are using oracle SOA suite 11g ( I'm trying to configure a fault-policy file so that it first retries 20 times every 20 secs, then reties 20 times every 10 minutes, then retries 23 times every hour, then retries 24 times every 6 hou

  • BPEL Fault Management - Using Xpath in Fault Policy conditions Update:10-11

    Hi all. I have a requirement to use the xpath functions "contais" and "upper-case" inside a condition in a fault policy file. I've done some tests and didn't get successful results so far. My first test using the policy file was the fo

  • Fault Policy framework doesnt work - SOA 11g Update:10-11

    Hi All, I am trying to excute a composite in which i had a business fault and i had the swicth condition based on reply. If reply is other than success or failure i will throw a fault Invalid data and the fault is catched by teh fault handler. but th

  • Can SOA 11g fault policy handle XSD Validation errors from the Mediator? Update:10-11

    I would like all errors in my SOA process to go through the fault-policies.xml. But I don't seem to be able to catch any mediator error caused by an XSD validation failure. A sample of the sort of error I am trying to 'catch' is: Nonrecoverable Syste