Friday, April 29, 2011

Migrate Oracle BAM Reports and DO across environments 11.1.1.4

Today, I am blogging on the migration of Oracle BAM reports and Data Objects across environments.

First we should export the built BAM reports and data objects as XML objects from the development environment. ICommand utility bundled with Oracle SOA suite comes in handy for this purpose.

1. Ensure that the server on which Oracle BAM reports are available is up & running as the ICommand utility extracts the reports/data objects from the MDS store

2. If you have developed the BAM reports under the 'Shared Reports', issue the following icommand in the command prompt/terminal window;

change directory to \Oracle_SOA1\bam\bin

icommand -CMD EXPORT -NAME "/public/Report/Samples/<>" -TYPE report -file Report.xml

If the BAM report is available under 'My Reports' folder, then issue the following command;

icommand -CMD EXPORT -NAME "<Report Name>" -TYPE report -file Report.xml

OR

./icommand -CMD EXPORT -NAME "/private:weblogic/Report/<Report Name>" -TYPE report -file Report.xml

Note that the /private:weblogic/Report must be used to qualify the report export with a admin user privilege.

This will generate Report1.xml under the bin directory.

To export a data object issue the following icommand;

icommand -CMD EXPORT -NAME "/Samples/Monitor Express/<>" -file DO.xml

This will generate DO.xml under the bin directory.

Transfer the generated xml files to the destination server (As per the following example, the xmls are migrated into the bin directory)

3. Now, login to the server where the exported BAM reports and DOs should be installed

4. Ensure that the server is up & running. Change directory to \Oracle_SOA1\bam\bin

5. Issue the following icommand to import the DO & report XMLs

icommand -CMD IMPORT -file DO.xml
icommand -CMD IMPORT -file Report1.xml
 
Wait for the success message and verify the successful import of 
reports & DOs in the destination server
 

Friday, April 8, 2011

BEA-280101 Persistent File Store using Bufferd I/O

While installing the Oracle SOA suite 11g on a 64-bit environment (using a 64-bit JVM), 64-bit native server libraries are created automatically in the Middleware home. However, these may not get referenced during the SOA domain startup. As a result of this, you may encounter the following Weblogic 'Warning' message in the server logs. Although being a warning message that our intuition immediately asks to ignore, this particular warning makes us inquisitive as it threatens of a 'Significantly degraded performance'.

<BEA-280101> <The persistent file store "_WLS_xxxdomain" is forced to use buffered I/O and so may have significantly degraded performance. Either the OS/hardware environment does not support the chosen write policy or the native wlfileio library is missing. See store open log messages for the requested and final write policies. See the documentation on store synchronous write policy configuration for advice.>

To overcome this Weblogic warning, ensure that the generated 64-bit native libraries are referenced during server start-up.

Go to <Middleware_Home>\user_projects\domains\<SOA Domain>\bin\SetSOADomainEnv.cmd  (or SetSOADomainEnv.sh if Linux) and add the -Djava.library.path to JAVA_OPTIONS as shown below;

set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.library.path=<Middleware_Home>\wlserver_10.3\server\native\win\x64 [Depending on whether your OS is Windows or Linux the path might slightly change]

After performing the above configuration, restart the server and Weblogic warning should now disappear.

Sunday, March 20, 2011

Oracle BPM 11g ORABPEL-02118 Variant not found Exception

While modelling the BPM workflow, there might be few service tasks to call external services. These services would essentially be referenced in the SCA composite.xml (External References Swim Lane). These would then be wired to the BPMN workflow when the service task is added on the BPM process and the service is referred. Until this moment everything is fine as expected.

However, when the external service definitions change, we will have to rebuild/refresh the adapters in the SCA so that the service definition changes are reflected properly. Now, everything seems good but at run-time, the process throws ORABPEL-02118 Variant not found exception (Detailed exception looks as below)

<Error> <oracle.soa.bpel.engine.dispatch> <BEA-000000> <failed to handle message
ORABPEL-02118 Variant not found.
The variable "Services.Externals.UpdateDBRecord.reference" is not declared in the current scope. All variables must be declared in the scope before being accessed.
This was an internal error. The flow was not generated correctly by the BPMN compiler.
Contact Oracle Support Services. Provide the error message, the composite source, and the exception stack trace in the log files (with the logging level set to debug mode).

On closer look at the Composite.xml we can notice that the wiring between the service adapters and BPMN workflow component missing. This is an intermittent issue. Solution would be to manually add the 'wiring' information into the Composite.xml and re-deploy. [Where UpdateDBRecord is the external service referenced]

<wire> <source.uri>BPMProcess/Services.Externals.UpdateDBRecord.reference</source.uri>
<target.uri>UpdateDBRecord</target.uri>
</wire>

