Monday, May 26, 2008

The build tool; deploy AIA / BPEL / ESB / Workflow / Java using ANT

A few years ago, when Oracle had only the BPEL component, deployment was rather complex. Therefore I create my own build tool, replacing the obant tool and ignoring the existing build.xml files, supplied within your JDeveloper project.

Meanwhile, the tool has been extended during the implementation of projects. Every time, I was focussing that the tool should be independent of customer needs, making it generic.

In general development of BPEL processes is done via an IDE tools. These tools are:
  • Oracle JDeveloper 10g (
  • obant tool.

The first product is a graphical tool to design and develop SOA components. The tool can also be used for compilation and deployment of a BPEL process for example. The obant tool is part of the BPEL software stack and can be used to compile and deploy a BPEL process. Combining these tools make is in general enough for designing and implementing BPEL applications.
It will be more complex if design and development must be done for various environments; developing new BPEL applications in development environment and fixing BPEL processes in a production environment.

The obant tool can compile from a current directory an ANT build.xml file. It will read the XML tags from this and interpret them. Oracle Jdeveloper generates this build.xml file when a new BPEL process is created. It is possible to extend this "build.xml" file with other ANT tasks. But this is not logical. When developing BPEL applications, it will result in many BPEL processes, each having it's own "build.xml" file.

A solution could be to have a general "build.xml" that is able to compile the BPEL processes.
A feature of the current obant tool, is that is only possible to use the core ANT tasks. It is not possible to use the optional tasks or even extend it with other tasks without changing the obant script.

The solution described in the next paragraphs will take this into account.

The build tool covers the following features and can be easily change and extended to customer requirements:
  • Using full ANT tasks features, Ant 1.7 + Ant-Contrib tasks
  • Support of Multiple environments; Dev / Test / Acceptance / Production / ...
  • Compiling BPEL processes
  • Deploy BPEL processes
  • UnDeploy BPEL processes
  • Register ESB services
  • Unregister ESB services
  • Deploy AIA BPEL processes
  • Deploy AIA ESB services
  • Integration with SubServersion; download latests or tags
  • Stand-alone tool ; not depending on Oracle installation
  • Compile and Deploy Java programs
  • Supporting 'MakeAll'
  • Import XREF values
As shown in the list of functionalities, the build system is now able to deploy AIAESB services. Therefore the build system is extended with AIA functionality. This means that AIA specific libraries have been added to the 'lib' directory of the build system. The unix script,, has been changed to add specific files.

Pre-Requirements AIA only
To deploy a complete set of AIA custom developed services or single ones, you must verify that you meet the following requirements. You must have correct file permissions for AIA:

To deploy an ESB service on the linux machine, as a non oracle owner is possible. The ANT script along with the ESB service, does need specific read/write settings.

Make user that the following directories and files are open for read/write, (recursively):


To use the build tool some configuration must be made. Most of all settings are located in properties files. Configure the build tool configuration file to prepare the deployment for this release. Edit the following file:


In build.env, edit ANT_HOME and ANT_JAVA_EXTENSIONS, change the first part of the path to where the package was copied to ($BUILD_TOOL). Also change LOG_DIR in build.env, log files will go to this directory.

An example of this file is here

# AIA_HOME is needed for AIA Specific deployment
export AIA_HOME=/app/oracle/product/AIA2.0

Manual Deployment
To deploy a the AIA components manually the following steps should be executed in this sequence.

Download the latest version of the AIA components. Example for SystemTest environment: -e test Download

Example for tag 2.0.23 being the current version for acceptance: -e acc Download 2.0.22

Promote is a task that does a find and replace on the source code. It was build for replacing endpoints but the tool can find and replace almost anything in source code.

Example; promote the existing download for the test environment -e test Promote

Note: it will use the file to execute the find and replace.

The file is used for a general replacement of tokens
in BPEL projects. The file describes hoe tokens can be replaced in one or
all BPEL processes, ESB services.


Replace in all BPEL files localhost:9700 into

Replace in HellWorld bpel process the default domain and the hostname

XSD files (AIA related)
The AIA environment is using static XSD files that are located on the application server in the directory:


Make sure that the latest version of the XSD files from SubVersion ($SVN_HOME/aia/xsd)are copied to this directory.

note: make sure the right privileges are applied on the server see DeployAIAXSD

A zip file is created with the XSD of AIA. You can now copy and unzip the file on the server.

Deploy generic ESB service
Note that before deploying the ESB service, the services will be undeployed. Based on the property file The GUID is read from this file. If the ESB service exists in this property it will be undeployed. Maintain this file if any new ESB services are added to the system

Deploy each ESB service separately, if they exists. Example for Test environment: -e test DeployESB HelloWorldEBS

Deploy generic BPEL process
Deploy each BPEL process separately. Example for Test environment:

For example: Compile and Deploy Helloworld 1.0 to the default domain -e test Compile HelloWorld -e test DeployBPEL HelloWorld 1.0 default

For example: Compile and Deploy Helloworld 1.1 to the MyDomain domain -e prod Compile HelloWorld -e prod DeployBPEL HelloWorld 1.1 MyDomain

Deploy AIA ESB service
Note that before deploying the ESB service, it will be undeployed. Based on the property file The GUID is read from this file. If the ESB service exists in this property it will be undeployed. Maintain this file if any new ESB services are added to the system

Deploy each AIA ESB service separately.

For example for Test environment: -e test DeployAIAESB SalesOrderEBS

Deploy AIA BPEL process
Deploy each AIA/BPEL process separately.

For example for Test environment: -e test CompileBPEL UpdateOrderSiebelProvImplABCS -e test DeployAIABPEL UpdateOrderCordysProvImplABCS 1.0 default

Deploy Java WebService
Deploy each Java process separately. Example for Test environment: -e test DeployJava HelloJavaWorld

Note: default-application.xml must be included in source code.

Automatic Deployment
To deploy the whole system at once, use the task 'MakeAll'. -e test MakeAll

Note: This target is using the '' that describes the correct sequence of all the AIA components (Java, BPEL, and ESB) that will be built and deployed. The next table shows an example of the '' file.
# Java

Command line interface
The command line interface of the obbuild tool is as follows: -? [-[hvtV] [-e environment] [-f build-file]
[-r replace-file] [task] [arg1] [arg2] .. [arg6]]

-h Shows this help
-V Show the version of this program
-t Show all the tasks in the build file
-e Select envirnonment property file,
default 'dev', reading

-f Read a specific build file, default is build.xml
in current directory

-r Read a specific replacement file,
use for promoting BPEL process to other environments.

-v Show verbose output
task The task to be executed, default is main
arg1..6 Optional arguments passed to the build file
as properties ANT.ARG1..ANT.ARG6

The tasks the build tool can execute: -t Tasks in ./build.xml
CompileBPEL - Compile one or all BPEL processes (
[arg=bpel-process-name] arg2=version])
Download - Download latest source code
CreateWar - Create WAR file, containing all
the BPEL processes
CreateEar - Create BPEL ear file
main - Default task
Promote - Find/Replace on one or more BPEL processes,
DeployAIABPEL - Deploy one or all AIA BPEL processes to a
domain on a remote server
arg2=version arg3=domain]
DeployBPEL - Deploy one or all BPEL processes to a domain
on a remote server
arg2=version arg3=domain]
DeployESB - Deploy one or all ESB services to a system
on a remote server
[arg1=[ESB-process|all] [arg2=system]]
CompileJava - Compile Java files
[arg1=name of the application]
WARJava - Create WAR file from class files
[arg1=name of application]
EARJava - Create EAR file from WAR file
[arg1=name of application]
DeployJava - Deploy an EAR file to OC4J container
[arg1=name of the application]
MakeAll - Create a new set of the application
[arg1=[bpel/esb version] [arg2=BPEL domain]
DeployAIAESB - Deploy one or all AIA ESB services
to a system on a remote server
[arg1=[ESB-process|all] [arg2=system]]
SendMail - Send a mail
[arg1=to arg2=subject arg3=text]
DeployAIAXSD - Deploy the AIA XSD files: creating a ZIP files
UndeployBPEL - Undeploy a BPEL process
[arg1=processname [arg2=version] [arg3=domain]]
UndeployESB - Undeploy one or all ESB services to
a system on a remote server
[arg1=[ESB-process|all] [arg2=system]]

You can download the (old version) zip file here, the zip file is as is. No support from Oracle or myself.

Tuesday, May 20, 2008

KPN Gone live with Oracle AIA

It's always nice to be part of a project that goes live. But even more when news agencies making attention on it. This time the Dutch KPN telecommunication provider, implemented successfully a large project based Oracle Application Integration Architecture (Oracle AIA).

Read the full article on CNN.

Some background (dutch)