Registering External Fault Policy(s) with a Composite in SOA 11g

Hi
I was wondering whether it is possible to register more than one external fault policy with a composite. I have loaded some fault policies into my database backed MDS store. I have added a fault-bindings.xml file locally to teh composite to indicate which components I want to use which policy. this file resembles:
<composite faultPolicy="bpelSynchronousProcessingFaults"/>
<component faultPolicy="mediatorSynchronousProcessingFaults">
<name>MediatorRouting</name>
</component>
I have also added to the composite.xml file the respective imports / properties to identify the location of the fault policy files and the fault bindings. These resemble:
</service>
<property name="oracle.composite.faultPolicyFile">oramds:/apps/fault-policies/fault-policies-med-sync.xml</property>
<property name="oracle.composite.faultPolicyFile">oramds:/apps/fault-policies/fault-policies-bpel-sync.xml</property>
<property name="oracle.composite.faultBindingFile">fault-bindings.xml</property>
<component name="MediatorRouting">
For a test I have the BPEL component using one and the mediator component using another, both within the same composite. Depending on the order of the 2 properties shown above, only one is registered. This being the second one.
Is it possible to register more than one policy in this way? I have been unable to get both working at the same time. Each works independently if I only register one of them. I want keep the fault policies external to the composites to allow them to be re-used appropriately across composites within an SOA project
My thinking is, in order to be able to have differing policies effecting different components within a composite i'd have thought it would have been possible to define more than one external policy for a composite. However it appears this is not the case as it only registers or atleast works with the last policy in an import. Also placing the files locally within the composite with differing names has no impact.
Therefore i'm assuming (unless I have configured these incoorectly) there is no option to have multiple fault policies for a composite. Therefore there is no ability to define a different policy per component within a composite
Kind Regards
Dave

Using the fault binding attach your fault policy to particular component. See example below.Use the tag  <component faultPolicy="ServiceFaults">
<?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="ServiceFaults">
  <name>Component1</name>
  <name>Component2</name>
  </component>
  <!-- Below listed component names use polic CRM_SeriveFaults -->
  <component faultPolicy="CRM_ServiceFaults">
  <name>HelloWorld</name>
  <name>ShippingComponent</name>
  <name>AnotherComponent"</name>
  </component>
  <!-- Below listed reference names and port types use polic CRM_ServiceFaults
-->
  <reference faultPolicy="CRM_ServiceFaults">
  <name>creditRatingService</name>
  <name>anotherReference</name>
  <portType
xmlns:credit="http://services.otn.com">credit:CreditRatingService</portType>
  <portType
xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/insert/">db:insert_
plt</portType>
  </reference>
  <reference faultPolicy="test1">
  <name>CreditRating3</name>
  </reference>
</faultPolicyBindings>

