Friday, 7 February 2014

ORA-02049: timeout: distributed transaction waiting for lock

Problem :

The issue what we were getting while Product sync. Whenever any product sync got failed due to any valid issue (product already exists, Product not found) the transaction is not getting closed. As a result even if after correcting, if we try to sync the same or other products all of them getting failed with the same error. We found one workaround that is after restarting SOA Manage Server & DB restart issue is not coming anymore. But again once there is any valid error while product sync, subsequent all request are getting failed.

Cause :

Trnsactions was not getting closed after Throw. As a result all the subsequent request are causing DB_Lock.

Solution :

Ideally timeout parameters should be set as below :

syncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout (JTA timeout) < DISTRIBUTED_LOCK_TIMEOUT

1. SyncMaxWaitTime already tune to 240sec.

 


2. EJB level timeout setting :

BPELActivityManagerBean (300sec)
BPELDeliveryBean (300sec)
BPELDispatcherBean (300sec)
BPELEngineBean (300sec)
BPELFinderBean (300sec)
BPELInstanceManagerBean (300sec)
BPELProcessManagerBean (300sec)
BPELSensorValuesBean (300sec)
BPELServerManagerBean (300sec)

3. JTA time out already set as 360sec also Abandon Timeout Seconds as 400sec.

4. We can increase this more than 360 (more than JTA timeout). We made it 405sec which is just more than Abandon Timeout.

Remove unused files/artifacts from MDS

Whenever we want to delete some files/artifacts from MDS by using below steps we can delete data directly from MDS :

1. Execute wlst.cmd :
--------------------------------------
cd ${ORACLE_HOME}/oracle_common/common/bin

Execute wlst.sh file:
----------------------
wlst.sh


2. Connect to WL Server :
--------------------------------------
connect('weblogic','welcome1','t3://hostname:port')


3. Delete from MDS :
--------------------------------------
deleteMetadata(application='soa-infra', server='soa_server1',docs='/apps/AIAMetaData/##Artifacts Path##')

java.lang.NoClassDefFoundError

java.lang.NullPointerException at oracle.apps.aia.core.eh.InvokeBusinessErrorHandler.process(InvokeBusinessErrorHandler.java:24)

To work around the exception and missing /classes issue associated with the java.lang.NoClassDefFoundError, please take the following steps:  

Firstly check below steps :

> Check to see if aia.jar exists in the SOA CLASSPATH.
> Verify whether or not aia.jar also resides under the "domain/lib" folder.
If aia.jar is present in either location, please remove the aia.jar file from each location and then retest.
If issue is resolved , the following 5 steps is not required.


1) Copy aia.jar located under $AIAHOME/lib to $SOA_HOME/soa/modules/oracle.soa.ext.11.1.1/
2) Use command - jar -xvf aia.jar to extract all of its contents.
3) Create a directory named "classes" under $SOA_HOME/soa/modules/oracle.soa.ext.11.1.1 directory and copy the extracted contents of aia.jar into newly created  "classes" directory.
4) After this you need to run the build.xml file located in the same directory.
5) Remove the aia.jar FROM this location $SOA_HOME/soa/modules/oracle.soa.ext.11.1.1 that is copied in Step 1 (If it exists)
6) Bounce SOA server and then retest.
This should correct the java.lang.NoClassDefFoundError.

Once the above is complete, to address the email notification portion, the following changes are required:

Update the AIAConfiguraitonProperties.xml file with the following changes:

1) Under EH Module properties section
<Property name="EH.HOSTNAME">managedserver1.hostname</Property> <!-- Use one of the SOA Servers instead of Load balancer hostname for this property-->
<Property name="EH.PORT">managedserver1.port</Property>   <!-- Used the SOA Port and not the LBR port for this property-->
2) Upload to MDS
3) Reload using AIA UI.
4) Retest.

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

If still issue not got resolved, please check whether the class file got corrupted not (try to decompile). If got corrupted, please load a new class file 

Monday, 3 February 2014

