Fault handling for Mediator component

I am trying to capture all the system and business faults of the composite and email the details to system groups. I am having issues with the fault policy file and get the following error. My Composite is made up of Web Services ---> Mediator ---->DBAdapter
INFO: FaultPoliciesParser.parsePolicies ------->Begin Parsing of policy file
<Jun 18, 2012 3:48:58 PM EST> <Error> <oracle.soa.mediator.common.error.recovery> <BEA-000000> <Failed to recover the mediator fault.
oracle.fabric.common.FabricException: Missing fault policy: TESTFaultPolicy
at oracle.integration.platform.faultpolicy.RecoverFault.resolveToActionRef(RecoverFault.java:101)
at oracle.integration.platform.faultpolicy.FaultRecoveryManagerImpl.resolveToActionRef(FaultRecoveryManagerImpl.java:151)
at oracle.tip.mediator.common.error.recovery.MediatorRecoveryHandler.resolveToActionRef(MediatorRecoveryHandler.java:158)
at oracle.tip.mediator.common.error.ErrorMessageEnqueuer.enqueue(ErrorMessageEnqueuer.java:174)
at oracle.tip.mediator.dispatch.db.DeferredDBWorker.handleError(DeferredDBWorker.java:117)
at oracle.tip.mediator.common.listener.DBWorker.process(DBWorker.java:114)
at oracle.tip.mediator.common.listener.AbstractWorker.run(AbstractWorker.java:83)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
I am attaching the following files
FAULT-POLICIES.XML*
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<faultPolicy version="2.0.1" id="TESTFaultPolicy">
<Conditions>
<faultName>
<condition>
<action ref="ora-java"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="ora-java">
<javaAction className="test.EmailFaultHandler"
defaultAction="ora-human-intervention">
</javaAction>
</Action>
</Actions>
</faultPolicy>
</faultPolicies>
FAULT-BINDINGS.XML_
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.1"
xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<composite faultPolicy="TESTFaultPolicy"/>
<component faultPolicy=" TESTFaultPolicy">
<name>HandleRealTimeRequests</name>
</component>
</faultPolicyBindings>
I am yet to figure out how to capture the fault and email to the groups in EmailFaultHandler.java file below
EmailFaultHandler.java_
package test;
import com.collaxa.cube.engine.fp.BPELFaultRecoveryContextImpl;
import java.util.Map;
import oracle.integration.platform.faultpolicy.IFaultRecoveryContext;
import oracle.integration.platform.faultpolicy.IFaultRecoveryJavaClass;
public class EmailFaultHandler implements IFaultRecoveryJavaClass {
public void handleRetrySuccess(IFaultRecoveryContext iFaultRecoveryContext) {
public String handleFault(IFaultRecoveryContext iFaultRecoveryContext) {
//Print Fault Meta Data to Console
System.out.println("****************Fault Metadata********************************");
System.out.println("Fault policy id: " + iFaultRecoveryContext.getPolicyId());
System.out.println("Fault type: " + iFaultRecoveryContext.getType());
System.out.println("Partnerlink: " + iFaultRecoveryContext.getReferenceName());
System.out.println("Port type: " + iFaultRecoveryContext.getPortType());
System.out.println("**************************************************************");
//print all properties defined in the fault-policy file
System.out.println("Properties Set for the Fault");
Map props = iFaultRecoveryContext.getProperties();
for (Object key: props.keySet())
System.out.println("Key : " + key.toString() + " Value : " + props.get(key).toString());
//Custom Code to Log Fault to File/DB/JMS or send Emails etc.
return "Manual";
Please suggest
Thanks
Edited by: user5108636 on 18/06/2012 00:20
Edited by: user5108636 on 18/06/2012 00:20

By the way, I managed to break through a little further. Now I am past this fault policy error. However, the java fault handler class is giving ClassNotFoundException. The way I added the java file (test.EmailFaultHandler) through JDeveloper in the composite project (Right click --> New ---> Java file). How do I add this to the classpath. I thought it automatically gets added to the SOA composite project classpath.
Please suggest.
INFO: FaultPoliciesParser.parsePolicies ------->Begin Parsing of policy file
<Jun 19, 2012 10:58:01 AM EST> <Warning> <oracle.soa.mediator.monitor> <BEA-000000> <Venkat:Inside Synchronized block with msg id :CCA40B60B9A911E1BF115F9190ABA14C>
<Jun 19, 2012 10:58:01 AM EST> <Warning> <oracle.soa.mediator.monitor> <BEA-000000> <Venkat:Inside Synchronized block with msg id :CCA40B60B9A911E1BF115F9190ABA14C>
<Jun 19, 2012 10:58:01 AM EST> <Warning> <oracle.soa.mediator.monitor> <BEA-000000> <Venkat:Inside Synchronized block with msg id :CCA40B60B9A911E1BF115F9190ABA14C>
<Jun 19, 2012 10:58:01 AM EST> <Error> <oracle.soa.mediator.common.listener> <BEA-000000> <Enququeing to Error hospital successful...>
<Jun 19, 2012 10:58:05 AM EST> <Error> <oracle.soa.mediator.common.error.recovery> <BEA-000000> <Error while loading "test.EmailFaultHandler" java class specified for action "ora-java".>
<Jun 19, 2012 10:58:05 AM EST> <Error> <oracle.soa.mediator.common.error.recovery> <BEA-000000> <Failed to recover the mediator fault.
java.lang.ClassNotFoundException: test.EmailFaultHandler
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
at oracle.tip.mediator.common.error.recovery.CustomJavaHandler.execute(CustomJavaHandler.java:69)
at oracle.tip.mediator.common.error.recovery.MediatorRecoverFault.recover(MediatorRecoverFault.java:73)
at oracle.tip.mediator.serviceEngine.MediatorFacadeService.recoverFault(MediatorFacadeService.java:988)
at oracle.integration.platform.faultpolicy.RecoverFault.recoverAndChain(RecoverFault.java:161)
at oracle.integration.platform.faultpolicy.RecoverFault.resolveAndRecover(RecoverFault.java:124)
at oracle.integration.platform.faultpolicy.FaultRecoveryManagerImpl.resolveAndRecover(FaultRecoveryManagerImpl.java:123)
at oracle.tip.mediator.common.error.recovery.MediatorRecoveryHandler.recover(MediatorRecoveryHandler.java:116)
at oracle.tip.mediator.common.error.ErrorDBWorker.handleMessage(ErrorDBWorker.java:37)
Thanks

Similar Messages

  • Fault Handling in Mediator

    Hi,
    We have a DBAdpater to retrieve the data and a mediator to invoke the DBAdapter. In cases like No Records we want to create a soap fault. So we implemented Mediator Java callout and overriden postRouting() to read the response message and create a soapfault.
    [ we referred to blog http://technology.amis.nl/blog/6669/soa-suite-11g-introducing-mediator-java-callouts-for-debug-audit-and]
    but when we tried creating SOAPFault and add it to the response message, while execution , the response message is being parsed and seeing the fault it is throwing the exception below:
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException:
    This is a fault.
    at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestMode
    l.java:575)
    at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:381)
    at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:298)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMetho
    dBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMet
    hodBinding(UIXComponentBase.java:1259)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand
    .java:183)
    I found that if exception from mediator is not handled, then the exception is throw as system fault as shown above.
    So we tried implementing external fault handling - by creating fault-policies.xml and fault-bindings.xml and a java callout.
    fault-bindings.xml
    <?xml version=”1.0" encoding=”UTF-8"?>
    <faultPolicyBindings version=”2.0.1" xmlns=”http://schemas.oracle.com/bpel/faultpolicy”>
    <composite faultPolicy=”SOM_ServiceFaults”/>
    </faultPolicyBindings>
    fault-policies.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies>
    <faultPolicy version="2.0.1" id="SOM_ServiceFaults">
    <Conditions>
    <faultName xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" name="env:Fault"> <!-- Qname of Business/SOAP fault -->
    <condition>
         <action ref="ora-custom"/>
    </condition>
    </faultName>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:mediatorFault">
    <condition>
    <action ref="ora-custom"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id=”ora-terminate”>
              <abort/>
         </Action>
    <Action id="ora-custom">
    <javaAction className="gm.som.FaultPolicyJavaAction" defaultAction="ora-terminate">
    <returnValue value="ora-terminate" ref="ora-terminate"/>
    </javaAction>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    But still getting the error.Appreciate any help on this.
    Thanks in Advance,
    Subhashini

    Not exactly but doing it the other way around by copying the fault msg to output variable and check flag for the response in my initial requester process then throw fault accordingly.. didnt have much time as it was holding back my other deliverables
    Thanks a lot for your time

  • Fault policies  for Mediator and BPEL

    Hi
    Can i use same fault-policies.xml for both mediator and BPEL or i need to create different fault-policies.xml

    Yes you can use the same file, just you need to mention the BPEL/Mediator name with in component tag. Like below in fault policy file.
    <component faultPolicy="FusionMidFaults">
    <name>MediatorName</name>
    <name>BPELName</name>
    </component>
    You can refer the below URL.
    https://blogs.oracle.com/ateamsoab2b/entry/fault_management_framework_by_example
    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*
    thanks,
    Vijay

  • Asynchronous Call Back Fault Handling through Mediator with Resequencer at Component Level

    Hello,
    As a part of an existing code extension we are introducing set of changes to the code to support new scenarios. The following are the composites involved in the end to end flow:
    1- Consumer_Mediator: A mediator composite with Resequencer enabled at the component level (With fault policy as human intervention in case of failure).
    2- BusinessServiceRouter_Mediator: A mediator composite - typical EBS in AIA - which routes messages to the provider components in BPEL and receive response in Synchronous pattern.
    3- BusinessServiceProvider_BPEL: A BPEL Process that is responsible for interacting with external Application and Provide return success response or throw failures to the EBS.
    Synchronous Interaction
    Typical Request Scenario is as follows:
    [Resequencer] ------------Consume------> [Consumer_Mediator] ----------Sync------> [BusinessServiceRouter_Mediator] -------------Sync---------->[BusinessServiceProvider_BPEL]
    1- First Message in the resequencer group is picked up.
    2- Mediator route the message to BusinessServiceRouter Route message and waits for the response.
    3- BusinessServiceRouter routes the message to the BusinessServiceProvider_BPEL Process and wait for response.
    4- BusinessServiceProvider_BPEL process makes successeful call to the External Application Service and is prepared to return Successful response.
    Typeical Response:
    Through a Synchronous flow, all instances are waiting for the response to commit the transaction, once the response comes back and routed back to the Consumer_Mediator one of two cases happen:
    1- Success: instance is Complete, and the next message in the resequencer group is processed.
    2- Failure: instance is marked as recovery needed and the next messages in the resequencer group are held off till the first message is recovered or aborted.
    New Requirement - Asynchronous Interaction
    A new Application Service is introduced and it can take up to 6/8 hours to process the request. Which means we need to change the interaction to Asynchronous request and Callback with the Provider long running BPEL Process that will interact with the BPEL process.
    Request in the new Code:
    [Resequencer] ------------Consume------> [Consumer_Mediator] ----------Sync------> [BusinessServiceRouter_Mediator] -------------Async--------->[BusinessServiceProvider_BPEL]
    Response in the new Code:
    1- Success: There is absolutely no issue here, it works fine and all instances are marked as complete.
    2- Failure in BusinessServiceProvider_BPEL. This is mainly the issue. When there is a failure that this BPEL process wants to throw. The following happens:
              -  BusinessServiceProvider_BPEL instance is marked as failure.
              - BusinessServiceRouter_Mediator instance is marked as failure.
              - Consumer_Mediator instance is marked as complete and the next message in the resequencer group gets processed - which is the main issue.
    Any Help or suggestion is much appreciated. Thanks.

    1. You can update the message payload when 'recovering' the faulted mediator instance for msg2 in EM console. So if it's a data issue, fix/update the data at the source, and do not trigger the service; instead, update the payload in the recovery page in EM console as needed and retry. This will be a manual activity only. I don't think there is any other easy approach/option/configuration available for this.
    2. Not sure if there is a direct option to automatically process suspended messages in a timed-out group once the missing message arrives. It needs a manual intervention where you 'Skip' to unlock the group from time-out and process further message. I think there are Resequencer APIs available that probably can be used to automate such error handling/recovery.

  • File Adapter Fault Handling for CSV files

    I have been working on a requirement where the file adapter picks up the file and gives to the BPEL for processing the data.
    In my composite, i have configured the file adapter as a service for reading files, and i defined the xsd using the native format builder....
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/ReadFile"
    targetNamespace="http://TargetNamespace.com/ReadFile"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    nxsd:version="NXSD"
    nxsd:stream="chars"
    nxsd:encoding="US-ASCII"
    nxsd:hasHeader="true"
    nxsd:headerLines="1"
    nxsd:headerLinesTerminatedBy="${eol}"
    >
    <xsd:element name="Root-Element">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Student" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="Street1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="Street2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="City" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="State" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="Country" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    If i put some test data like below , the .txt file is being picked up and the valid being passed to the BPEL and its not returning any error for the invalid records. In this case, just want to throw an error and exit the bpel.
    Krish,abcd,abcd,chennai,tnin - comma is missing here
    NP,abcd,abcd,chennai,tnin - - comma is missing here
    Nutan,abcd,abcd,chennai,tn,in - this record being processed successfully.
    Pari,abcd,abcd,chennai,tn,in - - this record being processed successfully.
    Experts, any help is really appreciated..

    Hi,
    its better to opt for seeburger for EDI data processings..
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20ed5d5b-b188-2c10-76a2-997a616e48a9
    http://www.cbs-consulting.com/EN/Services/ProcessesApplications/SAP__TechnologyConsulting/OpenPI/OpenPI__n,naviExpand=.html__nnn=true
    Check the above links can be helpful..
    HTH
    Rajesh

  • How to add fault handling for file adapter??

    Hi guys I am new to SOA technology ,I have one scenario  in file adapter  ,when file adapter reads a file from directory .If file is there   then read the file  data else it can give user defined exception that  the file is not there .How can i write user defined exception in SOA?? Give me any ideas please.............
    Thanks in advance..

    So, you want to (1) Fetch the data from these 3 type of files and (2) Also, store the payload data of the file, which is in XML format, into the same database tables ?
    If this is the requirement.. then, I would say, you could :
    (1) Read files using file adapter, but not as opaque.. Define schemas conforming to the file structures. In that way, you'll always have the file data read in the form of XML.
    (2) Fetch relevant data from such XML payloads of files and insert into database tables. Then, insert the XML payload into WHO column. You might have to convert the xml data into blob/clob before inserting.
    Job done !

  • Fault name for Rejection Messages in Fault policy.

    Hi ,
    I am trying to do my fault handling for Rejected messages .I am bit confused what is the fault name i should specify for rejection messages .
    Say for BPEL , We have bpelx:binding fault etc for BPEL ..
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:[?????????????] ">
    <condition>
    <action ref="writeToFile"/>
    </condition>
    </faultName>
    </Conditions>
    Regards ,
    Naga

    It should be the "service name" for the inbound adapter in the composite. Here is the doc link which explains this: http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10231/life_cycle.htm#TKADP187.
    regards,
    Sandeep

  • System Fault handler

    Hi,
    I am trying to catch the remoteFault and used the catch branch and used Namespace URI as http://schemas.oracle.com/bpel/extension Local Part: remoteFault and fault Variable: faultVar.
    But when assingning the faultVar is not showing its elements code, summary and details. It is weird that it is showing in some BPEL process and not showing in some BPEL process. Is something need to take care while using system fault?
    Regards,
    Sreejit

    Hi Sreejit,
    There is often a need to use an activity that does nothing. An example is when a fault must be caught and suppressed. In this case, you can use the empty activity to insert a no-op instruction into a business process. The syntax to use an empty activity is as follows:
    <empty standard-attributes>
    standard-elements
    </empty>
    If no catch or catchAll is selected, the fault is not caught by the current scope and is rethrown to the immediately enclosing scope. If the fault occurs in (or is rethrown to) the global process scope, and there is no matching fault handler for the fault at the global level, the process terminates abnormally. This is as though a terminate activity (described in "Using the Terminate Activity to Stop a Business Process Instance") had been performed.
    Consider the following example:
    <faulthandlers>
    <catch faultName="x:foo">
    <empty/>
    </catch>
    <catch faultVariable="bar">
    <empty/>
    </catch>
    <catch faultName="x:foo" faultVariable="bar">
    <empty/>
    </catch>
    <catchAll>
    <empty/>
    </catchAll>
    </faulthandlers>
    Assume that a fault named x:foo is thrown. The first catch is selected if the fault carries no fault data. If there is fault data associated with the fault, the third catch is selected if the type of the fault's data matches the type of variable bar. Otherwise, the default catchAll handler is selected. Finally, a fault with a fault variable whose type matches the type of bar and whose name is not x:foo is processed by the second catch. All other faults are processed by the default catchAll handler.
    Invoking a compensation handler that has not been installed is equivalent to using the empty activity (it is a no-op). This ensures that fault handlers do not have to rely on state to determine which nested scopes have completed successfully. The semantics of a process in which an installed compensation handler is invoked more than once are undefined.If an invoke activity has a compensation handler defined inline, then the name of the activity is the name of the scope to be used in the compensate activity. The syntax is as follows:
    <compensate scope="ncname"? standard-attributes>
    standard-elements
    </compensate>
    Hope this is much clearer and answers your question!
    Cheers
    Anirudh Pucha

  • "Message Rejection Handler" for the file/ftp adapter using fault policy

    Hi guys,
    We are trying to implement "Message Rejection Handler" for the file/ftp adapter using following fault policy configuration.
    Fault Policy:
    `````````````
    <?xml version='1.0' encoding='UTF-8'?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1" id="ProcessNameGenericPolicy"
    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:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="ora-rethrow-fault"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-rethrow-fault"/>
    </retry>
    </Action>
    <Action id="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    <faultPolicy version="2.0.1" id="ProcessNameHumanInterventionPolicy"
    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_TRANSIENT")</test>
    <action ref="ora-retry-with-intervention"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="ora-retry-with-intervention"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="ora-rethrow-fault"/>
    <!--<action ref="ora-retry-with-intervention"/>-->
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry-with-intervention">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-human-intervention"/>
    </retry>
    </Action>
    <Action id="ora-retry">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-rethrow-fault"/>
    </retry>
    </Action>
    <Action id="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    <faultPolicy version="2.0.1" id="RejectedMessages">
    <Conditions> <!-- All the fault conditions are defined here -->
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:PartnerLinkName">
    <!-- local part of fault name should be the service name-->
    <condition>
    <action ref="writeToFile"/> <!-- action to be taken, refer to Actions section for the details of the action -->
    </condition>
    </faultName>
    </Conditions>
    <Actions> <!-- All the actions are defined here -->
    <Action id="writeToFile">
    <fileAction>
    <location>Server/Loc/path</location>
    <fileName>Rejected_AJBFile_%ID%_%TIMESTAMP%.xml</fileName>
    </fileAction>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    Fault Binding:
    ``````````````
    <?xml version='1.0' encoding='UTF-8'?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="ProcessNameGenericPolicy"/>
    <service faultPolicy="RejectedMessages">
    <name>PartnerLinkName</name>
    </service>
    <reference faultPolicy="RejectedMessages">
    <name>PartnerLinkName</name>
    </reference>
    </faultPolicyBindings>
    We have SyncFileRead partner link.
    The expectation is: when the message read by SyncFileRead partner link is rejected,
    that rejected message should come to particular directory in the server.
    Could you please help us fixing this.
    TIA.

    HI..
    Have a look at this blog :
    3) Error: HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorized
    Description: The request requires user authentication
    Possible Tips:
    u2022 Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER
    u2022 If the error is in XI Adapter, then your port entry should J2EE port 5<System no>
    u2022 If the error is in Adapter Engine
    u2013then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.
    u2022 May be wrong password for user XIISUSER
    u2022 May be wrong password for user XIAFUSER
    u2013 for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message
    Http* Errors in XI
    Thanks,
    Pooja

  • Mediator Fault Handling

    Hi ,
    I am trying to handle fault in a mediator . So I have an asynchronous mediator and  a synchronous mediator. I am invoking the synchronous mediator from asynchronous mediator.
    In order to , create a fault ., m shutting down the synchronous mediator. fault-policy.xml & fault-bindings.xml are as follows.
    fault-policy.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <faultPolicy version="2.0.1" id="FaultPolicyWS"
    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-terminate"/>
          </condition>
        </faultName>
      </Conditions>
      <Actions>
          <Action id="ora-terminate">
          <abort/>
        </Action>
        <Action id="ora-human-intervention">
        <humanIntervention/>
        </Action>
      </Actions>
      </faultPolicy>
    </faultPolicies>
    fault-bindings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <component faultPolicy="FaultPolicyWS">
    <name>Mediator</name>
    </component>
    </faultPolicyBindings>
    In composite:
    <property name="oracle.composite.faultPolicyFile">fault-policies.xml</property>
    <property name="oracle.composite.faultBindingFile">fault-bindings.xml</property>
    So when I am trying to test , I ma getting a state as "Recovery Needed"  .On clicking , I get two buttons: "Abort" and "Retry" where as it should have been terminated (aborted)  automatically.
    Any one pls?

    Hi,
    fault policies are only ways you can handle faults. No provision of catch blocks in mediator. Also, mediator fault policy only works when routing rule is parallel.
    Mails cannot be sent from Mediator directly, you will need custom java code to send mails using fault policies configured.
    Thanks,
    Durga

  • How to configure Fault policy for the Mediator??

    Hi All,
    I failed to configure fault policy for the mediator on FMW 11g. Below are my configurations.
    1. I created simple ESB project: Consume message(using JMS adapter) from AQ topic: Q1 and produce to another AQ topic: Q2. In order to test the fault policy, The project will thorw an exception when produce to the AQ topic Q2 (Q2 didnt exist).
    2. Created fault-policies.xml and fault-bindings.xml files in the Composite project directory.
    But it didnt work, I didnt find any retry action in the log file. Is this the correct way to configure the fault policy? your suggestions are welcome. thanks.
    fault-policies.xml
    ======================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies>
    <faultPolicy version="2.0.1" id="CRM_ServiceFaults">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    name="medns:mediatorFault">
    <condition>
    <test>contains($fault.mediatorErrorCode, "TYPE_FATAL_MESH")</test>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>40</retryInterval>
    <exponentialBackoff/>
    <retryFailureAction ref="ora-terminate"/>
    <retrySuccessAction ref="ora-terminate"/>
    </retry>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    fault-bindings.xml
    ==========================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="CRM_ServiceFaults"/>
    </faultPolicyBindings>
    Thanks Mingzhuang

    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bp_faults.htm#SOASE9906

  • Handling Fault Messages for JDBC Receiver (Syn Inbound)

    Dear Freinds,
    Can we handle fault messages for JDBC Receiver which is synchronous.
    OB Proxy Syn  <>  IB JDBC Syn
    1. How to handle the same ? Please give some examples.
    2. Should we use Stored Procedures at Oracle side to handle the fault messages and send back as response to the Proxy Response. Will it work.
    Thanks & Regards
    K.Ramesh

    Dear Friend,
    I have 2 interfaces where Proxy is OB & JDBC is IB. In the first interface both sender and Receiver are synchronous and in the second one it is Async.
    In the first interface i have to send one field from R/3 table along with Native SQL query string to XI and the response of the SELECT query is sent back to the sender.
    Assume if no fields are selected based on the field sent then proper error message has to be sent instead of the response message.
    In the second interface i will be using UPDATE query at Asyn JDBC receiver.
    How to do this if you are having JDBC Receiver.
    I saw in many blogs where they had mentioned that we cannot handle fault messages in the Receiver JDBC.
    KIindly explain.
    Thanks
    K.Ramesh

  • Fault handling in 11g - fault-bindings.xml for a partnerLink

    I'm using 11g and I'm trying to use the fault handling framework for a specific partner link. In fault-bindings.xml I have:
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <partnerLink faultPolicy="GetDateFaultPolicy">
    <name>GetDateService</name>
    </partnerLink>
    </faultPolicyBindings>
    I have a partner link named GetDateService in the bpel that I'd like to defin a policy for, but when I try to compile, I get:
    Warning(3,58): Schema validation failed for fault-bindings.xml<Line 3, Column 58>: XML-24534: (Error) Element 'partnerLink' not expected.
    Does the framework still allow partnerlinks granularity, it says it does in the docs?
    Thanks

    Maybe I should have looked at the new schema first.... : }
    It's now reference:
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    *<reference faultPolicy="GetDateFaultPolicy">*
    <name>GetDateService</name>
    *</reference>*
    </faultPolicyBindings>
    Edited by: Brutus35 on Sep 16, 2010 10:42 AM

  • Using Fault handling framework for executing Database procedure

    We have a requirement wereby we have API to be executed on Oracle DB which would return a code saying 0 or 1.
    I meaning error.
    Now with regards to exception handling we require that we receive remote fault we retry for 3 times & if not successful have a email sent out & a human intervention.
    This can be easily taken care by having define this in Fault polciy.xml
    Another requirement is when the API fails for some reason & we get returncode as 1.Now we would like ot invoke the same policy for this type of error.Although BPEL instance is not failed.But we can throw custom fault.
    Now the APi's that we have can be called in 3 ways.
    1.In each instance we call API exactly once
    2.In each instance we call API in a loop for each record in message.Hence if 10 records are there in message & while executin 7th time it failed then how to handle reminaing records?
    3.In each instance we call API only once but submit all 10 reocrds at once.And at same time 7th record fails then whats best way to handle this?
    We realy want to use fault handling mechanism because it gives a lot of options of replay rethroew continue...but given the requirement can somebody point out a right way of using fault policy?
    Thanks

    U can archive the records in archive tables once the database adapter polls the data.
    -Ramana.

  • Fault handling policy for a process in the fault-binding.xml

    Can I specify a fault handling policy for a specific process using fault handling framework 10.1.3.3?
    <process faultPolicy="DefaultPolicy"/>
    I cannot specify the name of the process according to the xsd :(
    Can this be achieved?
    I have a two different partner links in different processes having the same name. If I add the partner link to the fault-binding.xml what would be the result?
    Note: I cannot use bpel.xml to specify the fault policies as of now.

    The fault policy bindings file does not allow you to specify a specific fault policy for an individual processes. You can only do this for all BPEL processes (eg: process Level) or at finer grained levels such as partner link levels.
    You might be able to use the partner link level for any services that call the process in which you wnat to error handle (eg: Process C needs to be error handled. Process A and B call C so for the partner link names for invoking C could have the fault policy defined for them). Therefore any faults returned from C could propagate back to process A / B and be handled within by the policy outside of Process C. Obviously if this apporach was used you would not want to use process level definitions as C would continue to use this.
    If the partner links were of the same name, they should both be handled by the fault policy that is defined withiin the Fault policy (e.g Partner Link level definitions)
    An approach that can be used is to specify the fault policy within the bpel.xml file. The information would be added as follows:
    </partnerLinkBindings>
    <!-- Start of Definition-->
    <faultPolicyBindings>
    <process faultPolicy="AProcessFaultPolicy"/>
    <partnerLink faultPolicy="APartnerLinnkPolicy">
    <name>insertSSN_dbAdapter</name>
    <name>Another_Adapter</name>
    </partnerLink>
    </faultPolicyBindings>
    <!-- End of Definition -->
    </BPELProcess>
    </BPELSuitcase>
    However, I noted you said you were unable to do this. I wasn't sure if this was for technical/governamce reasons or knowledge reasons (unsure where to place to the details.
    Hope that helps and does not confuse matters
    Dave

Maybe you are looking for

  • How to send an updated list using batch job

    Hi All,   The program displays data on the screen, if the data looks ok, then there is an option to update. When I run update, the program submits a batch job and the basic list gets updated, but my batch job is still sending the data on the screen.

  • I dropped my Iphone 4 on the cement and the back is all cracked, and the phone wont turn on either.

    I dropped my iPhone 4 on the cement and when I picked it up the back was all smashed and broke and I checked to see if the phone itself was alright, but It wont turn on anymore. I have no idea what happened

  • Access internet through abap

    how can we use abap to access internet? Is it a possibility?

  • Interrupt process and Debug loop

    Hi, What is the difference between Interrupt process and Debug Loop in the process chain if both are used to delay the a process Thanks krish

  • Question about ex println.

    Marry christmas all. prepare for a stupid question. After a look in API I see 10 PrintStream.println() all with diffrent arguments. So for example I can do . System.out.println("A simple String); System.out.println(120)And the method with the rigth a