Wednesday, March 16, 2011

ADF Runtime DB Connection Error

While creating an ADF Fusion Web Application with a database datacontrol, the following error is encountered while running the application.

oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:253)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:168)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:546)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:327)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:104)
Truncated. see log file for complete stacktrace
java.sql.SQLException: ORA-01005: null password given; logon denied

This is because, the ADF model project fails to register the password with the app server which cause this SQL exception.

In order to overcome this error, edit the EXTRA_JAVA_PROPERTIES and append -Djps.app.credential.overwrite.allowed=true property under the setSOADomainEnv.cmd (In Windows) or setSOADomainEnv.sh (In Linux) file as follows. This file will be located under <<Middleware_Home>>\user_projects\domains\<Your_Domain_Name>\bin folder.

set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Djps.app.credential.overwrite.allowed=true -da:org.apache.xmlbeans...

Restart the Oracle Weblogic server.

Friday, March 11, 2011

Weblogic 10.3.4 Installation & Configuration on 64-bit windows

Today, I am going to explain the installation steps & configuration of Oracle Weblogic 10.3.4 for SOA suite 11g (11.1.1.4) in a 64-bit windows environment. Because, of late, I have been seeing a lots of queries in forums with same query/issue (BEA-000438: loading performance pack issue) with no relevant answers. Probably this post would help in resolving all the issues;

1. First things first; Ensure that you download the correct version of the Weblogic installer (wls1034_generic.jar)
2. Download the 64-bit JDK/JRE of Oracle Java (Latest version on date is jdk-6u24-windows-x64.exe)
3. The generic 64-bit Weblogic installer doesn't come bundled with a 64-bit JVM. Hence install the Java downloaded in step 2 on your windows environment. Care must be taken to ensure that the default installation directory (C:\Program Files) is changed - Catch here is that Weblogic doesn't recognize WELL the Java installation directory with a space in folder name. So be sure to install the Java in a folder path where none of the folder names have a space (Eg. C:\Java)
4. Now from the command prompt, execute the following command to install the Weblogic 10.3.4 64-bit;
java -D64 -jar wls1034_generic.jar
[-D64 ensures that the weblogic installation is going to be on the 64-bit JDK.]
5. Follow steps to install the Weblogic 10.3.4 server - Installation will prompt for the JDK selection, choose C:\Java (You will find this information in documentation)
6. Now, when you start the server, you may find the following error;


<Error> <Socket> <BEA-000438> <Unable to load perf
ormance pack. Using Java I/O instead. Please ensure that wlntio.dll is in: 'C:\O
racle\fmwhome\wlserver_10.3\server\native\win\32;C:\Oracle\fmwhome\wlserver_10.3
\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Oracle\fmwhome\wlserver_10.3\serve
r\native\win\32\;C:\Oracle\fmwhome\wlserver_10.3\server\bin;C:\Program~\Java\jdk
1.6.0_24\jre\bin;C:\Program~\Java\jdk1.6.0_24\bin;C:\Oracle\fmwhome\wlserver_10.
3\server\native\win\32\oci920_8;C:\oraclexe\app\oracle\product\10.2.0\server\bin
;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem'

7. Go to the following location <<Weblogic_Home_Directory>>\wlserver_10.3\server\native\win\x64. Copy the wlntio.dll file and paste it under C:\Java\bin directory (if you have choosen to install Java in C:\Java).
8. Now, start the server and the error must be gone - Performance pack is now loaded in Weblogic 10.3.4

Friday, March 4, 2011

Oracle SOA Suite 11g Flex Fields

Hello All,
Its been a long time since I wrote a blog entry and the rather elaborate pause was due to lots of travelling around. Now I am back and hopefully will blog on latest Oracle FMW techniques that I find interesting or worth sharing.

In this blog, I am going to demonstrate the concept of Flex Fields in Oracle SOA suite 11g. The latest release is 11.1.1.4. Flex Fields are one of the useful features available for a manual/human task activity where the worklistapp user will be able to search for a task available under his 'Tasks' based on a value from the payload. This sounds really interesting because, if the user has huge list of tasks and wants to attend to few tasks on priority (probably based on the PO amount) - Flex Fields comes handy to help.

While defining a human task activity under the SCA composite, add the parameters under the data tab, which has to be made available as flex fields for the user. Define the parameters as simple types (Complex type parameters are not supported as flex fields). We will assign values to these parameters from the payload request in the BPEL process. Under the assignments tab, create a role and assign the task to be handled by the user (eg., weblogic, jcooper) and complete the definition.

Under the BPEL process drag drop the human task activity into the process flow from the SOA constructs panel and map the human task to the activity we defined earlier in the composite. This human task activity will also ask for parameter value definition that we defined as flex field params - Map the variables from payload appropriately to these flex fields.