Add Security Header

Namespace add :

xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

Variable Declaration :

    <variable name="securityContext" element="ns7:Security"/>
    <variable name="userNameToken" element="ns7:UsernameToken"/>
    <variable name="pswd" element="ns7:Password"/>

Assign Security Header :

    <assign name="Assign_WS_Header">
      <copy>
        <from expression="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Siebel/Industry/Comms/ProcessPayableInvoiceXXXXProvABCSImpl}ProcessPayableInvoiceXXXXProvABCSImpl','Routing.billformatter.pwd',false())"/>
        <to variable="pswd" query="/ns7:Password"/>
      </copy>
      <copy>
        <from expression="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Siebel/Industry/Comms/ProcessPayableInvoiceXXXXProvABCSImpl}ProcessPayableInvoiceXXXXProvABCSImpl','Routing.billformatter.username',false())"/>
        <to variable="userNameToken" query="/ns7:UsernameToken/ns7:Username"/>
      </copy>
      <bpelx:insertAfter>
        <bpelx:from variable="pswd" query="/ns7:Password"/>
        <bpelx:to variable="userNameToken"
        query="/ns7:UsernameToken/ns7:Username"/>
      </bpelx:insertAfter>
      <bpelx:append>
        <bpelx:from variable="userNameToken" query="/ns7:UsernameToken"/>
      <bpelx:to variable="securityContext" query="/ns7:Security"/>
      </bpelx:append>
    </assign>
</sequence>

Invocation :

<invoke name="Invoke_test" bpelx:invokeAsDetail="no"
                  inputVariable="Invoke_test_InputVariable"
                  outputVariable="Invoke_test_OutputVariable"
                  partnerLink="billformatter" portType="ns1:Billformatter"
                  bpelx:inputHeaderVariable="securityContext"
                  operation="resendBill"/>
          <assign name="Reply_ResendBillOutput">

Friday, 31 January 2014

MDB EJB’s inside BPEL Server

There are 2 important message driven beans(MDB) in the BPEL server which takes care of handling the requests.

WorkerBean

Oracle BPEL Server uses an MDB called WorkerBean to perform processing of requests. In the case of one-way invocation(durable process) the request to the server is placed in a queue. Inside Oracle BPEL Server, WorkerBean monitors the queue for invocation requests and then it is dequeued and
assigned a new thread for servicing the request

<message-driven-deployment name="WorkerBean">
</message-driven-deployment>


InvokerBean

The invoker bean is used only for nonblocking invoke activities. It depends on the setting of nonBlockingInvoke BPEL Property. This property comes into picture while executing multiple branches of a flow or flowN activity. By default, Oracle BPEL Process Manager executes in a single thread, executing the branches sequentially instead of in parallel. When this property is set to true, BPEL Server spawns a new thread to execute the invocation. InvokerBean is the one which creates new threads to service the request.

<message-driven-deployment name="InvokerBean">
</message-driven-deployment>

The number of threads used by these ejbs has to be taken into account while configuring the number of connections to database. 

Enterprise deployment terminology

Enterprise deployment terminology used :

