Saturday, June 9, 2012

Deploying SOA Composites

There are three primary ways of deploying a SOA composite application

·         Deploy using Jdeveloper

·        Deploy the SAR file in Oracle Enterprise Manager Fusion Middleware Control Console with the Deploy SOA Composite wizard

·        Use Ant scripts to deploy the SOA composite

As best practice recommendation from oracle :

On Dev environments  JDeveloper should be used for deploying SCA composites. On Test environment use ANT to deploy the SCA composites. On Pre-Prod/UAT/Prod environments, use Oracle Enterprise Manager to deploy the SCA composites.

 

 

 

Exception Handling Best practises in SOA Composites

Never Develop/Deploy a BPEL process without any Exception handler attached to the main scope or a Fault Policy attached to the process. At least the “catch all” branch must be present to catch the faults that occurred in the process(if not for specific ones)  or the same must be handled in the Fault Policy files.

 

Monday, March 8, 2010

Changing Oracle Soa Suite Password for oc4jadmin user

Today , i got stuck at something. After a long time , i started my  local SOA suite and went to log in to the em , to find that i had forgotten the oc4jadmin password.After going through many forums , found this useful information.

To reset the password ,

1. Stop the application server

2. Open the file <ORACLE_HOME>\j2ee\home\config\system-jazn-data.xml


3. Locate the following lines
   
             <user>
                <name>oc4jadmin</name>
                <display-name>OC4J Administrator</display-name>
                <guid>0BF5F200BED611DEBFF009542E70BEF5</guid>
                <description>OC4J Administrator</description>
                <credentials>{903}az65wT6YFcIuCWFAF8MewMy7qHLkUzFMk+bZ1WPztOk=</credentials>
            </user>

4. Replace the credentials node with with  : !newpassword123 (Follow the default password rules.Also there must be a '!' in front  of the new password)

5. Start the application server

6. Log in to EM

7. It will throw RMI error and will ask to store the new password

8. Input the new password  and you will be taken to the landing page

Tuesday, February 2, 2010

Domain level Logging configuration in Oracle BPEL Console


This  blog is regarding how to set audit levels in the BPELConsole , so that you can toggle between system performance and information required as a part of performance tuning the BPEL processes


These are four logging levels available through BPELConsole
  • off
  • minimal
  • production
  • development

Go the particular domain you want to configure and then click on the 'Configuration' tab
In the Domain sub tab , there is a editable property (Depend on the access level set to your user , it might be editable or non editable) auditLevel.

This is the description that oracle has  given alongside the property

Controls the amount of audit events logged by a process; currently supported logging levels are:
off - absolutely no logging performed whatsoever; may result in a slight performance boost for processing instances.
minimal - all events are logged; however, no audit details are logged.
production - all events are logged. The audit details for assign activities are not logged; the details for all other nodes are logged.
development - all events are logged; all audit details for all actitivies are logged.
The default value is "development".



When we set the property to 'development' , we can see all the the logging that is possible - both instance level and payload level.
This is ideal for a development environment where the debugging required is high.The activities contain payload data , like the one below



Using this in production is not advisable , but yet i have used this for momentary tracking / debugging.

Using 'production' is the optimal level for a production environment . When you use this , the audit trail doesn't show any payload.The assign activities (assign , transform etc) don't show any details like the down below.





When i set this to Minimal,ZERO audit details are logged but All the events are logged.Look the below screen shot.None of the audit in any activity can b seen , but we can see all the events !!






Off : nothing is logged.. Use this if your server has minimum configuration but the transaction you need to handle is more !!
      Not advisable as it will be like roaming in a sea without a compass.But yet , if you have a robust development cycle  then this can be used , just like a well known sailor who knows the depth and directions in a sea

Sunday, January 10, 2010

Generating artifacts for invoking a stored procedure in MSSQL server and IBM DB2


  1. Set the operating system classpath to contain the following java library  files found in jdeveloper installation
    1. ocrs12.jar
    2. ojdbc14.jar
    3. ojdbc14dms.jar
    4. orai18n.jar
    5. sqljdbc.jar
    6. DBAdapter.jar
    7. bpm-infra.jar
    8. orabpel.jar
    9. xmlparserv2.jar
    10. xschema.jar
    11. toplink.jar



    eg : set classpath=%classpath%;d:\jdevstudio10134\jdbc\lib\ocrs12.jar; d:\jdevstudio10134\jdbc\lib\ojdbc14.jar; d:\jdevstudio10134\jdbc\lib\ojdbc14dms.jar; d:\jdevstudio10134\jdbc\lib\orai18n.jar; d:\jdevstudio10134\jdbc\lib\sqljdbc.jar;