Similar Messages

  • Scheduling multiple composites in SOA 11g

    Hi,
    I have scheduled a composite in soa 11g using this link.
    http://www.oracle.com/technetwork/middleware/soasuite/learnmore/soascheduler-186798.pdf
    Now i want an another composite also to be scheduled in the similar fashion. so I would like to use the same web service component i used for ther first one.
    Can I do this ? If not, what is the other option I can do.
    Thanks and Regards,
    Kaavya

    Hi,
    Below link has the solutions. I got the same problem and it worked for me.
    http://ariklalo.com/2013/08/04/wsm-02557-error-when-trying-to-run-a-deployed-process/
    Thanks,

  • Unable to test the Deployed composites in soa 11g server

    Hi,
    I created a simple Hello World BPEL process,
    I am able to compile and deploy in the weblogic soa server,
    But when i want to test this application in em console i am getting following error :
    PolicySet Invalid: WSM-02557 oracle.wsm.policymanager.accessor.BeanAccessor The documents required to configure the Oracle Web Services Manager runtime have not been retrieved from the Policy Manager application (wsm-pm), possibly because the application is not running or has not been deployed in the environment. The query "&(policysets:global/%)(@appliesTo~="SCA-Component()")" is queued for later retrieval
    please suggest me some solution to come out of this.

    Hi,
    Below link has the solutions. I got the same problem and it worked for me.
    http://ariklalo.com/2013/08/04/wsm-02557-error-when-trying-to-run-a-deployed-process/
    Thanks,

  • Fault Namespace is empty after migrated to SOA 11g

    Details:
    Java/EJB WSIF call is not working in Weblogic 11g for fault scenarios. The namespace is empty("") in weblogic 11g but namespace is coming correctly in Oracle OC4J 10g. We also tried the EJB Services instead of WSIF. An EJB services is also not working for fault cases.
    OAS10g(OC4J) fault:
    <BookDoesNotExistException xmlns="http://oracle.com/service/bookrating/">
    <part name="exception">
    <exception xmlns="http://oracle.com/service/bookrating/">
    <tns:faultstring xmlns:tns="http://oracle.com/service/bookrating/">Book does not exist</tns:faultstring>
    <tns:detail xmlns:tns="http://oracle.com/service/bookrating/">com.oracle.rating.BookDoesNotExistException: Book does not exist</tns:detail>
    </exception>
    </part>
    </BookDoesNotExistException>
    <bpelFault>
    <faultType>
    Weblogic 11g fault:
    <BookDoesNotExistException xmlns="">
    <part name="exception">
    <exception xmlns="http://oracle.com/service/bookrating/">
    <tns:faultstring xmlns:tns="http://oracle.com/service/bookrating/">Book does not exist</tns:faultstring>
    <tns:detail xmlns:tns="http://oracle.com/service/bookrating/">com.oracle.rating.BookDoesNotExistException: Book does not exist</tns:detail>
    </exception>
    </part>
    </BookDoesNotExistException>
    </bpelFault>
    Thanks,
    Ramesh

    Hi Pablo,
    Thanks For the reply.
    we are using DB adapter which will poll on table,that means this is the service which creates the bpel instance.
    the only prob we are facing is sometimes BPEL instances are never comeout from the RUNNING state and error its showing error as"The transaction was rolled back. The work performed for bpel instance "290086" was rolled back to the previous dehydration point, but the audit trail has been saved.You can recover the instance from the recovery console by resubmitting the callback message or activity for execution"
    Oracle suggested this problem occurs when you are using Synchronous processes. increase the timeout settings.
    DB adapter Polling is always Asynchronous?
    can you just share your thoughts on this..
    Regards,
    Sudha

  • Problem with Email notifications in SOA 11g

    Exception: java.util.ArrayList cannot be cast to org.w3c.dom.Element
    i'm getting the follwoing error while trying to use the email acitivity in SOA 11g. I'm using the 11.1.1.3.0 version...Is there any solution for this?
    Thanks,
    Satish

    Go to soa-infra under SOA in EM console, now go to SOA Administration, then go to workflow notification properties...
    now set the notification mode to email, and also under the notification service...fill email addresses in from address, reply address and actionable address...
    Let me know how it goes...
    Thanks,
    N

  • Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

    GUIDE TO RUNNING EXTERNAL JOBS ON 10g WITH DBMS_SCHEDULER
    NOTE: Users using 11g should use the new method of specifying a credential which eliminates many of the issues mentioned in this note.
    This guide covers several common questions and problems encountered when using
    dbms_scheduler to run external jobs, either on Windows or on UNIX.
    What operating system (OS) user does the job run as ?
    External jobs which have a credential (available in 11g) run as the user
    specified in the credential. But for jobs without credentials including
    all jobs in 10gR1 and 10gR2 there are several cases.
    - On UNIX systems, in releases including and after 10.2.0.2 there is a file $ORACLE_HOME/rdbms/admin/externaljob.ora . All external jobs not in the SYS schema and with no credential run as the user and group specified in this file. This should be nobody:nobody by default.
    - On UNIX systems, in releases prior to 10.2.0.2 there was no "externaljob.ora" file. In this case all external jobs not in the SYS schema and with no credential run as the owner and group of the $ORACLE_HOME/bin/extjob file which should be setuid and setgid. By default extjob is owned by nobody:nobody except for oracle-xe where it is owned by oracle:oraclegroup and is not setuid/setgid.
    - On Windows, external jobs not in the SYS schema and with no credential run as the user that the OracleJobScheduler Windows service runs as. This service must be started before these jobs can run.
    - In all releases on both Windows and UNIX systems, external jobs in the SYS schema without a credential run as the oracle user.
    What errors are reported in SCHEDULERJOB_RUN_DETAILS views ?
    If a job fails, the first place to look for diagnostic information is the SCHEDULERJOB_RUN_DETAILS set of views. In 10gR2 and up the first 200 characters of the standard error stream is included in the additional_info column.
    In all releases, the error number returned by the job is converted into a
    system error message (e.g. errno.h on UNIX or net helpmsg on Windows) and that
    system error message is recorded in the additional info column. If there is no
    corresponding message the number is displayed.
    In 11g and up the error number returned by the job is additionally recorded in
    the error# column. In earlier releases 27369 would always be recorded in the
    error# column.
    Generic Issues Applicable to UNIX and Windows
    - The job action (script or executable) must return 0 or the job run will be marked as failed.
    - Always use the full pathname to executables and scripts.
    - Do not count on environment variables being set in your job. Make sure that the script or executable that your jobs runs sets all required environment variables including ORACLE_HOME, ORACLE_SID, PATH etc.
    - It is not recommended to pass in a complete command line including arguments as the action. Instead it is recommended to pass in only the path to and name of the executable and to pass in arguments as job argument values.
    - Scripts with special characters in the execution path or script name may give problems.
    - Ensure that the OS user your job runs as has the required privileges/permissions to run your job. See above for how to tell who the job runs as.
    - External job actions cannot contain redirection operators e.g. > < >> | && ||
    - In general try getting a simple external job working first e.g. /bin/echo or ipconfig.exe on Windows. Also try running the job action directly from the commandline as the OS user that the job will run as.
    Windows-specific Issues
    - The OracleJobScheduler Windows service must be started before external jobs will run (except for jobs in the SYS schema and jobs with credentials).
    - The user that the OracleJobScheduler Windows service runs as must have the "Log on as batch job" Windows privilege.
    - A batch file (ending in .bat) cannot be called directly by the Scheduler. Instead cmd.exe must be used and the name of the batch file passed in as an argument. For example
    begin
    dbms_scheduler.create_job('myjob',
       job_action=>'C:\WINDOWS\SYSTEM32\CMD.EXE',
       number_of_arguments=>3,
       job_type=>'executable', enabled=>false);
    dbms_scheduler.set_job_argument_value('myjob',1,'/q');
    dbms_scheduler.set_job_argument_value('myjob',2,'/c');
    dbms_scheduler.set_job_argument_value('myjob',3,'c:\temp\test.bat');
    dbms_scheduler.enable('myjob');
    end;
    /- In 10gR1 external jobs that wrote to standard output or standard error streams would sometimes return errors. Redirect to files or suppress all output and error messages when using 10gR1 to run external jobs.
    UNIX-specific Issues
    - When running scripts, make sure that the executable bit is set.
    - When running scripts directly, make sure that the first line of the script in a valid shebang line - starting with "#!" and containing the interpreter for the script.
    - In release 10.2.0.1, jobs creating a large amount of standard error text may hang when running (this was fixed in the first 10.2.0.2 patchset). If you are seeing this issue, redirect standard error to a file in your job. This issue has been seen when running the expdp utility which may produce large amounts of standard error text.
    - the user that the job runs as (see above section) must have execute access on $ORACLE_HOME/bin and all parent directories. If this is not the case the job may be reported as failed or hang in a running state. For example if your $ORACLE_HOME is /opt/oracle/db then you would have to make sure that
    chmod a+rx /opt
    chmod a+rx /opt/oracle
    chmod a+rx /opt/oracle/db
    chmod a+rx /opt/oracle/db/bin
    - On oracle-xe, the primary group of your oracle user (if it exists) must be dba before you install oracle-xe for external jobs to work. If you have an oracle user from a regular Oracle installation it may have the primary group set to oinstall.
    - On oracle-xe, the extjobo executable is missing so external jobs in the SYS schema will not work properly. This can be fixed by copying the extjob executable to extjobo in the same directory ($ORACLE_HOME/bin).
    - Check that correct permissions are set for external job files - extjob and externaljob.ora (see below)
    Correct permissions for extjob and externaljob.ora on UNIX
    There is some confusion as to what correct permissions are for external job related files.
    In 10gR1 and 10.2.0.1 :
    - rdbms/admin/externaljob.ora should not exist
    - bin/extjob should be setuid and setgid 6550 (r-sr-s---). It should be owned by the user that jobs should run as and by the group that jobs should run as.
    - bin/extjobo should have normal 755 (rwxr-xr-x) permissions and be owned by oracle:oraclegroup
    In 10.2.0.2 and higher
    - rdbms/admin/externaljob.ora file must must be owned by root:oraclegroup and be writable only by the owner i.e. 644 (rw-r--r--) It must contain at least two lines: one specifying the run-user and one specifying the run-group.
    - bin/extjob file must be also owned by root:oraclegroup but must be setuid i.e. 4750 (-rwsr-x---)
    - bin/extjobo should have normal 755 (rwxr-xr-x) permissions and be owned by oracle:oraclegroup
    In 11g and higher
    Same as 10.2.0.2 but additionally bin/jssu should exist with root setuid
    permissions i.e. owned by root:oraclegroup with 4750 (-rwsr-x---)
    Internal Error numbers for UNIX on 10.2.0.2 or 10.1.0.6 or higher
    If you are not using a credential and are using version 10.2.0.2 or higher or 10.1.0.6 or higher you may come across an internal error number. Here are the meanings for the internal error numbers.
    274661 - can't get owner of or permissions of externaljob.ora file
    274662 - not running as root or externaljob.ora file is writable by group or other or externaljob.ora file not owned by root (can't switch user)
    274663 - setting the group or effective group failed
    274664 - setting the user or effective user failed
    274665 - a user or group id was not changed successfully
    274666 - cannot access or open externaljob.ora file
    274667 - invalid run_user specified in externaljob.ora file
    274668 - invalid run_group specified in externaljob.ora file
    274669 - error parsing externaljob.ora file
    274670 - extjobo is running as root user or group

    Hi Ravi,
    Can you help me...
    Hi All,
    I planned to create a job to do rman backup daily at 04:00 AM.
    1. I created a program as follows
    BEGIN
    DBMS_SCHEDULER.CREATE_PROGRAM(
    program_name => 'rman_backup_prg',
    program_action => '/u02/rmanback/rman.sh',
    program_type => 'EXECUTABLE',
    comments => 'RMAN BACKUP');
    END;
    my rman script is
    #!/usr/bin/ksh
    export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
    export PATH=$PATH:/u01/app/oracle/product/10.2.0/db_1/bin
    /u01/app/oracle/product/10.2.0/db_1/bin/exp rman/cat@catdb file=/u02/rmanback/rm
    an_220108.dmp log=/u02/rmanback/rman_220108.log owner=rman statistics=none comp
    ress=n buffer=400000
    compress *.dmp
    exit
    2. I created a schedule as follows
    BEGIN
    DBMS_SCHEDULER.CREATE_SCHEDULE(
    schedule_name => 'rman_backup_schedule',
    start_date => SYSTIMESTAMP,
    end_date => '31-DEC-16 05.00.00 AM',
    repeat_interval => 'FREQ=DAILY; BYHOUR=4',
    comments => 'Every day at 4 am');
    END;
    3. I created ajob as follows.
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'rman_backup_job',
    program_name => 'rman_backup_prg',
    schedule_name => 'rman_backup_schedule',
    enabled=> true,
    auto_drop=> false
    END;
    While I am running the job I am getting the following error anybody help me.
    ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 2
    If I removed "compress *.dmp" line in rman script it is working fine.
    /* additional Info from dba_scheduler_job_run_details as follows */
    ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    STANDARD_ERROR="
    Export: Release 10.2.0.3.0 - Production on Tue Jan 22 14:30:08 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Release 10.2.0.3.0 - Production
    Export"
    Regards,
    Kiran

  • SOA 11g- Error handling of Asynchronous composites

    Hi,
    We are working on Error Handling framework design for both synchronous, asynchrounous composites of SOA 11g.
    Any pointers on the same will be helpfull as how to capture errors occuring during asynchronous services calls.
    Thanks,
    Sowmya

    Thanks Naresh.
    Can you help me if the below is possbile.
    I have a process which takes an input and splits the inputs into multiple requests to some external system in a flow-N activity. There is an invoke activity with-in the flow N activity. And this invoke is an asynchrnous call. If at runtime we have 5 flows for flow-N, with 5 calls to external system, and out of these 4 are successful and one errors out. Can we have an error handler to just resubmit the failed request to the external system. Once we get the response from the resubmission, we want to continue with merging the output of all 5 and sending it back.
    Also, let me know if there will be any issue with the call back operation due to resubmission of the invoke. This is an asynchronous invoke with call back mechanism for response.
    Thank you so much.
    PK

  • How to retry a external webservice without fault policy framework?

    hi ,
    -->i want retry a external web service if invocation fails first time, without using fault policy frame work how to achieve this?
    -->I have a Advanced Queue in OSB, i am Dequeueing that  , i have a proxy to deque the AQ topic, with any reason dequeue fails it should retry for number of times and then handled in Exception Hnadler in OSB.
    How to retry the AQ to Dequeue?
    Thanks,
    Shekar

    We are experiencing exactly the same problem!
    Only in our case its Wssp1.2-2007-Wss1.0-X509-Basic256.xml
    We encrypt and sign the request, the server processes it correctly.
    But afterwards we send a "naked" request(not encrypted nor signed) and still the WLS processes it.
    Is there a setting of some sort that enables strict enforcement of the policy?

  • Fault Policy framework doesnt work - SOA 11g

    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 the fault policy doesn't work.
    these is my fault ploicy
    <?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="0.0.1" id="FusionMidFaults"
    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>
    <action ref="MediatorJavaAction"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <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>
    <faultName xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    name="bpws:selectionFailure">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    <faultName xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    name="bpws:InvalidData">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <!-- <fault name="test" type="bpws:InvalidData" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" >
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </fault> -->
    </Conditions>
    <Actions>
    <!-- Generics -->
    Note: The preseeded recovery action tag names (ora-retry, ora-human-intervention, ora-terminate, and so on) are only samples.
    You can substitute these names with ones appropriate to your environment.
    Notes: ¦ Fault policy file names are not restricted to one specific name.However, they must conform to the fault-policy.xsd schema file. ¦ Example
    12–5 provides an example of catching faults based on fault names. You can also catch faults based on message types, or on both:
    <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="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="java-fault-handler">
    <javaAction className="in.ibm.com.FAPErrorHandler"
    defaultAction="ora-human-intervention" propertySet="properties">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    <Action id="default-replay-scope">
    <replayScope/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    And my fault bindings.xml file
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicyBindings version="0.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="FusionMidFaults"/>
    <!--<composite faultPolicy="ServiceExceptionFaults"/>-->
    <!--<composite faultPolicy="GenericSystemFaults"/>-->
    </faultPolicyBindings>
    In 10g we used a default fauly policy and we used to register it used to work fine. Here there is soem thing wrong with the java class.?????
    my compsoite execution gives the following error
    <bpelFault>
    <faultType>
    <message>0</message>
    </faultType>
    <InvalidData>
    <part name="summary">
    <summary xsi:type="def:string">Invalid status from HOL</summary>
    </part>
    <part name="detail">
    <detail xsi:type="def:string">HOL Sends Invalid Status</detail>
    </part>
    <part name="code">
    <code xsi:type="def:string">Error</code>
    </part>
    </InvalidData>
    </bpelFault>
    as per my fault value but not calling my java class... how do i know my fault policy is working or not ?????This is teh errored fault
         Error Message: {http://schemas.xmlsoap.org/ws/2003/03/business-process/}InvalidData
    Fault ID     default/FAPCustomerInitiatedBarUnbar!1.0*374a445a-1396-438e-a7c4-76bf5c6404a8/FAPCustomerInitiatedBarUnbarProcess/210005-BpThw0-BpSeq30.11-3
    Fault Time     Oct 25, 2010 4:26:49 PM
    Non Recoverable System Fault :
    <bpelFault><faultType> <message>0</message></faultType><InvalidData xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Invalid status from HOL</summary></part><part name="detail"><detail xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">HOL Sends Invalid Status</detail></part><part name="code"><code xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Error</code></part></InvalidData></bpelFault>
    I verified the serverlog and diagonostic log file..
    the java class is not called what is wrong with my java class call in fault policy.
    Venugopal Raja
    Edited by: user12893766 on Oct 25, 2010 3:57 AM
    Edited by: user12893766 on Oct 25, 2010 5:35 AM

    Many Thanks.
    I had misinteprted the documentation I had read which stipulated the pattern of the test should be $fault.<PartName>/<LocationPath>.
    What I didnt realise was the $fault.<PartName> e.g. $fault.code returned the root node which in this case is <code>. Therefore no further location path is required as this is a simple type / string field rather than a complex type

  • BPEL 11g fault policy action java class not sending email

    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 access the email in my inbox.
    I am able to send email from using email bpel activity and also test work flow notification from em console.
    I have used both the java options for sending email like javax.mail and oracle.sdp.messaging .
    JAVA CODE FOR EMAIL javax.mail
    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");
    //Print Fault Details to Console if it exists
    System.out.println("****************Fault Details********************************");
    // if(iFaultRecoveryContext instanceof BPELFaultRecoveryContextImpl)
    BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
    System.out.println("Fault: " + bpelCtx.getFault());
    System.out.println("Activity: " + bpelCtx.getActivityName());
    System.out.println("Composite Instance: " + bpelCtx.getCompositeInstanceId());
    System.out.println("Composite Name: " + bpelCtx.getCompositeName());
    System.out.println("***********************************************************");
    try {
    bpelCtx.addAuditTrailEntry("Sending Email...");
    Map props = iFaultRecoveryContext.getProperties();
    if (props != null && props.size() > 0) {
    setFrom(getParameterValue((ArrayList)props.get("from")));
    setTo(getParameterValue((ArrayList)props.get("to")));
    setSubject(getParameterValue((ArrayList)props.get("subject")) + bpelCtx.getTitle());
    setText(getParameterValue((ArrayList)props.get("text")) + "\n" + "BPEL Process Instance: " + bpelCtx.getInstanceId() + " needs intervention to recover from a technical exception: " + bpelCtx.getFault().getMessage() + ".\n" + "Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.\n" + "This message was automatically generated, please do not reply to it.");
    setHost(getParameterValue((ArrayList)props.get("host")));
    setPort(getParameterValue((ArrayList)props.get("port")));
    bpelCtx.addAuditTrailEntry("to Email getFrom..."+getFrom());
    bpelCtx.addAuditTrailEntry("to Email getTo..."+getTo());
    bpelCtx.addAuditTrailEntry("to Email getText..."+getText());
    bpelCtx.addAuditTrailEntry("to Email getHost..."+getHost());
    bpelCtx.addAuditTrailEntry("to Email getPort..."+getPort());
    Session mailSession = Session.getDefaultInstance(properties);
    Message simpleMessage = new MimeMessage(mailSession);
    bpelCtx.addAuditTrailEntry("to Email toAddresses2...");
    InternetAddress fromAddress = new InternetAddress(from);
    bpelCtx.addAuditTrailEntry("to Email fromAddress..."+fromAddress);
    simpleMessage.setFrom(fromAddress);
    String[] toAddresses = to.split(";");
    if (toAddresses != null && toAddresses.length > 0)
    bpelCtx.addAuditTrailEntry("to Email toAddresses3...");
    InternetAddress[] toInternetAddresses =new InternetAddress[toAddresses.length];
    for (int i = 0; i < toAddresses.length; i++)
    bpelCtx.addAuditTrailEntry("to Email toAddresses4444..."+ toAddresses);
    toInternetAddresses[i] = new InternetAddress(toAddresses[i]);
    bpelCtx.addAuditTrailEntry("to Email toInternetAddresses..."+ toInternetAddresses[i]);
    simpleMessage.setRecipients(RecipientType.TO,toInternetAddresses);
    simpleMessage.setSubject(subject);
    simpleMessage.setText(text);
    Transport.send(simpleMessage);
    bpelCtx.addAuditTrailEntry("After Email...");
    } catch (Exception e) {
    bpelCtx.addAuditTrailEntry("fault Message:" + e.getMessage());
    //Custom Code to Log Fault to File/DB/JMS or send Emails etc.
    return "Manual";
    private String getParameterValue(ArrayList parameterList) {
    String value = null;
    if (parameterList != null && parameterList.size() > 0)
    value = (String)parameterList.get(0);
    return value;
    JAVA CODE FOR EMAIL oracle.sdp.messaging 
    private void sendMail(IFaultRecoveryContext iFaultRecoveryContext) {
    BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
    bpelCtx.addAuditTrailEntry("In sendMail...");
    Map<String, Object> params = new HashMap<String, Object>();
    // params.put(key, value); // if optional parameters need to be specified.
    MessagingClient messagingClient;
    try {
    bpelCtx.addAuditTrailEntry("In sendMail111...");
    messagingClient =
    MessagingClientFactory.createMessagingClient(params);
    Message newMessage = MessagingFactory.createMessage();
    // newMessage.setContent(createEventPayload(iFaultRecoveryContext),"text/plain");
    newMessage.setContent("Component Name :"+bpelCtx.getComponentName()+ "\n Instacne Id :"+bpelCtx.getComponentInstanceId()+
    "\n Composite Instance Id :"+bpelCtx.getCompositeInstanceId()+ "\n Composite Name :" bpelCtx.getCompositeName()
    "\n Activity name :"+bpelCtx.getActivityName() + "\n Activity Id :" bpelCtx.getActivityId() "\n ECID :" bpelCtx.getECID()
    "\n Reference Name :"+bpelCtx.getReferenceName()+ "\n Title :" bpelCtx.getTitle()
    "\n Fault :" + bpelCtx.getFault()+ "\n Port Name :"+bpelCtx.getPortType(), "text/plain");
    bpelCtx.addAuditTrailEntry("In sendMail222...");
    Address sender = MessagingFactory.createAddress(getFrom());
    bpelCtx.addAuditTrailEntry("In sendMail sender..."+sender.toString());
    bpelCtx.addAuditTrailEntry("from Email..."+getFrom());
    String recipientsStr[] = to.split(";");
    bpelCtx.addAuditTrailEntry("to Email..."+getTo());
    bpelCtx.addAuditTrailEntry("In sendMail333...");
    Address[] recipients = MessagingFactory.createAddress(recipientsStr);
    bpelCtx.addAuditTrailEntry("In sendMail444...");
    newMessage.addSender(sender);
    messagingClient.registerAccessPoint(MessagingFactory.createAccessPoint(sender));
    newMessage.addAllRecipients(recipients);
    bpelCtx.addAuditTrailEntry("In sendMail5555...");
    newMessage.getMessageInfo().setSession(MessageSessionType.INBOUND_SESSION);
    newMessage.setSubject(getSubject());
    bpelCtx.addAuditTrailEntry("Subject..."+getSubject());
    String messageId = "";
    bpelCtx.addAuditTrailEntry("In sendMail666...");
    synchronized (this) {
    bpelCtx.addAuditTrailEntry("In sendMail777...");
    messageId = messagingClient.send(newMessage);
    bpelCtx.addAuditTrailEntry("In sendMail888...");
    Status[] statuses = messagingClient.getStatus(messageId);
    bpelCtx.addAuditTrailEntry("In sendMail999...");
    } catch (MessagingException e) {
    bpelCtx.addAuditTrailEntry("inside exception email fault Message:" + e.getMessage());
    //e.printStackTrace();
    MESSAGES FROM SOA SERVER OUT LOG after test the bpel process:
    ===========================================
    ****************Fault?Metadata********************************
    Fault?policy?id:?SimpleFaultPolicy
    Fault?type:?bpel
    Partnerlink:?Service1
    Port?type:?{http://kacst.edu.sa/process/nstip/coPINotifyProcess}kacst_process_nstipCoPIMotifyProcess
    Properties?Set?for?the?Fault
    ****************Fault?Details********************************
    Fault:?com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
    messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
    parts: {{
    summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
    ,detail=<detail>&lt;exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.&lt;/exception>
    </detail>
    ,code=<code>env:Server</code>}
    Activity:?Invoke1
    Composite?Instance:?740332
    Composite?Name:?TestBPELFaultPolicy
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
    220 taisirsit.kacst.edu.sa ESMTP Sendmail 8.14.4+Sun/8.14.4; Fri, 12 Oct 2012 13:00:45 +0300 (AST)
    DEBUG SMTP: connected to host "localhost", port: 25
    EHLO taisirsit.kacst.edu.sa
    250-taisirsit.kacst.edu.sa Hello localhost [127.0.0.1], pleased to meet you
    250-ENHANCEDSTATUSCODES
    250-PIPELINING
    250-EXPN
    250-VERB
    250-8BITMIME
    250-SIZE
    250-DSN
    250-ETRN
    250-DELIVERBY
    250 HELP
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: Found extension "PIPELINING", arg ""
    DEBUG SMTP: Found extension "EXPN", arg ""
    DEBUG SMTP: Found extension "VERB", arg ""
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "SIZE", arg ""
    DEBUG SMTP: Found extension "DSN", arg ""
    DEBUG SMTP: Found extension "ETRN", arg ""
    DEBUG SMTP: Found extension "DELIVERBY", arg ""
    DEBUG SMTP: Found extension "HELP", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 2.1.0 <[email protected]>... Sender ok
    RCPT TO:<[email protected]>
    250 2.1.5 <[email protected]>... Recipient ok
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Enter mail, end with "." on a line by itself
    From: [email protected]
    To: [email protected]
    Message-ID: <[email protected].sa>
    Subject: SOA EXCEPTIONInstance #890381 of BPELProcess1
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Testing Email From Fault
    BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
    messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
    parts: {{
    summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
    ,detail=<detail>&lt;exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.&lt;/exception>
    </detail>
    ,code=<code>env:Server</code>}
    Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.
    This message was automatically generated, please do not reply to it.
    250 2.0.0 q9CA0j30012424 Message accepted for delivery
    QUIT
    221 2.0.0 taisirsit.kacst.edu.sa closing connection
    Details from Instance of BPEL PROCESS :
    Started invocation of operation "process" on partner "Service1".
    Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Invoked handleBPELFault on custom java action class "com.kacst.fault.CustomFaultHandler".
    Oct 12, 2012 10:00:45 AM Sending Email...
    Oct 12, 2012 10:00:45 AM to Email [email protected]
    Oct 12, 2012 10:00:45 AM to Email [email protected]
    Oct 12, 2012 10:00:45 AM to Email getText...Testing Email From Fault BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary> ,detail=<detail>&lt;exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.&lt;/exception> </detail> ,code=<code>env:Server</code>} . Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible. This message was automatically generated, please do not reply to it.
    Oct 12, 2012 10:00:45 AM to Email getHost...smtp.kacst.edu.sa
    Oct 12, 2012 10:00:45 AM to Email getPort...25
    Oct 12, 2012 10:00:45 AM to Email toAddresses2...
    Oct 12, 2012 10:00:45 AM to Email [email protected]
    Oct 12, 2012 10:00:45 AM to Email toAddresses3...
    Oct 12, 2012 10:00:45 AM to Email [email protected]
    Oct 12, 2012 10:00:45 AM to Email [email protected]
    Oct 12, 2012 10:00:45 AM After Email...
    Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Marked Invoke activity as "pending manual recovery".
    Oct 12, 2012 10:00:45 AM Faulted while invoking operation "process" on provider "Service1".
    Please suggest.
    Thanks

    Hi,
    I got the solution. our email server is sending email to the mail accounts those are in the same domain but for different domains its not able to send the email.
    you can try with the email those are created on the same email server.
    Thanks
    Tuku

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

  • Can SOA 11g fault policy handle XSD Validation errors from the Mediator?

    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 System Fault          oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01303:[Payload default schema validation error]XSD schema validation fails with error Invalid text 'A' in element: 'TermCode'Possible Fix:Fix payload and resubmit.
    My fault-policies.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1"
         id="NewStudentRegistrationFaults"
    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:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:GetNewStudentRegistrationFile">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:TYPE_ALL">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:mediatorException">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    <faultPolicy version="2.0.1"
         id="MediatorFaults"
    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:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA rejected msg. fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    </faultPolicies>
    My fault-bindings.xml file is as follows:
    <?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="NewStudentRegistrationFaults"/>
    <component faultPolicy="MediatorFaults">
    <name>NewStudentRegistrationMediator</name>
    </component>
    <service faultPolicy="NewStudentRegistrationFaults">
    <name>GetNewStudentRegistrationFile</name>
    </service>
    </faultPolicyBindings>
    You'll notice that I've tried a number of ways (and various other combinations) to try to steer the error above into my Java fault handler but nothing has meet with success. The mplan is as follows:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!--Generated by Oracle SOA Modeler version 1.0 at [2/3/10 1:21 PM].-->
    <Mediator name="NewStudentRegistationMediator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/sca/1.0/mediator"
    wsdlTargetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Experiments/NewStudentRegistration/GetNewStudentRegistrationFile%2F">
    <operation name="Get" deliveryPolicy="AllOrNothing" priority="4"
    validateSchema="true">
    <switch>
    <case executionType="queued" name="RegToBanner.insert_2">
    <action>
    <transform>
    <part name="$out.NewstudentregistrationCollection"
    function="xslt(xsl/NewStudentRegistration_To_NewstudentregistrationCollection.xsl, $in.body)"/>
    </transform>
    <invoke reference="RegToBanner" operation="insert"/>
    </action>
    </case>
    </switch>
    </operation>
    </Mediator>
    I'm a newbie to Oracle SOA. So perhaps I am missing the obvious. But I haven't read much in the documentation specifically about using the XSD validation option on the mediator and have seen nothing specifically about catching this sort of exception in the fault policy (apart from the faults I already have in my policy). Can anyone suggest what I am doing incorrectly here or perhaps whether what I am attempting to do is not possible? Thanks.
    - Cris

    Has anyone got it working yet?
    In my case, I have the following sequence:
    FileAdapter -> Mediator1 -> Mediator2->DB Adapter
    I am deliberately introducing validation error in File. Isn't it correct to assume Fault framework would get triggered at Mediator1 level since we are invoking FileAdapter service?
    I am getting a strange behaviour. If I enable XSD validation at Mediator1 level, process is Faulted with no re-try option. However, if I enable XSD validation ONLY at Mediator2 level, I get Recoverable fault. There seems to be some disconnect between documentation and reality. I am using JDeveloper 11.1.1.3.0 version and SOA Suite 11g.
    Thanks,
    Amjad.

  • Fault policy files in MDS repository is not working..

    Hi All,
    I have created my fault policy and fault bindings file and tested in my local project. It worked fine.
    To make it available in MDS,
    I added the files under JDeveloperHome/jdeveloper/integration/seed/apps/faulthandling
    I deployed this MDS repository to my server by the below method.
    I created a new generic application, then a generic project, to which I added a new Deployment Profile of type JAR file.
    To the JAR file, I added my folder in which the policy files exist. I created a SOA bundle from the ‘Applications’
    Then I deployed the project to my server finally.
    For all these things I refferred to
    http://www.orafmwschool.com/soa-11g-mds/
    Now in my adf-config.xml I have made changes as follows.
    <metadata-store-usage id="mstore-usage_2">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
    <property value="D:\StudyForInstalling\SOA11gHome\jdeveloper\integration" name="metadata-path"/>
    <property value="seed" name="partition-name"/>
    </metadata-store>
    </metadata-store-usage>
    Then in my composite.xml I have,
    <property name="oracle.composite.faultPolicyFile">oramds:/apps/faulthandling/fault-policies.xml</property>
    <property name="oracle.composite.faultBindingFile">oramds:/apps/faulthandling/fault-bindings.xml</property>
    I hav shutdown the partnerlink service.
    Now, I can see remote exception while executing. My fault policy files are not executing.
    In the same apps/ I have my PurchaseOrder.xsd file. When I tried importing the schema to my project from the mds, it is working fine.
    I used like this in my wsdl.
    <import namespace="http://www.order.org" schemaLocation="oramds:/apps/faulthandling/PurchaseOrder.xsd" />
    Why is my faultpolicy file not working?
    Kindly help me
    Thanks,
    Sabarisri .N

    I am not sure if we can use oramds references as properties values in composite.xml. Did you try with preferences ??

  • What is the "catchAll for all faults" equivalent in fault-policy.xml

    Hi
    This is regarding the catchAll equivalent tag in fault-policy.xml file
    fault-policy.xml has two sections - Conditions & Actions
    In Conditions, you'll define several <faultName name="XXX"> and corresponding <condition>, <test> & <action ref="">.
    But what I want is, how do you define a condition for all Fault types (something like a catchAll activity)?
    Lets say i need a single condition for all faults, so i want to say
    <conditions>
    <faultName name=*"ALL_FAULT_TYPES"*>
    <condition>
    <!--<test> -- i dont give any test condition here, so that it is applicable for all conditions for this fault type -->
    <action ref="ora-human-intervention">
    </condition>
    </faultName>
    </conditions>
    I've searched documentation, blogs but could not find any.
    Only thing i could find is, if we dont give any <test> tag, that means it is like a catchAll for that particular faultName. I need a similar one, but for all faults.
    Appreciate your response.
    Regards
    RaviKiran.
    Edited by: kiransaravi on Oct 16, 2012 12:39 AM
    Edited by: kiransaravi on Oct 16, 2012 12:40 AM

    Hi Ronald Van,
    what do you mean by this statement .
    Mind: the fault-policy framework catches faults in invocations of (external) services from BPEL, Mediator, etc. Internal BPEL faults such as errored assign activities are >not caught.Is it like faults generated while invoking only will go to faultpolicies ?
    I want to generate a email in case of faults to notify the customer. faultpolicies is working good for remote and binding fault and i am generating mail using java. but in case of selection failure it is not referring to fault policies. So Is generating a email from catchall block is the only solution for this or is there any other way.The problem with catch all block is that the instance state will be completed and my monitoring is affected. I want to generate a email and the process should be in running state . Is there any way?
    Please suggest .
    Thanks in Advance
    regards,
    Raju

  • Register external application as partner application on OSSO

    Hi All,
    I am using OracleAS Single Sign-On. I want to integrate Stellent Universal Content Management(UCM) with OracleAS Single Sign-On.
    Can someone please let me know how to achieve this?
    Also I would like to know, how can I register external application as a partner application in OracleAS Single Sign-on?
    Thanks & Regards,
    Yash Shah

    Hi,
    Thanks for your quick response. I have gone through the document which you suggested. the document says to register through sooreg.sh script. I would like to register partner application using SSO Administration UI.
    When I log in to OSSO server, I have a option of registering the partner application, there in UI I have to specify, Home URL, Success URL and Logout URL.
    For me, my sso server and my application server resides on the different servers (systems). Please let me know which URLs I shoudl specify to register my partner application using UI.
    I mean, I want to know what should I specify in Home URL, Success URL and Logout URL
    Thanks & Regards,
    Yash Shah

Maybe you are looking for