■ Oracle home: An Oracle home contains installed files necessary to host a specific
product. For example, the SOA Oracle home contains a directory that contains
binary and library files for Oracle SOA Suite. An Oracle home resides within the
directory structure of the Middleware home. Each Oracle home can be associated
with multiple Oracle instances or Oracle WebLogic Server domains.
■ Oracle Common home: This environment variable and related directory path
refers to the Oracle home that contains the binary and library files required for the
Oracle Enterprise Manager Fusion Middleware Control and Java Required Files
(JRF).
■ WebLogic Server home: A WebLogic Server home contains installed files
necessary to host a WebLogic Server. The WebLogic Server home directory is a
peer of Oracle home directories and resides within the directory structure of the
Middleware home.
■ Middleware home: A Middleware home consists of the Oracle WebLogic Server
home, and, optionally, one or more Oracle homes. A Middleware home can reside
on a local file system or on a remote shared disk that is accessible through NFS.
■ Oracle instance: An Oracle instance contains one or more active middleware
system components, for example Oracle Web Cache, Oracle HTTP Server, or
Oracle Internet Directory. You determine which components are part of an
instance, either at install time or by creating and configuring an instance at a later
time. An Oracle instance contains files that can be updated, such as configuration
files, log files, temporary files.
■ failover: When a member of a high availability system fails unexpectedly
(unplanned downtime), in order to continue offering services to its consumers, the
system undergoes a failover operation. If the system is an active-passive system,
the passive member is activated during the failover operation and consumers are
directed to it instead of the failed member. The failover process can be performed
manually, or it can be automated by setting up hardware cluster services to detect
failures and move cluster resources from the failed node to the standby node. If
the system is an active-active system, the failover is performed by the load
balancer entity serving requests to the active members. If an active member fails,
the load balancer detects the failure and automatically redirects requests for the
failed member to the surviving active members. See Oracle Fusion Middleware High
Availability Guide for information on active-active and active-passive systems.
■ failback: After a system undergoes a successful failover operation, the original
failed member can be repaired over time and be re-introduced into the system as a
standby member. If desired, a failback process can be initiated to activate this
member and deactivate the other. This process reverts the system back to its
pre-failure configuration.
■ hardware cluster: A hardware cluster is a collection of computers that provides a
single view of network services (for example: an IP address) or application
services (for example: databases, Web servers) to clients of these services. Each
node in a hardware cluster is a standalone server that runs its own processes.
These processes can communicate with one another to form what looks like a
single system that cooperatively provides applications, system resources, and data
to users.
A hardware cluster achieves high availability and scalability through the use of
specialized hardware (cluster interconnect, shared storage) and software (health
Enterprise Deployment Terminology
Enterprise Deployment Overview 1-3
monitors, resource monitors). (The cluster interconnect is a private link used by
the hardware cluster for heartbeat information to detect node death.) Due to the
need for specialized hardware and software, hardware clusters are commonly
provided by hardware vendors such as Sun, HP, IBM, and Dell. While the number
of nodes that can be configured in a hardware cluster is vendor dependent, for the
purpose of Oracle Fusion Middleware high availability, only two nodes are
required. Hence, this document assumes a two-node hardware cluster for high
availability solutions employing a hardware cluster.
■ cluster agent: The software that runs on a node member of a hardware cluster that
coordinates availability and performance operations with other nodes.
Clusterware provides resource grouping, monitoring, and the ability to move
services. A cluster agent can automate the service failover.
■ clusterware: A software that manages the operations of the members of a cluster
as a system. It allows one to define a set of resources and services to monitor via a
heartbeat mechanism between cluster members and to move these resources and
services to a different member in the cluster as efficiently and transparently as
possible.
■ shared storage: Shared storage is the storage subsystem that is accessible by all the
machines in the enterprise deployment domain. Among other things, the
following are located on the shared disk:
– Middleware Home software
– AdminServer Domain Home
– JMS
– Tlogs (where applicable)
Managed Server homes can also be optionally located in the shared disk. The
shared storage can be a Network Attached Storage (NAS), a Storage Area Network
(SAN) or any other storage system that multiple nodes can access simultaneously
and can read-write.
■ primary node: The node that is actively running an Oracle Fusion Middleware
instance at any given time and has been configured to have a backup/secondary
node. If the primary node fails, Oracle Fusion Middleware instance is failed over
to the secondary node. This failover can be manual or automated using the
Clusterware for Administration Server. For a server migration based scenario,
WebLogic Whole Server Migration is used for automated failover.
■ secondary node: The node that is the backup node for an Oracle Fusion
Middleware instance. This is where the active instance fails over when the primary
node is no longer available. See the definition for primary node in this section.
■ network host name: Network host name is a name assigned to an IP address
either through the /etc/hosts file or through DNS resolution. This name is
visible in the network that the machine to which it refers to is connected. Often,
the network host name and physical host name are identical. However, each
machine has only one physical host name but may have multiple network host
names. Thus, a machine’s network host name may not always be its physical host
name.
■ physical host name: This guide differentiates between the terms physical host
name and network host name. This guide uses physical host name to refer to the
"internal name" of the current machine. On UNIX, this is the name returned by the
hostname command.
Enterprise Deployment Terminology
1-4 Oracle Fusion Middleware Enterprise Deployment Guide for Oracle SOA Suite
Physical host name is used by Oracle Fusion Middleware to reference the local
host. During installation, the installer automatically retrieves the physical host
name from the current machine and stores it in the Oracle Fusion Middleware
configuration metadata on disk.
■ physical IP: Physical IP refers to the IP of a machine on the network. In almost all
cases, it is normally associated with the physical host name of the machine (see the
definition of the physical host name). In contrast to a virtual IP, it is always
associated with the same machine when on a network.
■ switchover: During normal operation, active members of a system may require
maintenance or upgrading. A switchover process can be initiated to allow a
substitute member to take over the workload performed by the member that
requires maintenance or upgrading, which undergoes planned downtime. The
switchover operation ensures continued service to consumers of the system.
■ switchback: When a switchover operation is performed, a member of the system
is deactivated for maintenance or upgrading. When the maintenance or upgrading
is completed, the system can undergo a switchback operation to activate the
upgraded member and bring the system back to the pre-switchover configuration.
■ virtual host name: Virtual host name is a network addressable host name that
maps to one or more physical machines via a load balancer or a hardware cluster.
For load balancers, the name "virtual server name" is used interchangeably with
virtual host name in this book. A load balancer can hold a virtual host name on
behalf of a set of servers, and clients communicate indirectly with the machines
using the virtual host name. A virtual host name in a hardware cluster is a
network host name assigned to a cluster virtual IP. Because the cluster virtual IP is
not permanently attached to any particular node of a cluster, the virtual host name
is not permanently attached to any particular node either.
■ virtual IP: Also, cluster virtual IP and load balancer virtual IP. Generally, a virtual
IP can be assigned to a hardware cluster or load balancer. To present a single
system view of a cluster to network clients, a virtual IP serves as an entry point IP
address to the group of servers which are members of the cluster. A virtual IP can
be assigned to a server load balancer or a hardware cluster.
A hardware cluster uses a cluster virtual IP to present to the outside world the
entry point into the cluster (it can also be set up on a standalone machine). The
hardware cluster’s software manages the movement of this IP address between the
two physical nodes of the cluster while clients connect to this IP address without
the need to know which physical node this IP address is currently active on. In a
typical two-node hardware cluster configuration, each machine has its own
physical IP address and physical host name, while there could be several cluster IP
addresses. These cluster IP addresses float or migrate between the two nodes. The
node with current ownership of a cluster IP address is active for that address.
A load balancer also uses a virtual IP as the entry point to a set of servers. These
servers tend to be active at the same time. This virtual IP address is not assigned to
any individual server but to the load balancer which acts as a proxy between
servers and their clients.

