This discussion is archived
2 Replies Latest reply: Feb 3, 2013 5:29 AM by Ramabhadra Raju RSS

Fault frame work in mediator

Ramabhadra Raju Newbie
Currently Being Moderated
Hi all,

Can any one suggest me how to invoke a java class in faultpolicies for mediator. I am using a WebService--> mediator(Parallel)--> fileAdapter. My fault policies file looks like this

______________________________________________________________________________________________________

<?xml version='1.0' encoding='UTF-8'?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="2.0.1" id="StandardFaults" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Conditions>
<faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
name="medns:mediatorFault">
<condition>
<test>contains($fault.mediatorErrorCode, "TYPE_ALL")</test>
<action ref="ora-retry"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff/>
<retryFailureAction ref="java-fault-handler"/>
<retrySuccessAction ref="ora-terminate"/>
</retry>
</Action>
<Action id="java-fault-handler">
<javaAction className="EmailGeneration.MailNotification" defaultAction="ora-replay-scope" propertySet="properties">
<returnValue value="bindingFault" ref="ora-human-intervention"/>
<returnValue value="remoteFault" ref="ora-human-intervention"/>
</javaAction>
</Action>
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
<Action id="ora-replay-scope">
<replayScope/>
</Action>
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
<Properties>
<propertySet name="properties">
<property name="from">noreply@dynamite.ca</property>
<property name="to">SOA_DEV_SUPPORT@dynamite.ca</property>
<property name="cc">tirumalaraju_saisivaramabhadraraju@mahindrasatyam.com</property>
<property name="host">EXC-01-112.dynamite.ca</property>
<property name="port">25</property>
</propertySet>
</Properties>
</faultPolicy>
</faultPolicies>

______________________________________________________________________________________________________________

My fault policies are triggered when a error is generated , but the problem is it's not invoking my custom java class , the process is going into Human intervention automatically. Is there any different procedure for mediator fault handling? please help
  • 1. Re: Fault frame work in mediator
    Anuj Dwivedi Guru
    Currently Being Moderated
    <javaAction className="EmailGeneration.MailNotification" defaultAction="ora-replay-scope" propertySet="properties">
    Make sure the class name is correct (should include package name as well) and class is loaded in the CLASSPATH. To understand that how to place the class in the CLASSPATH, please refer section "14.3 Adding Custom Classes and JAR Files" at -

    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_java.htm#CHDFFEFB

    Regards,
    Anuj
  • 2. Re: Fault frame work in mediator
    Ramabhadra Raju Newbie
    Currently Being Moderated
    Hi Anuj ,

    Thanks for the post . I have already included the class paths and it is working fine for all my Bpel processes.But in case of mediator it's not calling the class(Class is not at all called ,it's not failing with some class cast exception or class not found exception), and the process is going into Human intervention.

    Regards
    Raju

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points