The Server Labs Blog Rotating Header Image


ALSB/OSB customization using WLST

One of the primary tasks in release management is environment promotion. From development to test or from test to production, environment promotion is a step which should be as much automated as possible.

We can use the service bus MBeans in WLST scripts to automate promotion of AquaLogic/Oracle Service Bus configurations from development environments through testing, staging, and finally to production environments.

Each environment has particularities which may need changes in configuration of the software. These are usually centralized in property files, database tables, environment variables or any other place to facilitate environment promotion.

In AquaLogic/Oracle Service Bus there is the concept of environment values:

Environment values are certain predefined fields in the configuration data whose values are very likely to change when you move your configuration from one domain to another (for example, from test to production). Environment values represent entities such as URLs, URIs, file and directory names, server names, e-mails, and such. Also, environment values can be found in alert destinations, proxy services, business services, SMTP Server and JNDI Provider resources, and UDDI Registry entries.

For these environment values, we have different standard operations

  • Finding and Replacing Environment Values
  • Creating Customization Files
  • Executing Customization Files

However, these operations are limited to the ‘predefined fields whose values are very likely to change’… and what happens if we need to modify one of the considered ‘not very likely’? A different story is whether to consider SAP client connection parameters ‘not very likely’ to change in a environment promotion from test to production…

In order to automate these necessary changes, one option is to modify directly the exported configuration prior to importing it to the destination environment but in our case, we want to maintain the philosophy of the customization after the importing, keeping the exported package untouched. We will try to use a WLST script instead of a customization file, as the later doesn’t satisfy our needs.

The first thing we have to do for using WLST is to add several service bus jar files to the WLST classpath. For example, if we have a Windows platform we add the following at the beginning of wlst.cmd file (I’m sure *nix people will know how to proceed in their case)

For Aqualogic Service Bus 3.0:

SET ALSB_HOME=c:\bea\alsb_3.0
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-api.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-common.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-resources.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-impl.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\..\modules\com.bea.common.configfwk_1.1.0.0.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\..\modules\com.bea.alsb.statistics_1.0.0.0.jar

For Oracle Service Bus 10gR3:

SET ALSB_HOME=c:\bea\osb_10.3
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-api.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-common.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-resources.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\lib\sb-kernel-impl.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\..\modules\com.bea.common.configfwk_1.2.1.0.jar
SET CLASSPATH=%CLASSPATH%;%ALSB_HOME%\..\modules\com.bea.alsb.statistics_1.0.1.0.jar

In our example, we will try to change the HTTP timeout in the normalLoanProcessor business service present in ALSB/OSB examples server.


normalLoanProcessor configuration

For that, we will first connect to the bus from WLST and open a session using SessionManagementMBean

from import SessionManagementMBean
connect("weblogic", "weblogic", "t3://localhost:7021")
sessionMBean = findService(SessionManagementMBean.NAME, SessionManagementMBean.TYPE)
sessionName = "mysession"

mysession shown in sbconsole

Nothing new until now. Next thing we need is a reference to the component you want to modify. We chose to use a BusinessServiceQuery like:

from import BusinessServiceQuery
from import ALSBConfigurationMBean
bsQuery = BusinessServiceQuery()
alsbSession = findService(ALSBConfigurationMBean.NAME + "." + sessionName, ALSBConfigurationMBean.TYPE)
refs = alsbSession.getRefs(bsQuery)
bsRef = refs.iterator().next()

After this we have a reference to the business service we want to modify. Now is when fun begins.