Tuesday, 28 January 2014

Certification Installation

§  Copy newly received certificate to –

/home/oracle/ProdCert 
§  Move to Directory : $ORACLE_HOME/jdk/jre/bin/
Run below script :

keytool -list -keystore /app/oracle/product/fmw/soa/wlserver_10.3/server/lib/DemoTrust.jks -alias dhb

§  Export the existing Certificate -
Run below script: with password : DemoTrustKeyStorePassPhrase

keytool -export -v -file /home/oracle/ ProdCert /dhb_old_20092011.cer -keystore /app/oracle/product/fmw/soa/wlserver_10.3/server/lib/DemoTrust.jks -alias dhb


§  Delete the Old Certificate –
Run below script:

keytool -delete -keystore /app/oracle/product/fmw/soa/wlserver_10.3/server/lib/DemoTrust.jks -alias dhb

§  Keep a backup for Old Certificate.
§  Rename the New Certificate to Old Certificate.
§  Import the New Certificate-

keytool -import -v -file /home/oracle/ProdCert/dhb.cer -keystore /app/oracle/product/fmw/soa/wlserver_10.3/server/lib/DemoTrust.jks -alias dhb

§  Reboot application. (ADMIN,SOA and WLS)

§  Do this activity individually on each node. 

In case need to create the keystore, use below command :

