This recipe describes how a BPEL process can be deployed in Oracle SOA Suite. We will show the deployment of the BPEL process from a GUI tool as well as from the command line.
We have to set up a BPEL engine and a proper development environment. For the BPEL engine, we use the BPEL Process Manager from Oracle SOA Suite 11g. We also use JDeveloper as the development environment.
The installation notes and packages can easily be accessed from the Oracle web page at http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html. An Oracle web account is required in order to access downloads.
We will start with the HelloWorld example from the Oracle SOA Suite examples and will add additional functionality in the later recipes. For this recipe, we will unzip the HelloWorld example to our hard drive.
For this recipe, we use the example from the https://java.net/projects/oraclesoasuite11g/pages/BPEL address.
In the following steps, we will cover the actions we need to perform in order to deploy a BPEL process to the Oracle SOA Suite server:
bpel-101-HelloWorld.jws
file. The project structure in JDeveloper is as shown in the following screenshot:HelloWorldProcess.xsd
file, which contains the XML data type and the XML element structures for the input and output messages that are utilized by the BPEL process. At the top level of the project, we see the HelloWorldProcess.bpel
file, which contains the BPEL process definition, and HelloWorldProcess.wsdl
that contains the definition of the BPEL process partner links.connection
parameters to the Oracle Weblogic Domain. The name of the Oracle Weblogic Domain can be obtained from the Oracle Weblogic management console.Also, we check to see if there was no error reported in JDeveloper. If deployment was successful, we will see a message in the JDeveloper deployment log as follows:
[10:05:55 PM] Successfully deployed archive sca_bpel-101-HelloWorld_rev1.0.jar to partition "default" on server AdminServer [http://medion:7001]
HelloWorld
process appears in the Oracle Enterprise Manager Console, we succeeded in deploying the BPEL process; otherwise, we need to examine the error and respond accordingly. In case of an error, we need to first check the JDeveloper messages log, and then the Oracle SOA Suite console log. Theobe a useful source of information about the file.After preparing the package for deployment with JDeveloper, we can deploy the BPEL process with the ant
scripts. The scripts comes handy for continuous integration tasks in staging and production environments, where various testing and deployment tasks are performed automatically. A set of ant
scripts comes with Oracle SOA Suite in order to compile, build, deploy/undeploy, and test the BPEL processes.
We first open the command prompt and change the directory to the example project home. For the deployment, we execute the ant
script as shown in the following screenshot:
The command with which we started the deployment is as follows:
ant -f %Middleware_Home%\%SOA_Suite_Home%inant-sca-deploy.xml -DserverURL=http://localhost:7001 -DsarLocation=.deploysca_bpel-101-HelloWorld_rev1.0.jar -Doverwrite=true -DforceDefault=true
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
The ant
script parameters have the following meanings:
-f
: It is the location of the deployment script-DserverURL
: It is the base URL of the Oracle SOA Suite server-DsarLocation
: It is the location of the deployment package-Doverwrite
: If the BPEL process with the same version is already deployed, we can overwrite it-DforceDefault
: The force to deploy the package to the default domainBefore the deployment starts, we have to enter the username and password of the BPEL server. Again, we open the Oracle Enterprise Manager Console in order to check whether the BPEL process was successfully deployed.