Now, lets perform the critical piece of assigning the payload variables (that are required as flex fields) to the systemManagedAttributes. This will help in defining the labels for the flex fields in the BPM worklistapp which can be shown to the user for performing a search. Expand the human task activity and in the first assign node, create a copy operation and assign the payload variables to the /task:task/task:systemManagedAttributes/task:textAttribute1. [Important thing to note is Oracle SOA provides set of system attributes in various datatypes such as text, number, date, url etc.. We should be mapping our payload variables to appropriate datatype attributes]. Save and deploy the composite.

We now have to perform a final mapping in the BPM worklistapp in order to define the labels for the flex fields. Login as weblogic user into the BPM worklistapp and click on administration link. Select 'Public Flex Fields' in the left panel and search for the human task for which the flex fields must be defined (Edit Mappings for task link) . This will bring up the map attributes page where we can create labels for the flex fields. These have to be mapped to the systemManagedAttributes [Remember the assign copy operation where we assigned the payload variables to the systemManagedAttributes]. Once done for all flex fields, save and close.

Try creating an instance of the process and when the tasks come into the BPM worklistapp for the user, the user will be able to search the tasks based on the flex field values. Some more sophistication can be achieved by way of advanced search where the labels will appear as search criteria and different logical conditions can be used to perform the search. (For eg. PO Value - greater than - 50000 will show all tasks whose PO value is > 50000).

Sunday, October 4, 2009

Oracle BPEL Correlation Exemplified

Correlation is one of the important & tricky technique available within Oracle BPEL PM. In this blog, I have taken a simple route to explain the correlation technique.

Synchronous & Asynchronous web services:

Whenever a synchronous web service is invoked from Oracle BPEL via a partnerlink, only one port is established for communication with the exposed web service which is used by both request & response messages.
However, when an asynchronous web service is invoked, two ports are opened for communcation: one for request & one for response messages.

How does Oracle BPEL identify asynchronous responses?

As response from an asynchronous web service is not guaranteed to be received within a specified time frame, and many instances of the same service might be invoked before even a response can be obtained, how does Oracle BPEL identify and relate the responses to the appropriate requests and proceed for completion of further activities that may be scheduled? The answer is "WS-Addressing".

What is WS-Addressing?

WS-Addressing is a transport-neutral mechanism by which web services communicate addressing information. SOAP envelopes & headers used within web services for transporting data throught transport layers like HTTP does not possess intelligence to specify unique addressing information. Hence, WS-Addressing evolved which contained endpoint references (EPR) and message information headers for identification. This information is processed independently of the transport mechanism or application.
For reference on WS-Addressing click here

By default, Oracle BPEL PM implements WS-Addressing for all asynchronous web service calls, hence we don't have to explicitly implement identification relationship between the incoming & outgoing messages.

Correlation:

In short, Correlation is a BPEL technique which provides correlation of asynchronous messages based on the content of the message.

Why & Where Correlation?

The following are few scenarios in which we would be required to implement Correlation to identify & relate message communication;
1. When the external web service called doesn't have WS-Addressing capability
2. When the message travels through several services and response is solicited by the initial service from the last service directly
For instance, request flow pro1 -> pro2 -> pro3 and response is received from pro3 ->pro1

Implementing Correlation:

a.) Creating Correlation Sets:

In Structure Window of the JDeveloper IDE, right click on the Correlation Sets and choose 'Create Correlation Set'
Provide a name for your correlation set being created.
In the properties section, select 'Add' to display the property chooser window
Choose 'Create' to create a property on which the correlation has to be initiated. Provide a name and type for the property.

b.) Associating the Correlation set on receive/invoke, pick activities

Go the the correlations tab on the activity (invoke/receive/pick) on which you need to set & validate the correlation
Add the created correlation set to the activity

Initiate Attribute: (Value Set - yes, no)
When set to yes, correlation set is initiated with the values of the properties available in the message being transferred
When set to no, correlation set validates the value of the property available in the message

Pattern Attribute: (Value Set - in, out, in-out)
When the value is 'in', it means that the correlation property is set/validated on the incoming message
When the value is 'out', it means that the correlation property is set/validated on the message going out of BPEL
In case of 'in-out', the property will be set/validated on both incoming & outgoing messages

c.) Creating Propery Alias:

In the Structure Window of the JDeveloper, right click on the 'Property Aliases' and select 'Create Propery Alias'
Select the message type that you want to set to the correlation propery (already created)

Now, correlation design is complete. However, correlation will not be established unless we reference the correlations on the WSDL file of the BPEL process. To do this, import the correlation WSDL file (created under the project) in the BPEL process main WSDL.