keytool -v -importkeystore -srckeystore /opt/egate/middleware/wlserver_10.3/server/lib/hlrcerts/soapvodafone.p12 -srcstoretype PKCS12 -destkeystore /opt/egate/middleware/wlserver_10.3/server/lib/DemoTrust.jks -deststoretype JKS

Cube_Instance monitoring

select TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS') time,process_id, NVL(Complete,'0') "COMPLETE",NVL(Failed,'0') "FAILED",NVL(Running,'0') "RUNNING" from
(select  process_id
 ,       sum(case when state = '5' then 1 end) as Complete
 ,       sum(case when state = '6' then 1 when state='3' then 1 end) as Failed
 ,       sum(case when state = '1' then 1 end) as Running
  from    ORABPEL.cube_instance where process_id in ('QueryServiceUsageListPortalProvABCSImpl','OnlineProcessPaymentEBF','PaymentEBF')
group by process_id)

Mediator Suspended

select count(*) from MEDIATOR_RESEQUENCER_MESSAGE where ID='202676906AEA11E3BFAB17E0A78B1708';

delete from  MEDIATOR_GROUP_STATUS where GROUP_ID='1-724BMBRM_01'

delete from MEDIATOR_RESEQUENCER_MESSAGE where GROUP_ID='1-724BMBRM_01'

Create AIA Session Manager

===================================================================================================
Create AIA Session Manager
===================================================================================================

Namespace :

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns10="http://siebel.com/webservices"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"

Security Variable :

    <variable name="SystemID" type="xsd:string"/>
    <variable name="SessionToken" element="ns10:SessionToken"/>
    <variable name="SiebelWSHeader" element="ns10:WSHeader"/>

System ID dec :

    <assign name="Assign_SystemID">
      <copy>
        <from expression="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Siebel/Industry/Comms/SubmitOrderSiebelCommsProvABCSImpl}SubmitOrderSiebelCommsProvABCSImpl','Default.SystemID',false())"/>
        <to variable="SystemID"/>
      </copy>
    </assign>

Get ComponentInstanceID() :

<copy>
            <from variable="SystemID"/>
            <to variable="Invoke1_Get_InputVariable" part="payload"
                query="/ns1:GetAIASessionPoolManagerGetRequest/ns1:HostId"/>
          </copy>
          <copy>
            <from expression="ora:getComponentInstanceId()"/>
            <to variable="Invoke1_Get_InputVariable" part="payload"
                query="/ns1:GetAIASessionPoolManagerGetRequest/ns1:InstanceId"/>
          </copy>

Assign annotation :

        <bpelx:annotation>
          <bpelx:general>
            <bpelx:property name="userLabel">
              <![CDATA[ScopeGetSessionToken]]>
            </bpelx:property>
          </bpelx:general>
        </bpelx:annotation>


Siebel Invokation :

    <invoke name="Invoke_Siebel_Service"
            inputVariable="Invoke1_VFQ_spcUSSD_spcOrder_spcProvisioning_spcWF_InputVariable"
            outputVariable="Invoke1_VFQ_spcUSSD_spcOrder_spcProvisioning_spcWF_OutputVariable"
            partnerLink="Siebel_Update_service"
            portType="ns2:VFQ_spcUSSD_spcOrder_spcProvisioning_spcWF"
            operation="VFQ_spcUSSD_spcOrder_spcProvisioning_spcWF"
            bpelx:invokeAsDetail="no"
            bpelx:inputHeaderVariable="SiebelWSHeader"/>