Note: If any of the jar is missing in the jdeveloper/SOA suite installation, the jar can be downloaded from http://www.findjar.com/


  1. Prepare the properties file that will be consumed by the java tool

The properties file should have

ProductName=<Database product>
DriverClassName=<Driver to be used>
ConnectionString=<JDBC Connection String>
Username=<username here>
Password=<password here>
DatabaseName=<MSSQL database>
SchemaName=dbo
ProcedureName=<name of the procedure here>
ServiceName=<Service name. This will be the name of the wsdl generated and referenced>
DatabaseConnection=<OC4Jra.xml connection string that the artificat will use>





Eg : dbname.Properties

ProductName=Microsoft SQL Server
DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
ConnectionString=jdbc:sqlserver://xx.xx.xx.xx:xxxx;databaseName=dbname
Username=dbusername
Password=XXXXX
DatabaseName=dbname
SchemaName=dbo
ProcedureName=spiCSIncidentTaskFromSOA
ServiceName=srv_CSTask
DatabaseConnection=eis/DB/dbname


3. Use the below command to generate artifacts using the above properties file


C:\Jdev10.1.3.4\integration\lib>java oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts dbname.Properties


  1. The tool will generate two WSDL file and  an XSD
  2. Import the Project WSDL into the BPEL Project
  3. Create a partner link for the imported wsdl
  4. Create a Invoke activity and map it to the new partner link

Wednesday, April 1, 2009

Oracle SOA Suite Dehydration Store Tables

These are the important table of Oracle SOA Suite dehydration store that are used to capture the Meta Data. A brief description of the table is also given.


WFTask
This table is Metadata table for workflow tasks
Process
This is the meta data table for information about the processes that are deployed in oracle application server.
WFTaskHistory
This table stores the history of the workflow tasks. The OUTCOME table will give you the details of the outcome the ASSIGNEE has chosen for each revision of the task.
Domain
This table contains the domain reference number that is created for every domain.
domain_properties
All the domain level properties that are modified in the BPEL CONSOLE are actually stored as values here.
suitcase_bin
Every suitcase that is deployed in the SOA server is stored in the binary format in the Bin column of this table.
process_log
Any process maintenance work (marking as default, Compiling etc) are logged in this table. This table is used for scouting for any issues with processes.
test_details
The test suite details are stored in this table.


These are the important table of Oracle SOA Suite dehydration store that are used to capture the Transactional Data. A brief description of the table is also given.

Table
Description
CUBE_INSTANCE
This table contains the instance wise information for every instance that is being initiated. The CIKEY is the primary key of the table and this is the unique reference for a initiated instance. The DOMAIN_REF is used to refer the domain in which the initiated process belongs to. The PROCESS_ID gives the name of the process. The revision tag denotes the version of the process. The CREATION_DATE denotes the date in which the instance is created. The STATE denotes whether the instance is stale/completed successfully/error. The CONVERSATION_ID is an identifier that is used in correlation of instances in WS-Addressing. This can also be used in identifying an instance. The PARENT_ID is used to denote the CIKEY of the parent instance that initiated this process(if any).
CUBE_SCOPE
The SCOPE_BIN column of this table is used to store the values of all variables declared in BPEL process and it values currently in runtime.
DLV_MESSAGE
This table is an important part of correlation that occurs in BPEL. All incoming message’s metadata is stored in this table.
DLV_MESSAGE_BIN
This table is an important part of correlation that occurs in BPEL. All incoming message’s payload is stored in this table.
INVOKE_MESSAGE
This table is an important part of correlation that occurs in BPEL. All outgoing message’s metadata is stored in this table.
INVOKE_MESSAGE_BIN
This table is an important part of correlation that occurs in BPEL. All outgoing message’s payload is stored in this table.
AUDIT_TRAIL
This table is used to store information of the xml that is rendered in the BPEL Console. The LOG column has this xml.

TASK
This table concerns with the human task that are created. Every task that is created is logged in this table. The ASSIGNEE denotes the user to whom the task is assigned.





The below are the values of the STATE column of the CUBE_INSTANCE table.
I use this extensively to monitor current status of the queue.
0 --> initiated
1 --> open and running
2 --> open and suspended
3 --> open and faulted
4 --> closed and pending
5 --> closed and completed
6 --> closed and faulted
7 --> closed and canceled
8 --> closed and aborted
9 --> closed and stale


Hope I don’t need to write SQL queries. You can frame with the all the data provided to monitor. These tables can also be used through BPEL API’s to design custom accesses.