Oracle SOA Build System
Author: Marc Kelderman
Creation Date: 12-8-2008
Last Updated: 12-8-2008
Date Author Version Change Summary
12-8-2008 Marc Kelderman 0.1 First version
Contributor Role Position
Name Role Position Document Status Date Reviewed Comments
Page ii of 23
5.6.3 Replace property file.........................................................................................14
5.6.4 Common property file.......................................................................................15
6. OSBS Examples...........................................................................................16
6.1 Command line............................................................................................................16
6.2 WEB Interface............................................................................................................18
Page iv of 23
2.1Scope for this Document
This document describes how the Oracle SOA Build system can be used by the end
user. It describes configuration and usage of the various tasks. After reading the
document the reader should be able to use the Oracle SOA Build System.
2.2Requirements for this Document
This is a technical document that describes the design of the Oracle SOA Build System.
The document refers to various technologies. Reads should be aware of these
technologies and terminologies.
• Oracle SOA Suite
• Unix scripting
This document is targeted for technical readers that will maintain the Oracle SOA Build
System. It is expected that the reader has some technical background related to the
technologies mentioned in the previous paragraph.
Ref Document Name URL
1 Java http://java.sun.com
2 Ant http://ant.apache.org
3 Oracle SOA Suite http://www.oracle.com/technology/soa/index.html
4 Unix scripting http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
5 Perl http://www.perl.org
6 OSBS Design Document OSBS_Technical_Design_v0.1.doc
Page 1 of 23
Oracle’s scalable application architecture in combination with the BPEL architecture
combines the best elements to create a high available and high performance
environment. Using tools to develop BPEL applications can be very complex when
multiple environments exist.
In general there are the following environments;
Depending on the customer requirements more or less environments exists.
This paper describes a solution to develop applications based on BPEL for multiple
In general development of BPEL processes is done via an IDE tools. These tools are:
• Oracle JDeveloper 10g (http://www.oracle.com/technology/products/jdev)
• Eclipse (http://www.eclipse.org)
• obant tool.
The first two products are graphical tools to design and develop BPEL processes. These
tools can also be used for compilation and deployment of a BPEL process. The obant
tool is part of the BPEL software stack and can be used to compile and deploy a BPEL
Combining these tools make is in general enough for designing and implementing BPEL
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.
Page 2 of 23
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
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 solution will
cover the following features and can be easily change and extended to customer
• Using full ANT tasks features
• Multiple environments
• Compile and deploy BPEL processes, ESB services, AIA components, etc
Page 3 of 23
4.Oracle SOA BUILD SYSTEM
The solution is called the Oracle SOA Build System (OSBS). This tool is based on best
practices during implementation of SOA project along various customers.
A high level overview of the OSBS is shown in the next diagram.
Command line Web Interface Command line
obbuild.sh perl obbuild.bat
OSBS Server - build.xml
Common files Runtime Libraries Source Control
Build.env Ant, SOA Suite, AIA SubVersion
The OSBS is a command line utility, obbuild.sh, which is started at the operating system
level. It has also a web interface to execute the same functionality but now through the
During start of the tool, the parameters are validated. After validation the core script is
executed. This script, build.xml, is a common ANT file that controls the whole build and
When the script is started with ANT, the runtime libraries are loaded and the common
files are read. Depending on the task to be executed for OSBS, various properties files
are read. This depends on the chosen environment.
Source control is used to export the source code of the SOA application to a temporary
staging area. From this staging area the SOA application is being build up.
When the task is executed, the result has been deployed to a particular environment.
Page 4 of 23
The goal for this design is to design a system that will automate the deployment of SOA
components to various environments; development, test, production etc, to get a high
quality of uniform deployment independent of software installations and user
The system is designed and implemented on the following business requirements:
• Platform independent
• Independent of existing software installations
• Deploy to multiple environments
• Handle the following components;
o Human Workflow
• Integrate with a source control system
• Easy to use
Page 5 of 23
The implementation of the OSBS is as follows:
A script is executed, obbbuild.sh, that will parse the command line arguments and read
the runtime libraries.
After the check on the syntax the project file of ant, build.xml, is called via Java and Ant
runtime libraries with the supplied arguments.
The ant project file will execute the specific task.
The web interface, based on a Perl script, will collect the arguments from the HTTP
request and transform those into a command line argument. So the Perl script calls the
Page 6 of 23
No installation is needed for OSBS. The OSBS is supplied as a zip file. This zip file must
be unpacked into a particular directory.
Apart of using a source and version control tool to maintain all the files in a central
repository, the files must be downloaded from this repository onto the hard drive. As
source control tools as Oracle Source Control Management, SubVersion, CVS and
ClearCase can be used.
The OSBS tool is using SubVersion as source control system. The OSBS tool is
assumes that a particular directory structure is in place. This structure is also based on
best practices. It can be changed in any format, while the definition is defined in
The directory structure for this solution is as follows:
| |--0. Project Management
| |--1. Analysis
| |--2. Design
| |--3. Build
| |--4. Test
| |--5. Deploy
| |--6. Service Introduction
| |--9. Documentation
| | |--config
| | |--install
| | |--lib
| | |--xsd
| | |--adapters
| | |--bpel
| | | |--default
| | |
| | |--esb
| | | |--DefaultSystem
| | | |--AIASystem
Page 7 of 23
| | |
| | |--dvm
| | |--java
| | |--jdev
| | |--xsd
| | |--sql
| | |--faulthandling
| | |--fault-policies
The meaning of the directory names is mentioned in the next table.
$PROJECT_HOME This is project home directory, in which the project will be located; BPEL,
ESB, Java, SQL
docs The general document directory.
Project management specific Each project at customer location, will have his own specific directory
structure to hold non technical documents; time sheets, use cases, visio
src The source directory will hold all source code to define the application system.
aia Oracle Application Integration Architecture directory.
config The config files of AIA
install The install files of AIA
lib The libraries belonging to AIA
xsd The common XSD files of aia; AIAComponents
adapters The adapters used in the AIA project; for example the BRM adapter.
custom The director contains all files that have been customized.
bpel The directory for BPEL process
Bpel domains Each process will be defined for a BPEL. This is specified here.
esb The directory for ESB services
Esb-systems Each service will be defined for a ESB system. This is specified here.
dvm The domain value maps used in the project
java Any java application will be located here.
jdev All JDeveloper projects (Java/BPEL/ESB) will be hold here including the
xsd The XSD files that are used by more than one process are located here.
Page 8 of 23
Sql Any SQL file for the project is stroed here.
fault-policies Fault hanlding policies of BPEL
docs Technical documentation; Installation, Configuration, oprators guide.
soapui The SoapUI test files are stored here.
tags This directory contains the various version of the tagged application.
rel_x.y This sub directory contains a particular version of the application from the
tools This directory contains scripts , tools that are used for software configuration
build The build tool
ant The Oracle build system
doc The documentation of the Oracle build system
properties The properties files used for the Oracle build system
lib The libraries used in the Oracle build system; ant ; AIA etc.
cgi A simple web interface for the Oracle build system
Based on the previous directory structure a script is made that takes control over these
directories and fulfill the appropriate actions onto it. The script is made generic so that
any other structure can be implemented.
The OBS system is called via a script. The script is a Unix shell script that will validate the
command line options and will start the ANT script.
To use the script it must be configured. There are some parameters that must be
validated before the script can be executed.
The settings are:
The settings can be changed in the obbuild.sh but are also defined in the file build.env.
This file is read during execution of the OBS script.
Verify the build.env file if the settings are correct.
Page 9 of 23
# AIA_HOME is needed for AIA Specific deployment
Page 10 of 23
Test the script by typing ‘obbuild.sh -t’ at command line to get a list of all the tasks
that can be executed.
$ ./obbbuild.sh -t
obbuild.sh: Tasks in ./build.xml
_CleanSVN - Internal: remove svn files
_CheckoutLatest - Internal: Checkout the latest sourcecode from SVN
_CheckoutVersion - me=
CreateDirs - Create directory structure
CreateNewProcess - Create a new BPEL process, based on a template
CompileBPEL - Compile one or all BPEL processes (
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, see
DeployAIABPEL - Deploy one or all AIA BPEL processes to a domain on a remote
Server [arg1=[Bpel-process|all] arg2=version arg3=domain]
DeployBPEL - Deploy one or all BPEL processes to a domain on a remote server
[arg1=[Bpel-process|all] arg2=version arg3=domain]
DeployESB - Deploy one or all ESB services to a system on a remote server
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] [arg3=ESB-system]
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
DeployXref - Deploy all or single XREF table files to the server
DeployDVM - Deploy all or single dvm table files to the server
Page 11 of 23
The script has a help function to show the possible options.
$ ./obbuild.sh -h
obbuild.sh: Version 2.1.3, build 20080627
obbuild.sh [-[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 environment property file, default 'dev', reading dev.properties
-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
-v Show verbose output
task The task to be executed, default is main
arg1..6 Optional arguments passed to the build file as properties
The script is reading a “build.xml” file to perform all the ANT tasks. By default it looks in
the current directory for the “build.xml”.
5.6OSBS Property files
The build system is using a lot of property files to execute the various tasks. For each
environment three property files are used:
• environment file
• makeall file
• replace file
There is one common property file that is used always, common.properties.
5.6.1 Environment property file
Each environment has its own property file. This file describes the settings for this
environment. It describes settings for:
• The name of the project.
• The name of the environment on which this file applies.
• The directory where the source code is located.
• The default name of the BPEL domain.
Page 12 of 23
• The default name of the ESB system.
• Settings for application server deployment.
• Source control system that is used; SubVersion.
Check each <environment>.properties file if the settings are set correctly.
5.6.2 MakeAll property file
The MakeAll property file is used to compile and deploy all the components to your
application server. This can be Java, BPEL or ESB components. The MakeAll file defines
the sequence in which the objects are deployed. The format of the make file is
Example of a make all file:
# Compile and deploy the Java applications
# Compile and deploy BPEL
# Execute pre-make; in case chicken egg issue with BPEL
# process A is calling B, B calls A. Initial deploy will fail
# Compile the Egg process
# Deploy again, now normally
# compile and deploy some AIA componments
The following syntax is recognized in the make all file:
Page 13 of 23
<function>.[pre|post]make.<sequence>=<name of the component>
Function can have the following values:
java Compile and deploy a java application to the application server.
bpel Compile and deploy a BPEL process to the application server.
aiabpel Compile and deploy a BPEL process to the application server and register it for AIA.
esb Compile and deploy a ESB service to the application server.
aiaesb Compile and deploy a ESB Service to the application server and register it for AIA.
The ‘make’ describes that it is compiled and deployed.
The ‘premake’ and ‘postmake’ actions are used to resolve issues in ESB and BPEL
deployment where processes call each other. This is known as chicken-egg issue.
The ‘premake’ can only be used in combination with the ‘bpel’ and ‘aiabpel’ function.
Before its is doing a compilation and deployment it will copy the a file named,
bpel.xml.pre to bpel.xml.
The ‘postmake’ can only be used in combination with the ‘bpel’ and ‘aiabpel’ function.
Before its is doing a compilation and deployment it will copy the a file named,
bpel.xml.post to bpel.xml.
Sequence must be a unique number within this file. It is used as sequence to deploy the
component in the correct order.
5.6.3 Replace property file
The file replace.properties file contains settings that are used to execute find/replace on
the source code. This is can be used for changing URL’s, end-points, queue names or
any other thing in the source code tree.
After a download of the source code for a particular environment, the code is ‘Promoted’
to this environment. This means that a global find and replace is executed on the whole
source tree or a particular object to change endpoints, queue names, directory or
The syntax of this replace property file is, replace_<environment>.properties. For
Page 14 of 23
The format and in this file is as follows.
The ‘number’ is a unique number that is used to count the number of replacement.
The Component-Name describes on component in the source tree the find and replace
will take place. It can be ‘all’, to for the whole source tree or a specific component to
execute the replacement only on this.
An example of this is here:
#Replace in all BPEL files localhost:9700 into 127.0.0.1:8888
# Replace in HellWorld bpel process the default domain
# and the hostname
5.6.4 Common property file
The file common.properties contains settings that are general used in the OSBS system.
It defines settings that are based on the project directory structure.
Page 15 of 23
Execute the default task; show ANT properties.
$ ./obbuild.sh -t
List all the tasks known in OBS.
$ ./obbuild.sh Download
Download the latest source code from the source system.
$ ./obbuild.sh –v CompileBPEL HelloWorld
Compile the HelloWorld BPEL process with verbose output.
$ ./obbuild.sh CompileBPEL HelloWorld
Compile the HelloWorld BPEL process.
$ ./obbuild.sh –e prod CompileBPEL HelloWorld 2.0
Compile the HelloWorld BPEL process to version 2.0 for the production environment.
$ ./obbuild.sh –e test DeployBPEL HelloWorld
Deploy the HelloWorld BPEL process to version 1.0 (default) for the test environment.
Page 16 of 23
$ ./obbuild.sh –e test DeployESB HelloWorldESB
Deploy the HelloWorldESB service to the test environment.
Page 17 of 23
$ ./obbuild.sh DeployAIAESB HelloAIAWorldESB
Deploy the AIA HelloAIAWorldESB service to the development environment and register
the service for AIA.
$ ./obbuild.sh DeplouAIABPEL HelloAIAWorld
Deploy the AIA BPEL process named HelloAIAWorld to the development environment
and register it for AIA.
$ ./obbuild.sh –e acc MakeAll
Execute the MakeAll task for the acceptance environment. The list of components for the
make all are defined in ./properties/makeall_acc.properties.
$ ./obbuild.sh MakeAll
Execute the MakeAll task for the development environment. The list of components for
the make all are defined in ./properties/makeall_dev.properties.
$ ./obbuild.sh CompileJava HelloJava
Compile the java application HelloJava.
$ ./obbuild.sh DeployJava HelloJava
Deploy the java application HelloJava to the development environment.
Along with the OBS scripts two files are available that can be configured on the
application server on which the OBS system is installed. These scripts will make the OBS
system available via the web.
The scripts are located in the CGI directory:
Page 18 of 23
Check the osbs.conf file. Load this configuration file in your Apache web server,
Check also the two Execute files if the directory paths used in these files are correct.
Allow from all
After configuration and restarting of the web server, the OSBS system can be accessed
via the URL:
A screenshot of the web interface is shown here:
Page 19 of 23