Thursday, March 27, 2014

Prototypes of fault-policies and fault-bindings file

======================fault-policies.xml====================================

<?xml version="1.0" encoding="UTF-8" ?> 
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
 <!-- Policies --> <!-- <composite faultPolicy="FusionAppsFaults"/> -->

<faultPolicy version="0.0.1"
    id="FusionAppsFaults"
    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="default-human-intervention"/>
            </condition>
        </faultName>
        <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
            <condition>
                <action ref="default-human-intervention"/>
            </condition>
        </faultName>
        <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
            <condition>
                <action ref="default-human-intervention"/>
            </condition>
        </faultName>
        <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:runtimeFault">
            <condition>
                <action ref="default-human-intervention"/>
            </condition>
        </faultName>
    </Conditions>
   
    <Actions>
        <!-- Generics -->
        <Action id="default-terminate">
            <abort/>
        </Action>
         <Action id="default-replay-scope">
            <replayScope/>
        </Action>
        <Action id="default-rethrow-fault">
            <rethrowFault/>
        </Action>
        <Action id="default-human-intervention">
            <humanIntervention/>
        </Action>
       
          
      
                <!-- Mediator Handling -->
        <Action id="MediatorRetry">
            <retry>
                <retryCount>3</retryCount>
                <retryInterval>2</retryInterval>
                <exponentialBackoff/>
                <retryFailureAction ref="MediatorJavaAction"/>
            </retry>
        </Action>
        <!-- BPEL handling -->
        <Action id="BPELRetry">
            <retry>
                <retryCount>3</retryCount>
                <retryInterval>2</retryInterval>
                <exponentialBackoff/>
                <retryFailureAction ref="BPELJavaAction"/>
            </retry>
        </Action>
            
        
    </Actions>



  
</faultPolicy>
<faultPolicy version="0.0.1"
    id="FusionAppsFaults2"
    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="default-human-intervention"/>
            </condition>
        </faultName>
        <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
            <condition>
                <action ref="default-human-intervention"/>
            </condition>
        </faultName>
        <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
            <condition>
                <action ref="default-human-intervention"/>
            </condition>
        </faultName>
        <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:runtimeFault">
            <condition>
                <action ref="default-human-intervention"/>
            </condition>
        </faultName>
    </Conditions>
   
    <Actions>
        <!-- Generics -->
        <Action id="default-terminate">
            <abort/>
        </Action>
         <Action id="default-replay-scope">
            <replayScope/>
        </Action>
        <Action id="default-rethrow-fault">
            <rethrowFault/>
        </Action>
        <Action id="default-human-intervention">
            <humanIntervention/>
        </Action>
       
          
      
                <!-- Mediator Handling -->
        <Action id="MediatorRetry">
            <retry>
                <retryCount>3</retryCount>
                <retryInterval>2</retryInterval>
                <exponentialBackoff/>
                <retryFailureAction ref="MediatorJavaAction"/>
            </retry>
        </Action>
            
          
        <!-- BPEL handling -->
        <Action id="BPELRetry">
            <retry>
                <retryCount>3</retryCount>
                <retryInterval>2</retryInterval>
                <exponentialBackoff/>
                <retryFailureAction ref="BPELJavaAction"/>
            </retry>
        </Action>
            
        </Actions>

<!-- In Drop 6, property accessors were extended to provde these values at runtime in the Java handler --> 

    

</faultPolicy>
</faultPolicies>

====================fault-bindings.xml=======================================
<?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="FusionAppsFaults">
        <name>testFaultFrameWork_ASYNc</name>
    </composite>
    <component faultPolicy="FusionAppsFaults21">
        <name>BPELProcess1</name>
    </component>
</faultPolicyBindings>



Transaction Behavior with Requester and Provider


1. syn/Asyn to syn we have single transaction.
     if both the services have their own DB adapters(XA enable JNDI), now both will be 
in same transaction. these adapters will participate in 2Phc.

2. syn/Asyn to Asyn we have different transactions.
if both the services have their own DB adapters (XA enable JNDI), now two adapters have 
two different 2phc.

properties:

<component name="InternalWarehouseService">

<implementation.bpel src="InternalWarehouseService.bpel"/>

<property name="bpel.config.transaction" many="false" type="xs:string">required | requiresNew</property>

</component>

=================================================================

required:
which makes BPEL inherit the tx that is already there, or if not creating a new one
requiresNew:
suspending one if exists, and ALWAYS create a new one     
=================================================================