Fault Handling with periodic notification and infinite retry.

Hi all,
I am invoking a database adapter to call a PL/SQL procedure and during maintenance window the database could be down for upto 4 hours. My requirement is to keep re-trying until the server comes back up but notify someone after every 4 hours.
The result I am getting is really weird. It re-retires to connect to the database two times and then calls the Java class, which sends me exactly 25 e-mails every time and then it finishes. No error in the OPMN log after it finishes.
Please look at the code below.
Thanks in advance!
Shaf
My fault Condition:
<faultName xmlns:bpelx = "http://schemas.oracle.com/bpel/extension" name = "bpelx:remoteFault">
<condition>
<action ref = "ora-retry"/>
</condition>
</faultName>
The retry action:
<Action id = "ora-retry">
<retry>
<retryCount>2</retryCount>
<retryInterval>2</retryInterval>
<retryFailureAction ref = "send-notification-apps"/>
     </retry>
</Action>
The Java Action:
<Action id = "send-notification-apps">
<javaAction className = "com.utility.SendMail" defaultAction = "ora-terminate" propertySet = "send-notification-properties">
<returnValue value = "RETRY" ref = "ora-retry"/>
</javaAction>
</Action>
Here is the BPEL handleBPELFault method:
public String handleBPELFault(IFaultRecoveryContext iFaultRecoveryContext)
Map propMap = iFaultRecoveryContext.getProperties();
String returnVal = null;
this.counter++;
System.out.println("The counter value is " + counter);
if (propMap != null)
setFrom(getParameterValue((ArrayList) propMap.get("email_sender")));
setTo(getParameterValue((ArrayList) propMap.get("email_recipient")));
setSubject(getParameterValue((ArrayList) propMap.get("subject")) + iFaultRecoveryContext.getTitle());
this.setRetryFlag(getParameterValue((ArrayList) propMap.get("retryFlag")));
if (this.getRetryFlag() != null)
if (this.getRetryFlag().equalsIgnoreCase("true"))
returnVal = "RETRY";
StringBuilder sb = new StringBuilder();
sb.append("RETRY!!!!!!!!!");
sb.append("This is the title: " + iFaultRecoveryContext.getTitle() + " was successfully retried.\n");
sb.append("This is getMessage : " + iFaultRecoveryContext.getFault().getMessage() + " was successfully retried.\n");
sb.append("This the process Name : " + iFaultRecoveryContext.getProcessId().getProcessId());
setText(sb.toString());
else
returnVal = "RETHROW";
StringBuilder sb = new StringBuilder();
sb.append("RETHROW!!!!!!!!!");
sb.append("This is the title: " + iFaultRecoveryContext.getTitle() + " was successfully retried.\n");
sb.append("This is getMessage : " + iFaultRecoveryContext.getFault().getMessage() + " was successfully retried.\n");
sb.append("This the process Name : " + iFaultRecoveryContext.getProcessId().getProcessId());
setText(sb.toString());
setHost(getParameterValue((ArrayList) propMap.get("host")));
setPort(getParameterValue((ArrayList) propMap.get("port")));
this.setProps(convertMapToProperties(propMap));
send(); //Send the email
System.out.println("PROPERTIES: " + props);
System.out.println("THERETRY FLAG " + this.getRetryFlag());
System.out.println("This actually gets out!!" + returnVal);
return returnVal;
Edited by: ShafBari on Oct 2, 2009 1:21 PM

Any help ?

