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>

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(
at oracle.jbo.server.ConnectionPool.instantiateResource(
at oracle.jbo.pool.ResourcePool.createResource(
at oracle.jbo.pool.ResourcePool.useResource(
at oracle.jbo.server.ConnectionPool.getConnectionInternal(
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 property under the setSOADomainEnv.cmd (In Windows) or (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% -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 ( 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

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 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).