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     
=================================================================
    

Monday, June 11, 2012

Property To Make DB JNDI Dynamic

Suppose you created a project by using the DB adapter.And you are migrating the project from DEV to TEST.In the TEST environment the JNDI name may be different.So in these situations we have to make the JNDI name dynamic.


Steps to change DB JNDI dynamically.
1.Create a preference in the composite.xml
<property name="bpel.preference.dyn_jndi">eis/jndi/mydbjndi"</property>


2.Then drag and drop the DB adapter and configure it.


3.Then open .bpel file , please the property
 <bpelx:inputproperty name="jca.jndi" variable="dyn_jndi"/>


4.Deploy the project , then we can change the JNDI in the runtime,         By setting the preference    value

Wednesday, May 16, 2012

SOA – Service Oriented Architecture Overview

To start things on SOA, First we need to understand the basic concepts like web service. Because SOA is mainly related with the web services and its orchestration.
Web services describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol.
 XML (Extensible Markup Language) is used to tag the data
SOAP (Simple Object Access Protocol) is used to transfer the data
WSDL (Web Service Description Language) is used for describing the services available and
 UDDI (Universal Description, Discovery and Integration) is used for listing what services are available.

In the developers point of view BPEL (Business Process Execution Language) is used for the development and integration of web services.

BPEL is nothing but a XML based language used to describe a web service.XML tags used in the BPEL was standardized by the OASIS (Organization for the Advancement of Structured Information Standards).

Oracle SOA-BPEL Project development Overview -
 Normally we used to create the business logic (Language specific packages like PL/SQL package or Java Package) and the workflow by using the Oracle workflow. BPEL combines both the versions so that we can develop the workflow activities and some extent of the language code, which describes the business logic.

Steps:
a. Create the business process web service by using the IDE like Jdeveloper or Eclipse. Create a project,   then for the business logic in the project IDE automatically creates WSDL, XSD and XML files. All the project files are bundled into .Jar file for the deployment into the server.
b. Deploy BPEL project (.Jar) file on BPEL Process Manager by using Ant Utility or by using the IDE (Jdeveloper) itself.
c. To test the BPEL process, login into weblogic server em console , where we can test our deployed web service.




Query to find the Primary Customer Information based on the org_id



    SELECT *
    FROM   hz_parties hp,
                   hz_cust_accounts hca,
                   hz_party_sites hps1,
                   hz_locations hl1,
                   hz_cust_acct_sites_all hcas1,
                   hz_cust_site_uses_all hcsu1
    WHERE   hp.party_id                = hca.party_id
    AND hp.party_id                      = hps1.party_id
    AND hp.party_id                      = hps1.party_id
    AND hl1.location_id                  = hps1.location_id
    AND hps1.party_site_id          = hcas1.party_site_id
    AND hcas1.cust_account_id    = hca.cust_account_id
    AND hcas1.cust_acct_site_id  = hcsu1.cust_acct_site_id
    AND hcsu1.site_use_code        IN ('BILL_TO','SHIP_TO')
    AND hcsu1.primary_flag         = 'Y'
    AND hcsu1.status                      = 'A'
    AND hca.cust_account_id        = <sold_to_org_id>;

Thursday, May 3, 2012

Script To Download and Upload LDT Files For Various Objects



Concurrent Program
*************************************************
FNDLOAD apps/ohs_xnappi 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct Concurrent_Program_Short_Name.ldt PROGRAM  CONCURRENT_PROGRAM_NAME='Concurrent_Program_Short_Name' APPLICATION_SHORT_NAME='ZZZ'
FNDLOAD apps/ohs_xnappi 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct Concurrent_Program_Short_Name.ldt

Value Set
*************************************************
FNDLOAD apps/ohs_xnappi 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct Value_Set_Name.ldt VALUE_SET FLEX_VALUE_SET_NAME='Value_Set_Name'
FNDLOAD apps/ohs_dnappi 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct Value_Set_Name.ldt

Request Set
*************************************************
FNDLOAD apps/ohs_xnappi 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct Request_Set_Name.ldt REQ_SET_LINKS APPLICATION_SHORT_NAME=ZZZ REQUEST_SET_NAME=Request_Set_Name
FNDLOAD apps/ohs_dnappi 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct Request_Set_Name.ldt

Responsiblity
*************************************************
FNDLOAD apps/simple4u 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct Responsibility_Name.ldt FND_RESPONSIBILITY RESP_KEY="Responsibility_Name"
FNDLOAD apps/simple4u 0 Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct Responsibility_Name.ldt

Lookups
*************************************************
FNDLOAD apps/options4u 0 Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct Lookup_Name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME ='AU' LOOKUP_TYPE="Lookup_Name"
FNDLOAD apps/options4u 0 Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct Lookup_Name.ldt

Flex Fields
*************************************************
FNDLOAD apps/ohs_xnappi 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct FlexField_Name_Ldt_File.ldt DESC_FLEX P_LEVEL=’COL_ALL:REF_ALL:CTX_ONE:SEG_ALL’ APPLICATION_SHORT_NAME="ZZZ" DESCRIPTIVE_FLEXFIELD_NAME="FlexField_Name" P_CONTEXT_CODE="Global Data Elements"
FNDLOAD apps/ohs_xnappi 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct FlexField_Name_Ldt_File.ldt

Form
*************************************************
FNDLOAD apps/ohs_xnappi 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct Form_Name.ldt FORM FORM_APP_SHORT_NAME='ZZZ' FORM_NAME=Form_Name
FNDLOAD apps/ohs_xnappi 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afsload.lct Form_Name.ldt FORM FORM_APP_SHORT_NAME='ZZZ' FORM_NAME=Form_Name UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Functions
*************************************************
FNDLOAD apps/simple4u 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct Function_Name_Ldt_File.ldt FUNCTION FUNCTION_NAME=Function_Name
FNDLOAD apps/simple4u 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afsload.lct Function_Name_Ldt_File.ldt FUNCTION FUNCTION_NAME=Function_Name UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Menus
*************************************************
FNDLOAD apps/simple4u 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct Menu_Name_Ldt_File.ldt MENU MENU_NAME=Menu_Name
FNDLOAD apps/simple4u 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afsload.lct Menu_Name_Ldt_File.ldt MENU MENU_NAME=Menu_Name UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Profile Options
*************************************************
FNDLOAD apps/ohs_xnappi 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct Profile_Ldt_Name.ldt PROFILE PROFILE_NAME="profile_option_short_name" APPLICATION_SHORT_NAME="FND"
FNDLOAD apps/ohs_xnappi 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct Profile_Ldt_Name.ldt
-- to download a single profile option value set at some site/user/resp level
FNDLOAD apps/ohs_xnappi O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct Profile_Ldt_Name.ldt PROFILE PROFILE_NAME="Profile_Name" APPLICATION_SHORT_NAME="FND" LEV='RESPONSIBILITY' LEV_NAME='Responsibility_Name'
FNDLOAD apps/ohs_xnappi 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct Profile_Ldt_Name.ldt



Sunday, April 29, 2012

Query To Fetch Concurrent Program Names Based On The ValueSet


SELECT   b.user_concurrent_program_name
  FROM    fnd_descr_flex_col_usage_vl a,
         fnd_concurrent_programs_vl b
 WHERE  a.flex_value_set_id = ( SELECT    flex_value_set_id
    FROM    fnd_flex_value_sets
 WHERE    flex_value_set_name = '&Value_Set_Name')
   AND     a.descriptive_flexfield_name = '$SRS$.' || b.concurrent_program_name