Similar Messages

  • HT201412 The Ipad came up with a notification, and can't get out of it. It's saying: Ipad not backed up. This Ipad hasn't been backed up.Backups happen when this Ipad is plugged in,locked, and connected to Wi-fi. When  I press OK it can't continue. Please

    The Ipad came up with a notification, and can't get out of it. It's saying: Ipad not backed up. This Ipad hasn't been backed up.Backups happen when this Ipad is plugged in,locked, and connected to Wi-fi. When  I press OK it can't continue. Please REPLY

    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Data Migration of Contracts with periodic billing and revenue recognition

    Hello Experts,
    I am trying to develop a legacy data migration plan for Contracts with periodic billing plan and revenue recognition.
    Example of the scenario is given below:
    Customer signed a contract for one year starting 01/01/2009.
    Customer is billed quartely, billed in advance.
    SAP going live on 04/01/2009
    Customer is billed for 3 months and also for initial set up fees.
    Revenue recognition is done monthly.
    We have to migrate this contract to SAP.
    Billing document posting may be necessay as it affects revenue recognition which spans across the total contract period.
    Any ideas how to do this?
    Thanks  A Lot
    Anil
    Edited by: Anil  Jose on Sep 17, 2008 9:38 PM

    Hi Anil
    How did you manage this? We also had the same problem in one of our contracts and what we did was that we copied the contracts from the legacy with the full value. That is suppose SAP went live on 1st April, 2009 and the contract was created on 1st January 2009 for a value of suppose 100 USD, with the first billing being done on 1st Jan for 33.33 USD for 4 months. We first created the contract with a validity from 1st Jan 2009 in the new system. We billed it with a billing type that we created that did not actually create new accounting entries as the accounting entries had already been created in the legacy system. In the new system then we recognised the revenue till the go live, so that the actual value remaining of the contract reduced. Then we started the billing plan of the contract from 1st of April 2009 for the remaining amount. So next invoice was created on 1st april for 33.33 USD. Can you share your solution.
    Regards
    Indranill

  • Displaying the Report with Period, Qtr and Year in a side by side view

    We have a requirement on which user wants to see report data with respect to week, Period, Quarter and Half Yearly views side by side in the same report on selecting a Period in the Prompt.
    Dividing this to multiple reports for Week, Period,Qtr and Half year is not a Solution as Customer is not ok.
    Project is using OBIEE 10.1.3.4.1 as a reporting tool.
    Regards
    Subhadipta Samantray

    Hi,
    if you are looking for the below format
    week|factvalue|month|factvalue|quarter|factvalue|year|factvalue with one prompt
    then revert back. Else revert back with the proper format required.
    Regards
    MuRam.

  • Reminders have issues with push notifications and notification center

    For a while now, I've been having the following issue on my iPhone:  I create a reminder, set it to "remind me on a day", and choose a specific time.  No trouble syncing with iCloud across devices.  I have the reminder notifications set on "Alerts", which should require me to acknowledge the reminder before doing anything else, and I have "Show in Notification Center" enabled.
    When the time comes, I do hear the sound, and the reminder appears on my lock screen.  However, after it goes away in a few seconds (like it should if I do nothing), and then I pick up the phone later to unlock and use it, the reminder alert is no longer there.  Furthermore, the reminder does not appear in my Notification Center.
    Here's an example scenario that will hopefully illustrate this problem:  I set a reminder, then go on about my work day.  Later, I'm in a meeting when the reminder goes off, and I don't immediately check my phone.  10 minutes later when the meeting breaks, I check the phone and see nothing.  Prior to this issue happening, I used to have to acknowledge the reminder alert before doing anything else with the phone.  This is causing me to miss important reminders, and it used to work brilliantly!
    Can anyone help?  I really need this level of harassment from the Reminders app!

    Here is what you can try.  First go to Settings/Notifications and locate the App in question and select. Then be sure Allow Notifications is on and that you have selected either Banner or Alerts for Alert Style. 
    If you have already tried that the best thing to do is to Delete the App for at least 24hrs then reinstall. 
    What this will do is give you the pop up on first log in asking to Allow Push Notifications. Selecting Yes will authenticate device token and store to server and you should be good to go. 
    Don't want to wait 24hrs?  Follow these steps. 
    Delete App
    Power off device
    Turn device back on and go to Settings/General/Date and Time
    Turn off Set Automatically then set time at least 24hrs ahead. 
    Turn device off then back on
    Open App Store and download the App
    Owen the App and sign in and Accept Push Notifications
    Once you get the Pop Up and accept you can now go back to Settings/General/Date and Time and turn Set Automatically back on
    Turn device Off then back On and your good to go.

  • Optimizer with both finite and infinite capacity

    Hi all,
    we're using the SNP optimizer for our mid-term planning.
    We have different kind of production resources :
    For finished goods we want to limit capacity during optimization run.
    For intermediate products we just want to calculate the needed capacity but we do not want to limit it during optimization run.
    So I check production capacity in optimizer profile, I check "finite capacity" in resource master for finished goods and uncheck in in resource master for intermediate products.
    Still the optimizer is considering intermediate product resource capacity as a constraint.
    Do you know how to achieve this requirement?
    Thanks
    Nicolas

    Hi Nicolas,
    by default all resources are considered finite in SNP Optimization.
    you will need to enhance SNP Optimizer BADI to influence input log.
    in Table ET_RESFAM, remove finite cap check for the reosurce you want to plan infinitely.
    Another soltuon could be, in resource master maintain bucket capacity like 1000 hrs per day or may be more.
    Let me know if you need more details.
    Vipu

  • Fault handler BPEL PM Weblogic issue ?

    Products:
    SOA for WebLogic Server (10.1.3.4) , p7490612_101340_GENERIC
    Jdeveloper 10.1.3.4
    Windows XP sp2
    1.- I was install SOA for WSL 9.2 and Jdev succesfull, now i start with any test.
    2.- I test Fault handling framework , then i create the simple xml files: fault-bindings.xml and fault-policies\mybpiPolicy.xml
    ----- Abstract files
    &lt;faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault"&gt;
    &lt;condition&gt;
    &lt;action ref="ora-retry"/&gt;
    &lt;/condition&gt;
    &lt;/faultName&gt;
    &lt;Action id="ora-retry"&gt;
    &lt;retry&gt;
    &lt;retryCount&gt;2&lt;/retryCount&gt;
    &lt;retryInterval&gt;6&lt;/retryInterval&gt;     
    &lt;exponentialBackoff/&gt;
    &lt;retryFailureAction ref="ora-human-intervention"/&gt;           
    &lt;/retry&gt;
    &lt;/Action&gt;
    3.- Then i create an simple async BPEL case for fault handling with a DB BPEL Adapter using a wrong Jdbc string for instance Bad SID database (deliberately , The correct is XE not XE1).
    Then i test it, and with audit trail in BPEL Console, i can view the 2 retries that i indicate in the descriptor, but after [FAULT RECOVERY|http://forums.oracle.com/forums/] Marked Invoke activity as "pending manual recovery, it have a exception.
    * In normal case with OC4J, after last line, the process is ready for recovery in a manual step.
    * Well i think so maybe i missing another configuration or parameter because it is deploy in WebLogic, i do not. next i put the text that in audit trail appers.
    Please help, regards.
    ----- my Messages in audit trail.
    --2008/12/30 21:28:29-- [FAULT RECOVERY|http://forums.oracle.com/forums/] Marked Invoke activity as "pending manual recovery".
    --2008/12/30 21:28:30-- "BPELFault" has not been caught by a catch block.
    --2008/12/30 21:28:30-- There is a system exception while performing the BPEL instance, the reason is "faultName: {{[http://schemas.oracle.com/bpel/extension]}remoteFault} messageType: {{[http://schemas.oracle.com/bpel/extension]}RuntimeFaultMessage} parts: {{code=0 ,summary=file:/D:/oracle/soasuitebasic/bpel/domains/default/tmp/.bpel_Test1BPEL_1.0_7f0af90c7bf1874b5077831987befd2d.tmp/do.wsdl [ do_ptt::doSelect(doSelect_inparameters,DomainCollection) |http://forums.oracle.com/forums/] - WSIF JCA Execute of operation 'doSelect' failed due to: Could not create/access the TopLink Session. This session is used to connect to the datastore. [Caused by: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:XE1 |http://forums.oracle.com/forums/] ; nested exception is: ORABPEL-11622 Could not create/access the TopLink Session. This session is used to connect to the datastore. [Caused by: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:XE1 |http://forums.oracle.com/forums/] See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. weblogic-ra.xml) and restart the server. Caused by Exception [TOPLINK-4002|http://forums.oracle.com/forums/] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:XE1 Error Code: 0. ,detail= Internal Exception: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:XE1 Error Code: 0}} ". Please check the error log file for more infromation. A failure is detected in use of fault policy used to recover the activity. Please audit the instance manually or let engine recovery to attempt recovery. Best practice suggests to handle exceptions in fault policy or in the fault handlers in your bpel process. less
    com.oracle.bpel.client.BPELFault: faultName: {{[http://schemas.oracle.com/bpel/extension]}remoteFault}
    messageType: {{[http://schemas.oracle.com/bpel/extension]}RuntimeFaultMessage}
    parts: {{code=0
    ,summary=file:/D:/oracle/soasuitebasic/bpel/domains/default/tmp/.bpel_Test1BPEL_1.0_7f0af90c7bf1874b5077831987befd2d.tmp/do.wsdl [ do_ptt::doSelect(doSelect_inparameters,DomainCollection) |http://forums.oracle.com/forums/] - WSIF JCA Execute of operation 'doSelect' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore. [Caused by: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:XE1
    ; nested exception is:
    ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore. [Caused by: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:XE1
    See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. weblogic-ra.xml) and restart the server. Caused by Exception [TOPLINK-4002|http://forums.oracle.com/forums/] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:XE1
    Error Code: 0.
    ,detail=
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:XE1
    Error Code: 0
    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:623)
    at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:437)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:251)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:826)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:402)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.expire(BPELInvokeWMP.java:151)
    at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:4161)
    at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2073)
    at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:174)
    at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
    at com.collaxa.cube.ejb.impl.ActivityManagerBean_lcloe8_ELOImpl.expireActivity(ActivityManagerBean_lcloe8_ELOImpl.java:542)
    at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:140)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:58)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    -----

    The fault management framework catches all faults (business and runtime) for an invoke activity only.
    For all other activities use the BPEL fault handler.

  • Fault handling in DIServer Interact

    Good Day Mentors,
    I'm currently testing out how the DIServer works.
    Now, I am testing Fault handling with the DI Server,
    and would want to know if there is a way to get multiple Errors from an DI Server Interact call.
    My test scenario was adding 2 Sales Orders into SAP via DI Server using the Interact Call(Not BatchInteract).
    The actual SOAP call sent , with comments, is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Header>
      <SessionID>5659CCC6-2E15-4664-BFA2-4E6A3BDD3E35</SessionID>
      </env:Header>
    <env:Body>
    <dis:Add xmlns:dis="http://www.sap.com/SBO/DIS">
      <Service>OrdersService</Service>
    <Document>
      <DocType>dDocument_Items</DocType>
      <DocDate>2014-05-09</DocDate>
      <DocDueDate>2014-05-10</DocDueDate>
      <CardCode>C23900</CardCode>
      <Comments>DI Server Test - ADD</Comments>
    <DocumentLines>
    <DocumentLine>
      <ItemCode>A00003</ItemCode>
      <Quantity>2</Quantity>
      </DocumentLine>
    <DocumentLine>
      <ItemCode>TESTITTEM02</ItemCode> <!-- This Item Code Does not Exist in OEC Computer-->
      <Quantity>2</Quantity>
      </DocumentLine>
      </DocumentLines>
      </Document>
      </dis:Add>
    <dis:Add xmlns:dis="http://www.sap.com/SBO/DIS">
      <Service>OrdersService</Service>
    <Document>
      <DocType>dDocument_Service</DocType>
      <DocDate>2014-05-09</DocDate>
      <DocDueDate>2014-05-10</DocDueDate>
      <CardCode>C20000</CardCode>
      <Comments>DI Server Test - ADD</Comments>
    <DocumentLines>
    <DocumentLine>
      <ItemDescription>Printer Servicing</ItemDescription>
      <AccountCode>499999</AccountCode> <!-- This Account Code Does not Exist in OEC Computer-->
      </DocumentLine>
      </DocumentLines>
      </Document>
      </dis:Add>
      </env:Body>
      </env:Envelope>
    I commented the parts that should throw errors, which are the non existent ItemCode and AccountCode in 2 separate Sales Orders.
    I was hoping to get a Fault Response from the DIServer which tells me that there are two error from 2 different Documents.
    Basically, 2 separate error messages for the 1st Sales order(non existent Item Code) and 2nd Sales Order (Non Existent Account Code).
    But the Fault Response I got from the DIServer was this:
    <?xml version="1.0" ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body>
    <env:Fault>
    <env:Code>
      <env:Value>env:Receiver</env:Value>
    <env:Subcode>
      <env:Value>-1</env:Value>
      </env:Subcode>
      </env:Code>
    <env:Reason>
      <env:Text xml:lang="en">Error in SOAP command 'Add'</env:Text>
      </env:Reason>
    <env:Detail>
      <Command>Add</Command>
      <SessionID>5659CCC6-2E15-4664-BFA2-4E6A3BDD3E35</SessionID>
      </env:Detail>
      </env:Fault>
      </env:Body>
      </env:Envelope>
    The fault response only tells me that there is an error, but nothing specific to the documents. Just something specific to the actual SOAP call.
    If I something is not clear, please do clarify with me.
    I'm using SAP B1 9.0 PL05.
    Thanks in advance!
    Sean

    Hi Sean,
    I don't think there is such a feature available. This is standard behaviour in SBO - same for UI and DI API. The first problem/error found will abort the action and message is shown and in this case it is one action ( interact).
    regards,
    Maik

  • Fault handler triggered for "100 Continue" messages from web service

    I'm using the Flex/Flash "WebService" class to connect to a .NET4 web service.
    Things always work fine unless the service sends a "100 Continue" message,
    (which it does seemingly at random, which is allowed by HTTP1.1).
    The problem is that Flex/Flash does not appear to handle this message.
    It triggers the fault handler with the following message:
    "SOAP Response cannot be decoded".
    The message body pulled from the Flash Builder's "Network Monitor" window (raw view) is:
    HTTP/1.1 100 Continue
    Server: ASP.NET Development Server/10.0.0.0
    Date: Tue, 21 Aug 2012 14:42:25 GMT
    Content-Length: 0
    If I understand correctly, any client using HTTP 1.1 should be able to handle "100 Continue" messages even if they didn't ask for them.
    Does anyone know what's going on here?
    Here are the software versions of everything involved:
    Flash plugin: 11.3.300.257 (ActiveX)
    Flash Builder: 4.6
    Flex Compiler SDK: 4.6.0
    OS: WinXP Pro, 32-bit, SP3
    Browser: IE 8.0.6001
    Web Service: .NET framework 4
    Any help/advice is greatly appreciated!!

    Update: The problem also occurs with Firefox 12 using the debug version of FlashPlayer 11.3.300.257, so I don't think it's a browser issue... Looks like Flash itself.

  • Notifications and Badges

    I am having problems with my notifications not working for apps and if the notification works the badge isn't popping up or not popping up the right number of badges.  I just recently gotten this phone replaced and still doesn't seem to be working properly.  I play a lot of games and I do not know when people play because the notification isn't working or the badge not popping up.  Some of the apps are paid apps but I noticed that the free version notifications is working...  and some of the free version notification not working.   I have contacted the developer and they keep telling me to do the same thing over but doesn't seem to resolve the problems.  I have restored the phone back to new and doesn't seem to work.  Some of the notifications that work before I got a new replacement is not working now.  I do not know what is wrong with the notifications and badges... can anyone help me resolve the problems on how to get my notifications to properly work for my apps.  All the settings are correct.  This is on a 4S 64 GB phone.  I use a windows XP laptop for iTunes.  Could there be a glitch in my iTunes or is this phone defective as well?  Anyone else have problems with notifications?  The paid version games I play is Word with Friends, Scramble With Friends, Hanging With Friends, and Draw Something.  Matching with Friends is a free version.. notifications use to work and isn't now.  Dice with Friends doesn't pop up the correct badge.... Any suggestions and thoughts would greatly be appreciated.  Thanks.

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    It might also be a good idea to contact Square for assistance.

  • Iphone 5 randomly vibrates with no notifications in iOS 7.1

    My iPhone 5 randomly vibrates with no notifications and no sound ever since the 7.1 update. Has this happened to anyone else?

    This happens to me too. Normally when it is off, a few minutes after it turns off it randomly vibrates. I have an iPhone 5 32GB Black. 

  • Fault Policies in soa 11g with email notification

    SOA 11.1.1.3
    I want to implement faulpolicies.xml and send email notification. (for binding ,remote fault after certain retries).Can I use email activity in BPEL catch block for this , what should I add ,in my faultpolicies.xml to trigger email activity
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicy version="2.0.1" id="FaultPolicyName"
    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:bindingFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:runtimeFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry">
    <retry>
    <retryCount>8</retryCount>
    <retryInterval>2</retryInterval>
    <exponentialBackoff/>
    <retryFailureAction ref="send-notification"/>
    </retry>
    </Action>
    </Actions>
    Also, can anyone please tell which is a better option - using email activity or custom java code in fault
    policies.xml.
    Thanks

    Like Oraacler suggested, you can definitely rethrow the fault to BPEL to send the notification. However, your BPEL fault handlers will become pretty tedious when you have to check for error types in your catch block to retrieve the message and type the e-mail. On top of that, if you have multiple catch blocks in a single process or multiple processes spec'd to throw similar notifications, you will have to add a lot of redundant code. You can definitely externalize the notification to a different process that handles all e-mails, but even that does not take out having multiple invokes on the faulted process.
    Having a fault handler Java class to handle global faults allows you to externalize and standardize exception management and also dramatically minimizes BPEL code. In your Java class you also get the API's to access a lot more information then you will in BPEL allowing you to provide detailed messages. This has been my choice to account for any error that should not happen on a regular basis (binding and remote).
    The only drawback of the Java class is the development piece which can take forever since you have to restart the server after every little change. There is however a way to write a client java class for development on JDeveloper which directly connects to the weblogic-soa dehydration store to look up an instance with a fault and retrieve the fault message. You can then use that message to do your testing/development before finalizing it and moving it to the server.
    Depends on what you decide, let us know if you run into any more constraints and we can definitely try to help you.
    Thanks and good luck!

  • 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.

  • Using fault-policies with mediator and db Adapter doesn't work

    Please help! I'm stuck on this for 2 days....
    Hi Friends.
    In my project I am trying to give some treatment to an exception from a db adapter running a pl/sql procedure.
    I am forcing a raise_application_error in the procedure in order to treat the exception and I'd like the fault-police to treat it as "human-intervention".
    The db-adapter is wired to a mediator:
    jms-service ----> Mediator -----> Jca db adapter
    When I get the exception the log says:
    9d8bff56a1 due to: BINDING.JCA-12563[[
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'PersistirODS' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the FORNECEDOR.UPSERTFORNECEDOR API.
    An error occurred while preparing and executing the FORNECEDOR.UPSERTFORNECEDOR API. Cause: java.sql.SQLException: ORA-20101: Deu Merda
    ORA-06512: at "FORNECEDOR.UPSERTFORNECEDOR", line 405
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.  This exception is considered not retriable, likely due to a modelling mistake.  To classify it as retriable instead add property nonRetriableErrorCodes with value "-20101" to your deployment descriptor (i.e. weblogic-ra.xml).  To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.  All properties are integers.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    and then it looks like it's trying to run some fault-police but it says:
    [2014-04-10T20:01:39.667-03:00] [AdminServer] [WARNING] [] [oracle.integration.platform.faulthandling] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: weblogic] [ecid: 11d1def534ea1be0:-1fa77a00:145468d59e7:-8000-000000000002801a,0] [APP: soa-infra]  [RejectedMsgHandling]Unable to apply policies on the rejected message with id - 60046[[
    oracle.fabric.common.FabricException: Cannot resolve binding to a fault policy [Faulted Activity Details:
    Activity Name=null
    Activity Id=null
    Activity lineNumber=null
    Reference Name=null
    WsdlLocation=null
    ActivityType=null
    Here are my fault-policies and fault-bindings files:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicyBindings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://schemas.oracle.com/bpel/faultpolicy ../xsd/FaultBindings.xsd"
                         xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <composite faultPolicy="fault-policy"/>
    </faultPolicyBindings>
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicies xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://schemas.oracle.com/bpel/faultpolicy ../xsd/FaultPolicies.xsd"
                   xmlns="http://schemas.oracle.com/bpel/faultpolicy">
      <faultPolicy id="fault-policy">
        <Conditions>
          <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    name="medns:mediatorFault"  >
            <condition>
              <action ref="default-human-intervention"/>
            </condition>
          </faultName>
          <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:PersistirODS">
            <condition>
              <action ref="default-human-intervention"/>
            </condition>
          </faultName>
          <faultName>
            <condition>
              <action ref="default-human-intervention"/>
            </condition>
          </faultName>
        </Conditions>
        <Actions>
          <Action id="default-human-intervention">
            <humanIntervention/>
          </Action>
        </Actions>
      </faultPolicy>
    </faultPolicies>
    Again
    Please help! I'm stuck on this for 2 days....

    Could you try specifying test element inside condition like the following one
        <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:mediatorFault">
            <condition>
             <test>contains($fault.mediatorErrorCode, "AppropriateErrorCode")</test>
              <action ref="default-human-intervention"/>
            </condition>
          </faultName>

  • BPEL Fault Handling Framework, default Action to send Notification

    All,
    I'm using SOA Suite 11g R1
    Is there a way to send (email) Notification without Java coding in the BPEL Fault Handling Framework ?
    I would like to, when catching a fault in the Fault Handling Framework (remotFault/bindingFault) -> send a Notification and then HumanIntervention.
    Thanks
    Bjorn-Erik

    Hi,
    one option wud be to send it to human intervention and then rethrow the fault back to bpel....here u can define the email activity in the catch handler...try it.

Maybe you are looking for