Post Get Assignment :

          <copy>
            <from variable="Invoke1_Get_OutputVariable" part="payload"
                  query="/ns1:GetAIASessionPoolManagerResponse/ns1:SessionToken"/>
            <to variable="SessionToken" query="/ns10:SessionToken"/>
          </copy>
          <copy>
            <from variable="Invoke1_Get_OutputVariable" part="payload"
                  query="/ns1:GetAIASessionPoolManagerResponse/ns1:SessionToken"/>
            <to variable="SiebelWSHeader"
                query="/ns10:WSHeader/ns10:SessionToken"/>
          </copy>

Inside invokation :

bpelx:inputHeaderVariable="SiebelWSHeader"


Release Session :

    <scope name="Scope2" variableAccessSerializable="no" bpelx:skipCondition="string-length(bpws:getVariableData('SessionToken','/ns10:SessionToken'))=0">
     
      <bpelx:annotation>
        <bpelx:general>
          <bpelx:property name="userLabel">
            <![CDATA[ScopeReleaseSessionToken]]>
          </bpelx:property>
        </bpelx:general>
      </bpelx:annotation>


        <assign name="AssignPopulateReleaseSessionPoolServiceVariable">
          <copy>
            <from variable="SystemID"/>
            <to variable="Invoke_Release_AIASessionPoolManager_Release_InputVariable"
                part="payload"
                query="/ns2:ReleaseAIASessionPoolManagerRequest/ns2:HostId"/>
          </copy>
          <copy>
            <from variable="SessionToken" query="/ns10:SessionToken"/>
            <to variable="Invoke_Release_AIASessionPoolManager_Release_InputVariable"
                part="payload"
                query="/ns2:ReleaseAIASessionPoolManagerRequest/ns2:UpdatedSessionToken"/>
          </copy>
          <copy>
            <from expression="ora:getCompositeInstanceId()"/>
            <to variable="Invoke_Release_AIASessionPoolManager_Release_InputVariable"
                part="payload"
                query="/ns2:ReleaseAIASessionPoolManagerRequest/ns2:InstanceId"/>
          </copy>
        </assign>

Dynamic PartnerLink

===================================================================================================
CREATEING Dynamic PartnerLink
===================================================================================================

Variable declaration :

      <variables>
        <variable name="TargetEndpointLocation" type="xsd:string"/>
        <variable name="EndpointReference" element="wsa:EndpointReference"/>
        <variable name="ServiceName" type="xsd:string"/>
        <variable name="PartnerLinkName" type="xsd:string"/>
        <variable name="EBMMsgBpelVariableName" type="xsd:string"/>
        <variable name="EBMMsgPartName" type="xsd:string"/>
      </variables>


Assignment :

<sequence name="Sequence_Create_DynamicPL">
        <assign name="Assign_Create_DynamicPL">
          <copy>
            <from expression="'{http://xmlns.oracle.com/ABCSImpl/Siebel/Industry/Comms/SubmitOrder####ABCSImpl}SubmitOrder####ABCSImpl'"/>
            <to variable="ServiceName"/>
          </copy>
          <copy>
            <from expression="VFQA_USSD_SubmitOrder"/>
            <to variable="PartnerLinkName"/>
          </copy>
          <copy>
            <from expression="'inputVariable'"/>
            <to variable="EBMMsgBpelVariableName"/>
          </copy>
          <copy>
            <from expression="'payload'"/>
            <to variable="EBMMsgPartName"/>
          </copy>
        </assign>
</sequence>


