Showing posts with label SOA10g. Show all posts
Showing posts with label SOA10g. Show all posts

Tuesday, October 11, 2011

View stale Instances in SOA 10g/11g - Update

I just had a comment from one of my readers. The comment had a question if the instances could be recovered by deploying the same version of the composite. I had another blog post on the state of bpel instances.

I tried changing the state from 9 to 5 in the CUBE_INSTANCE and could see the instance become active. I tried this in 11g and it worked. This can be used in 10g to recover the stale instances.


Cheers,
-AR

Monday, July 12, 2010

Deploying Oracle BRM JCA Adapter for Oracle AIA

This particular post would be useful for those working on Oracle SOA Suite 10g and having the stack Siebel, AIA and BRM. In the stack where there is Siebel, AIA and BRM, AIA invokes BRM through the JCA Adapter. This JCA Adapter is provided by the BRM Team. The JCA Adapter is responsible for converting the xml given by AIA to the input flist of BRM. The JCA Adapter also does a basic field level validation of the input xml with the opcode being called. This JCA Adapter is deployed in the middleware layer, using the Oracle SOA Suite’s EM Console.

Please do the following to deploy the JCA Adapter:

  1. Modify the application.xml: Go to $ORACLE_HOME/j2ee/$OC4J_CONTAINER/config and Modify the imported-shared-libraries to contain the oracle.bpel.common library also. Modify the imported-shared-libraries to contain the below entry:

    <import-shared-library name="oracle.bpel.common" />

    The imported-shared-libraries after the change will look as below:

    <imported-shared-libraries>
    <import-shared-library name="adf.oracle.domain" />
    <import-shared-library name="oracle.bpel.common" />
    </imported-shared-libraries>


  2. Deploy the JCA Adapter: Get the latest JCA Adapter from BRM, go to EM Console and navigate to oc4j_soa. Go to Applications tab, select Standalone Resource Adapters from the View drop down option and Choose Deploy, to deploy the BRM JCA Adapter. While deploying if the JCA Adapter is placed on the server directly, choose the option of location as Location on Server or if the JCA Adapter is present in the workstation, choose the option of browsing the file from the workstation. Choose Automatically create a new deployment plan option (Step 1/3), choose next, give a name for the Resource Adapter (Step 2/3) and make no changes in the Deployment Settings tab (Step 3/3). Click Return on successful deployment of the adapter.
  3. Create Connection Factory: Click on the JCA Adapter that was just deployed from Standalone Resource Adapters. Click on Connection Factories tab (need to create a Shared Connection Pool before we define the Connection Factory). So, click on Create option under Shared Connection Pools to create one. Create a connection factory using the shared connection pool that has been created. In JNDI Location, issue eis/BRM, choose Use Shared Connection Pool under Connection Pooling and change the Connection String to ip $BRMIPAddress $BRMPort, Username and Password of the BRM user that SOA Suite will use.
  4. Restart JCA Adapter: Stop the JCA Adapter by navigating to Standalone Resource Adapters and choosing the adapter.  Once stopped, start the JCA adapter from the same location.

Peace !

Cheers,
- AR

Monday, June 28, 2010

SOA Transactions - A very good reference and read

I was reading some random blog posts on OWSM 11g when, in one of the posts, I found this link to Oracle blogs. The blog has two parts and has covered the SOA transactions very nicely. The blog has been explicated in a simple, easy to understand manner. The transactions has been explained keeping in mind SOA11g. I guess there would not be a huge difference when this is applied to 10g. The links are below:

Part One and Part Two


Peace !

Cheers,
-AR

Thursday, June 17, 2010

Extract Composite Audit Trail from database table as XML

After I had done some reading on the database tables that were used for storing the instance details, I did find some information from Oracle forums to use the composite instance id to extract the audit xml from the database tables. A function had to created in the database under the same user (preferably) i.e. SOAINFRA. In case of 10g, to view the BPEL audit xml, create the function in ORABPEL. The function will take composite instance as input and return the audit as BLOB, through a query.

Function be created:

CREATE OR REPLACE FUNCTION get_audit_trail_log(cikey IN INTEGER) RETURN blob IS
--
CURSOR c_log(l_cikey INTEGER) IS
SELECT *
FROM audit_trail atr
WHERE cikey = l_cikey
ORDER BY count_id;
--
bl BLOB;
BEGIN
dbms_lob.createtemporary (bl, TRUE);
FOR r_log IN c_log(cikey)
LOOP
dbms_lob.append (bl,r_log.log);
END LOOP;
--
RETURN(bl);
END;


Query to fetch the details of an instance (instance id = 51560794):

SELECT UTL_COMPRESS.LZ_UNCOMPRESS(get_audit_trail_log(ci.cikey))
FROM cube_instance ci
WHERE ci.cikey = 51560794


To read more on this, visit the Oracle Forums where this thread is available.