There is an undocumented service bus ServiceConfigurationMBean (not to be confused with old whose description is ‘MBean for configuring Services’.

ServiceConfiguration.mysession as shown in jconsole

Among the different methods, we find one with an interesting name: getServiceDefinition

getServiceDefinition as shown in jconsole

It looks that we can use the getServiceDefinition method with our previous reference to the business service for obtaining exactly what its name states.

from import ServiceConfigurationMBean
servConfMBean = findService(ServiceConfigurationMBean.NAME + "." + sessionName, ServiceConfigurationMBean.TYPE)
serviceDefinition = servConfMBean.getServiceDefinition(bsRef)

This is the result of printing serviceDefinition variable:


Surprised? It’s exactly the same definition written in .BusinessService XML files. In fact, the service definition implements XMLObject.

Now it’s time to update the business service definition with our new timeout value (let’s say 5000 milliseconds) using XPath and XMLBeans. We must also take care of defining namespaces in XPath the same way that are defined in .BusinessService XML files.

nsEnv = "declare namespace env='' "
nsSer = "declare namespace ser='' "
nsTran = "declare namespace tran='' "
nsHttp = "declare namespace http='' "
nsIWay = "declare namespace iway='' "
confPath = "ser:endpointConfig/tran:provider-specific/http:outbound-properties/http:timeout"
confValue = "5000"
confElem = serviceDefinition.selectPath(nsSer + nsTran + nsHttp + confPath)[0]

We are almost there. First we update the service.

servConfMBean.updateService(bsRef, serviceDefinition)

Modified mysession shown in sbconsole

And finally, we activate the session (see NOTE) like we would do in bus console.

sessionMBean.activateSession(sessionName, "Comments")

mysession changes shown in sbconsole

Task details of mysession

Updated normalLoanProcessor configuration

With this approach, it could be possible to build a framework that allows to customize ALL fields as needed.

If you get the exception below when activating changes, please update your WebLogic Server configuration as described in Deploy to Oracle Service Bus does not work

Traceback (innermost last):
  File "", line 1, in ?
com.bea.wli.config.deployment.server.ServerLockException: Failed to obtain WLS Edit lock; it is currently held by user weblogic. This indicates that you have either started a WLS change and forgotten to activate it, or another user is performing WLS changes which have yet to be activated. The WLS Edit lock can be released by logging into WLS console and either releasing the lock or activating the pending WLS changes.
        at com.bea.wli.config.deployment.server.ServerDeploymentInitiator.__serverCommit(Unknown Source)
        at com.bea.wli.config.deployment.server.ServerDeploymentInitiator.access$200(Unknown Source)
        at com.bea.wli.config.deployment.server.ServerDeploymentInitiator$ Source)
        at Source)
        at com.bea.wli.config.deployment.server.ServerDeploymentInitiator.serverCommit(Unknown Source)
        at com.bea.wli.config.deployment.server.ServerDeploymentInitiator.execute(Unknown Source)
        at com.bea.wli.config.session.SessionManager.commitSessionUnlocked(
        at com.bea.wli.config.session.SessionManager.commitSession(
        at com.bea.wli.config.session.SessionManager.commitSession(
        at com.bea.wli.config.session.SessionManager.commitSession(

iProcess Server architecture

After my previous quick introduction to TIBCO iProcess Suite, I will take this opportunity to go through the main parts of the core component of iProcess, its Server.

Looking in more detail at the iProcess Server’s architecture we can see that its engines are organized into nodes, where a node is formed by 1 or N iProcess Engine servers sharing a database instance. If there is more than one engine for load balancing or fault tolerance, it’s called a node cluster. Engines use Remote Procedure Calls (RPC) to communicate with the clients and can be split into four parts:

  • Process Sentinels: which are responsible for making sure that the rest of the processes are running.
  • Foreground Processes: processes dealing with user interaction.
  • Background Processes: processes performing the “internal” tasks.
  • MBox Set: communication link between background and foreground processes

The Server comes with a client interface called Objects Server which provides an API to interact with the engine. It is available in two “flavors”:

  • Process Objects (TPO): a thick client implementation API for COM/C++/Java.
  • Server Objects (TSO): a thin client implementation API for EJB and .NET.

Using this APIs we can develop custom web-clients, web-services or integrate our J2EE or .NET applications with iProcess.

Business Processes executed by the iProcess Server can interact with external systems as well using EAI plugins. There are plug-ins for different systems, including BusinessWorks, Oracle, Java, SQL Server and scripts.

IProcess Server Architecture

IProcess Server Architecture

Quick introduction to TIBCO iProcess components

From observing material available on the internet and in discussions with our customers, it is clear that there is a fair amount of confusion as to which components are available in TIBCO iProcess suite and what they are used for. This article aims to clarify the components included and provides a brief description of each of them in order to give an overview of TIBCO iProcess. The second article of this series talks about iProcess Server internals.

TIBCO iProcess is a complete suite of products for Business Process Modelling and Execution. It is made up of the following components:

  • Server Engine: business process automation engine and workflow server, it is where the BPM activities are executed.
  • Business Studio: eclipse-based modeling tool that can be used both by business analysts and developers as a common tool to model, develop and test business processes. It can be downloaded for free from here: Supports well known standards like BPMN 1.1/1.2 and XPDL 2.1 and tools like ARIS or Visio. It has a built-in version control component called Business Studio Asset Central. It will eventually replace iProcess Modeler and, at some point, be the unique integrated development tool for the different TIBCO tools. In fact, tadalafil 20mg you can develop Business Works projects with Business Studio using the Designer Add-In.
  • Workspace: thick windows client used for administration (both of the server side and the client side), process modeling and to display work queues to end-users. iProcess Modeler is one of the components of the Workspace, it can be used to model business processes in a similar fashion to Business Studio. Personally, I would recommend you use Business Studio as, since version 3.0, it contains all the key features of iProcess Modeler.
  • Browser: thin client for end-users, includes a work queue and a work item manager to allow users to process the tasks assigned to them.
  • Decisions: business rule definition and management tool with a spreadsheet-like interface for business analysts.
  • Analytics: process performance monitoring tool, compares current and historical data allowing deviation detection.
  • Insight: business activity monitoring (BAM) for iProcess suite which gives business-related information in real time using dashboards.
  • Conductor: used to define execution plans that are based on process components and are represented as Gantt Charts.

I find Conductor particularly interesting. In theory, this tool allows business analysts to rearrange process components without affecting the whole business process. If, for example, at some point we wanted to parallelize two components that were originally defined as sequential, as long as there are no dependencies between them, this can easily be done using drag-and-drop. And, believe me, this is something business people love to have. I say in theory because this requires very careful analysis and design but, if you keep this in mind, the result is really worth it.

Moreover, Conductor’s ability to orchestrate process components makes it a perfect tool for scenarios like dynamic provisioning, as it facilitates runtime definition of specific product provisioning processes based on business rules. As an example, let’s consider a case I worked on a couple of years ago at a Telco. They were offering triple-play (phone, DSL and TV) so defining business processes for every possible combination of commercial offers would have meant creating a few hundred different processes (they had different types of networks, brands, etc.). The solution we found was to define business rules using iProcess Decisions and, based on them, instruct Conductor to dynamically build the project plan for each specific offer.

As you see, iProcess has quite a few of components, in following posts I will try to get more into the details of them.

We have just published the second post in this series here.

TIBCO Designer Add-in for TIBCO Business Studio

Last week I finally had the opportunity to try a new product from TIBCO that I believe that, like me, many developers were asking for. I’m talking about TIBCO Designer Add-in for TIBCO Business Studio 1.0.0.

Back in the old days of Integration Manager, we needed two development tools, IM in one hand to define business processes and integration services and Designer on the other to configure the adapters. Then BusinessWorks came so business processes may be developed and adapters configured with a single tool, Designer. But with the purchase of StaffWare and the integration of its products as the iProcess suite within the range of TIBCO we returned to separate development tools for BPM on one hand and BPA and adapters on the other. First, iProcess Developer was transformed into Business Studio, a graphical Eclipse-based development tool that allows both modelling business processes from the viewpoint of a business analyst and implementing these processes into the hands of a developer. iphone 6 plus replacement screen There had been rumors for a while claiming that TIBCO was planning to consolidate all its tools into one based on Eclipse, but until the end of last year they did not publish Designer Add-in for TIBCO Business Studio 1.0.0, a tool that takes all the palettes from Designer to the Business Studio environment.

Opening a BW project in Business Studio

Opening a BW project in Business Studio

This add-in is compatible with ActiveMatrix BusinessWorks and its main plug-ins, SmartMapper, BusinessConnect and BPEL, and the adapters for SAP, PeopleSoft, Database, Files and MQSeries. To date, it seems that other tools such as BusinessEvents are not supported and, at the moment, this version is only compatible with Business Studio 2.2, while the latest version of iProcess, 11.0, is bundled with Business Studio 3.1. Looks like we’ll have to wait some time until the two worlds, BPA and BPM are 100% coupled and aligned.

Furthermore, with 37 known defects in the release notes this appears to be a product to be improved but, hopefully, in the following months we will finally have a unified tool set for developing and configuring integration components (SOA), modelling and implementing business processes, automated (BPA) and with human intervention (BPM), setting up complex event processing (CEP) and configuring monitoring elements (BAM).

Sample BW project opened with Business Studio

Sample BW project opened with Business Studio. Note that the usual tabs in Designer appear now in Business Studio.


I have just seen that, on May, TIBCO has published version 1.1.0 of this Add-In which supports Business Studio 3.1. In fact, Business Studio is not bundled with the product anymore so you need to install that first. Apart from some bug fixes, that seems to be the main change in this release. Unfortunately, it does not support other products like Business Events, Business Factor or iProcess Insight yet.

Database storage in TIBCO EMS 5.0

Earlier this year TIBCO released a new version of their particular implementation of the JMS standard. TIBCO Enterprise Message Service 5.0 which, among others, includes some features which I personally consider very interesting.

One of them is the possibility to store persistent messages in a database. In previous versions, the only possibility was to use file based storage. In case you wanted to use fault tolerant groups of servers, this caused some difficulties as having both the messages and the shared state information in files required them to be in a shared storage device, either via hardware (SCSI and SAN, NAS or NAS with NFS) or software (Cluster Server or Clustered File System). These solutions are expensive and hard to maintain while using a database eases the configuration and leaves the hard work on the DBMS. You can even combine file and database based storage depending on the queue or topic.

Database storage is based in Hibernate, so any database server supported by Hibernate could be used to store the data. To use it, first we will need to enable it, setting the following parameters in the tibemsd.conf file:

  • dbstore_classpath: pointing to the hibernate and DB driver jar files.
  • dbstore_driver_name: specifies the jdbc driver.
  • dbstore_driver_dialect: specifies the hibernate driver dialect.
  • jre_library: associated JVM libraries.

Second, we will have to create the stores in the stores.conf file, for example:


Third, link the destinations with the appropriate store, either in the topics.conf and queues.conf files or using the command line administration tool with the setprop command, e.g.

setprop topic my.topic store=dbstore

Finally, we will need to export the EMS database tables using the EMS Schema export tool provided with EMS:

java -jar <EMS_home>/bin/tibemsd_util.jar -tibemsdconf <route_to_tibemds.conf>/tibemsd.conf -createall -export

As a postscript, let me recommend you not to install EMS as root, at least in a Solaris machine. With EMS 5.0 version it will not work unless you change the owner after the installation. This happens because once installed, if we try to run in as root, Solaris, due to security reasons, will execute the process with the user nobody4 but the folder which will contain the datastore files (if we choose file-based storage) will have write permissions set only for root user. As EMS will not be able to create the datastores, it will automatically shutdown. Moreover, even if we change the rights of that folder we will have the same problem with the configuration files, they will only have write permissions for root user which will return errors if we try to change the configuration using the command line administration tool.