Java embeding for variable assignment :


        <bpelx:exec name="GetTargetEndpointLocation" language="java"
                    version="1.5">
          <![CDATA[java.lang.String serviceName = (java.lang.String)getVariableData("ServiceName");
java.lang.String partnerLinkName = (java.lang.String)getVariableData("PartnerLinkName");
java.lang.String cavsEndpointPropertyName ="Routing."+partnerLinkName+".CAVS.EndpointURI" ;
java.lang.String ebmMsgBpelVariableName = (java.lang.String)getVariableData("EBMMsgBpelVariableName");
java.lang.String ebmMsgPartName = (java.lang.String)getVariableData("EBMMsgPartName");
java.lang.String systemIdBpelVariableName = "SystemID";
java.lang.String targetEndpointLocationBpelVariableName = "TargetEndpointLocation";
java.lang.String routeToCavsPropertyName = "Routing."+partnerLinkName+".RouteToCAVS";
java.lang.String defaultSystemIdPropertyName = null;
java.lang.String targetEndpointLocation = null;
java.lang.String targetID = null;
boolean addAudits = true;

if (addAudits) addAuditTrailEntry("Partnerlink = " + partnerLinkName);

// check configuration for CAVS routing flag
try {
boolean routeToCAVS = java.lang.Boolean.parseBoolean(oracle.apps.aia.core.config.Configuration.getServiceProperty(serviceName, routeToCavsPropertyName));
if (addAudits) addAuditTrailEntry("RouteToCAVS = " + routeToCAVS);
if (routeToCAVS) {
targetEndpointLocation = oracle.apps.aia.core.config.Configuration.getSystemModuleProperty("CAVS", cavsEndpointPropertyName);
if (addAudits) addAuditTrailEntry("Endpoint = '" + targetEndpointLocation + "' selected from configuration property " + cavsEndpointPropertyName);
}
}
catch (oracle.apps.aia.core.config.PropertyNotFoundException e) {
if (addAudits) addAuditTrailEntry("Configuration property " + cavsEndpointPropertyName + " not found!");
}

if (targetEndpointLocation==null || targetEndpointLocation=="") {

// check bpel variable for already retrieved target system Id
try {
targetID = (java.lang.String)getVariableData(systemIdBpelVariableName);
if (addAudits && targetID!=null) addAuditTrailEntry("Using previously stored Target System ID = '" + targetID + "'");
}
catch (com.oracle.bpel.client.BPELFault e) {
}

if (targetID==null || targetID=="") {
// try to get Target system ID from EBM Header
try {
oracle.xml.parser.v2.XMLElement targetIdElement = (oracle.xml.parser.v2.XMLElement)getVariableData(ebmMsgBpelVariableName, ebmMsgPartName, "/*/corecom:EBMHeader[1]/corecom:Target/corecom:ID[text()!='']");
targetID = targetIdElement.getText();
if (addAudits) addAuditTrailEntry("Target System ID = '" + targetID + "', selected from EBM EBM_HEADER");
}
catch (com.oracle.bpel.client.BPELFault e) {
if (addAudits) addAuditTrailEntry("Unable to retrieve Target System ID from message EBM_HEADER");
}
try {
if (targetID!=null && targetID!="") setVariableData(systemIdBpelVariableName, targetID);
}
catch (com.oracle.bpel.client.BPELFault e) {
}
}

if (targetID==null || targetID=="") {
// try to get Target system ID from configuration
try {
defaultSystemIdPropertyName="Default.SystemID";
targetID = oracle.apps.aia.core.config.Configuration.getServiceProperty(serviceName, defaultSystemIdPropertyName);
if (addAudits) addAuditTrailEntry("Target System ID = '" + targetID + "', selected from configuration property " + defaultSystemIdPropertyName);
}
catch (oracle.apps.aia.core.config.PropertyNotFoundException e) {
if (addAudits) addAuditTrailEntry("Configuration property " + defaultSystemIdPropertyName + " not found!");
}
try {
if (targetID!=null && targetID!="") setVariableData(systemIdBpelVariableName, targetID);
}
catch (com.oracle.bpel.client.BPELFault e) {
}
}

if (targetID!=null || targetID!="") {
// try to get EndpointLocation from Configuration

java.lang.String endpointPropertyName = "Routing."+partnerLinkName+"."+targetID+".EndpointURI";
try {
targetEndpointLocation = oracle.apps.aia.core.config.Configuration.getServiceProperty(serviceName, endpointPropertyName);
if (addAudits) addAuditTrailEntry("Endpoint = '" + targetEndpointLocation + "' selected from configuration property " + endpointPropertyName);
}
catch (oracle.apps.aia.core.config.PropertyNotFoundException e) {
if (addAudits) addAuditTrailEntry("Configuration property " + endpointPropertyName + " not found!");
}
}
}

try {
setVariableData(targetEndpointLocationBpelVariableName, targetEndpointLocation);
}
catch (com.oracle.bpel.client.BPELFault e) {
}]]>
        </bpelx:exec>