Peace!

Cheers,
-AR

Wednesday, June 16, 2010

Database tables used to store the instance details

I was working on a task this week, where I had to extract the RAW xml in the audit tab of an instance. Since all the details that are rendered on the BPEL console are from the database, I started to explore some details on the tables used in SOA. The tables are more or less common to 10g as well as 11g, which very little variations. I was going though some of the tables present in the database and below is the information I gathered.  I have shown below some non empty and key fields from the table. There are more fields available in the table and can be viewed from the database:

CUBE_INSTANCE
This table stores the basic information of an instance such as State, Domain name, Composite name, composite revision, Component name etc. A CI Key is created for every Composite Id and the CI key is used in other tables as the reference




CUBE_SCOPE
It stores the data available in the scope of an instance like the bpel variables that have been created, values of those variables etc.




AUDIT_TRAIL
This stores the complete the audit trail of an instance, provided the auditDetailThreshold is not reached. If the auditDetailThreshold is reached, the details are spilled to audit_details table. The instance details are stored in the RAW format and you would have to join the columns together and uncompress the RAW format to view in the readable xml format. The column LOG contains the RAW message




AUDIT_DETAILS
The details like the assign activities are stored here. The information that goes into the audit tables are determined from the auditLevel property set in the domain or for a composite


The difference between 10g and 11g is that, as far 11g is concerned, the EM is one stop for viewing all instances. So instances are stored in the tables mentioned above in the schema SOAINFRA. The Mediator instances can be viewed in the MEDIATOR_INSTANCE, MEDIATOR_* in the same schema. On the other hand, 10g had separate tables for tracking BPEL and ESB instances. The tables mentioned above are used for storing bpel instance details and can be found under the schema ORABPEL. The ESB instance deatils are stored in the tables mentioned below and can be found under ORAESB schema:

ESB_ACTIVITY, ESB_TRACKING_FIELD_VALUE, ESB_FAULTED_INSTANCE, ESB_TRANSACTION_STATUS

There are some interesting links that provide details on these tables. Some of them are below:

Tables used in BPEL instance tracking
Oracle Cookbook for SOA 10g
Table used in SOA 10g ESB instance tracking

Peace!

Cheers,
-AR

Monday, June 14, 2010

View stale Instances in SOA 10g/11g

If you had re-deployed a BPEL Process in 10g, the instances that were available before the re-deployment, would have become stale (grayed out) and you would not be able to see the Flow/Audit Trail. There will be an error stating "revision for the instance # was not loaded by the domain...XXProcess revision 1.0 may have been deleted from the domain manually; in this case the domain would not have been able to mark all instances belonging to the process as stale". You can however, view the instance by clicking on "View Raw XML" from the audit table, in the XML form.

In 11g, this problem seems to have been overcome. The instances of the composite can be viewed from the Audit Trail/Flow tab even though the instance has been marked "Stale", like seeing any active instance of a composite.

Peace!

Cheers,
-AR

Wednesday, June 9, 2010

Error during composite deployment due to lack of space

I have faced this error in 10g and I faced it in 11g yesterday. The composite was not getting deployed and it was throwing the below error. It took sometime for me to re-collect that I had already faced this in 10g. Eventually I did and checked the space in the machine hosting the domain and free space was 0%. I cleared some space and bounced the server. The deployment went just fine..

[06:27:08 PM] Error deploying archive sca_JMSConsumerService_rev2.0.jar to soa_server1 [10.132.214.255:7504] 
[06:27:08 PM] HTTP error code returned [500]
[06:27:08 PM] Error message from server:
Error during deployment: Error occurred during deployment of component: JMS_Consumer to service engine: implementation.bpel, for composite: JMSConsumerService: ORABPEL-05250
Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/opt/apps/wls01/user_projects/domains/soa_domain/deployed-composites/JMSConsumerService_rev2.0/sca_JMSConsumerService_rev2.0/3e5eea29-29c3-426d-94e9-e4263b0d30bd"; the exception reported is: java.lang.RuntimeException: Couldn't make directory /opt/apps/wls01/user_projects/domains/soa_domain/deployed-composites/JMSConsumerService_rev2.0/sca_JMSConsumerService_rev2.0/3e5eea29-29c3-426d-94e9-e4263b0d30bd/SCA-INF/bpel/JMS_Consumer
This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
[06:27:08 PM] Check server log for more details.
[06:27:08 PM] Error deploying archive sca_JMSConsumerService_rev2.0.jar to soa_server1 [10.132.214.255:7504] 
[06:27:08 PM] ####  Deployment incomplete.  ####
[06:27:08 PM] Error deploying archive file:/C:/JDeveloper/mywork/AIAPOC/JMSConsumer/deploy/sca_JMSConsumerService_rev2.0.jar
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


Check for space in the machine when you face a BPEL suitcase error.

Peace !

Cheers,
-AR
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License