Header assignment :


        <switch name="Switch_AssignPartnerlinkEndpoint">
          <case condition="string-length(bpws:getVariableData('TargetEndpointLocation'))>0">
            <assign name="AssignPartnerlinkEndpointReference">
              <copy>
                <from>
                  <wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing">
                    <wsa:Address/>
                  </wsa:EndpointReference>
                </from>
                <to variable="EndpointReference"/>
              </copy>
              <copy>
                <from variable="TargetEndpointLocation"/>
                <to variable="EndpointReference"
                    query="/wsa:EndpointReference/wsa:Address"/>
              </copy>
              <copy>
                <from variable="EndpointReference"/>
                <to partnerLink="Siebel_Update_service"/>
              </copy>
            </assign>
          </case>
          <otherwise/>
        </switch>
      </sequence>


Add security Header in invocation :

    <invoke name="Invoke_QA_USSD_SubmitOrder"
            inputVariable="Invoke_QA_USSD_SubmitOrder_Q_spcUSSD_spcOrder_spcProvisioning_spcWF_InputVariable"
            outputVariable="Invoke_QA_USSD_SubmitOrder_Q_spcUSSD_spcOrder_spcProvisioning_spcWF_OutputVariable"
            partnerLink="Siebel_Update_service"
            portType="ns1:VFQ_spcUSSD_spcOrder_spcProvisioning_spcWF"
            operation="VFQ_spcUSSD_spcOrder_spcProvisioning_spcWF"
            bpelx:invokeAsDetail="no"
            bpelx:inputHeaderVariable="SiebelWSHeader"/>

Update EBM header for security

Update EBM header for security add :

SOAP Security Header:

   <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-12" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>weblogic</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome1</wsse:Password>
           <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">1lcj+WbCMlrPyhcud4QxiQ==</wsse:Nonce>
           <wsu:Created>2012-06-05T10:23:26.879Z</wsu:Created>
        </wsse:UsernameToken>
     </wsse:Security>

Load MDS

MDS Export :


1. Execute wlst.cmd :
--------------------------------------
cd ${ORACLE_HOME}/oracle_common/common/bin

Execute wlst.sh file:
----------------------
wlst.sh


2. Connect to WL Server :
--------------------------------------
connect('weblogic','welcome1','t3://hostname:port')


3. Export all files and folders from MDS:
--------------------------------------
exportMetadata(application='soa-infra', server='soa_server1',toLocation='/tmp/MDS', docs='/apps/AIAMetaData/AIAComponents/**')


4. Replace All
--------------------------------------
find ./ -type f  -exec sed -i 's/VQ2AIAAPPSIT.fxvodafone.com/vqaiaapp01/'  {} \;

5. Import
--------------------------------------
importMetadata(application='soa-infra',server='soa_server1',fromLocation='/tmp/MDS/',docs='/deployed-composites/**')



If soa-infra not able to make up. Need to load the same in offline mode.

1. download ShareSoaInfraPartition.ear from internet.
2. connect('weblogic','welcome1','t3://hostname:port')
3. deploy('ShareSoaInfraPartition','ShareSoaInfraPartition.ear',upload='true')
4. importMetadata(application='ShareSoaInfraPartition',server='AdminServer',fromLocation="/app/oracle/Oracle/Test",docs="/deployed-composites/deployed-composites.xml");