Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

Chapter 5. Managing Processes

5.1. Deploying Processes

There are two ways in which you can deploy BPEL processes:
  1. Via JBoss Developer Studio
  2. Directly (the sample quick starts use this approach).

5.2. Deploy a Process Using JBoss Developer Studio


  • JBoss Developer Studio.

Procedure 5.1. Task

  1. Launch JBoss Developer Studio.
  2. Create or import the JBDS BPEL project.
    (In this example, we are going to import an existing project from the SOA_ROOT/jboss-as/samples/quickstart/bpel_esb_helloworld directory).
    Select the Import menu item (found in JBDS's left-side navigation panel->General->Existing Projects into Workspace->Next.
  3. Click the Browse button.
  4. Navigate to the bpel_esb_helloworld quickstart directory.


    Once the project has been imported, you can inspect its contents, including the BPEL process and WSDL description.
  5. Create a server configuration for the JBoss Enterprise SOA Platform. (The Server tab should be visible in the lower region of the JBDS window. If it is not present, click Window->Show Views->Servers.)
  6. Right-click in the Servers view and select New->Server.
  7. Select the appropriate version of the JBoss Enterprise SOA Platform.
  8. Click Finish.
  9. Start the new server by right-clicking on the server in the Servers tab and selecting Start.
    The output from the server will be displayed in the Console tab.
  10. Once the server has been started, right-click on the server entry again, and select Add and Remove->bpel_esb_helloworld.
  11. Click Add->Finish.
    The project deploys to the server. (It will show up as an entry below the server in the Servers tab.)
  12. Test the deployed BPEL process by using the Ant script provided with the quick start sample. Right-click on the project root folder's build.xml file and select Run As->Ant Build.


    It is important to select the menu item with the "...", as this launches a dialogue box that enables you to select which Ant target you wish to utilise.
  13. De-select the deploy target.
  14. Select the runtest target.
  15. Click the Run button.
    A test 'hello' message is now sent to the server, and the response is displayed in the Console tab.
  16. To update the BPEL process, select assignHelloMesg->Properties->Details->Expression to Variable.
    You can update the concat function's second parameter in order to perform tasks such as adding UPDATED to the text.
  17. Save the update.
  18. Go to the Server view.
  19. Click bpel_esb_helloworld>Full Publish.
    The project redeploys.
  20. Re-run the runtest target within the build.xml file in order to send a new request and view the new response.
    The response should now reflect the changes you made in the BPEL process.
  21. Go to the Server view and expand the deployed project node.
    You will see that both of the deployed versions are shown. (The older version is retained as there may still be BPEL process instances using that version of the process.)
  22. Use the Server view's project menu and click Add and Remove to undeploy the project.


    If you right-click on each of the child nodes, you will see it is also possible to undeploy the specific versions. However, if you do manually undeploy a version, any remaining active process instances for that version will be terminated.
  23. Go to the Server menu item and stop the server.

5.3. Test a Process Using JBoss Developer Studio


  • JBoss Developer Studio

Procedure 5.2. Task

  1. Launch JBoss Developer Studio.
  2. Right-click on the process and select WSDL.
  3. Click on Web Services.
  4. Click on Test with Web Service Explorer.
  5. Launch JBoss Developer Studio.

5.4. Deploy a Process Using the Direct Approach

Procedure 5.3. Task

  1. Open the process' Apache Ant build script in your text editor.
  2. Modify it appropriately. Here is an example:
    <!-- Import the base Ant build script... -->
    	<property file="../../../install/" />
    	<property name="version" value="1" />
    	<property name="server.dir" value="${}/server/${}"/>
    	<property name="conf.dir" value="${server.dir}/conf"/>
    	<property name="deploy.dir" value="${server.dir}/deploy"/>
    	<property name="server.lib.dir" value="${server.dir}/lib"/>
    	<property name="" value="${}-${version}.jar" />
    	<target name="deploy">
    		<echo>Deploy ${}</echo>
    		<jar basedir="bpel" destfile="${deploy.dir}/${}" />
    	<target name="undeploy">
    		<echo>Undeploy ${}</echo>
    		<delete file="${deploy.dir}/${}" />
  3. Save the file and exit.

5.5. Some Points About Direct Deployment of Processes

  • It is necessary to provide the location of the JBoss Enterprise SOA Platform Server on which the BPEL process is to be deployed. (In this example, this is achieved by referring to the file found in the installation directory.
  • You can take a versioned approach where multiple versions of the same BPEL process are deployed at once. The name of the JAR archive file containing the BPEL process and any associated artifacts will have a version number suffix. You will need to increment this suffix number manually every time you deploy a distinct version of the BPEL process.


    Currently, the version must be specified as a single integer number. Non-numeric values, such as those that appear in a major.minor.incremental ( Maven-style) format, trigger an exception.
  • You need to define the deployment target to be used to create the BPEL process archive. Do so by using the contents of the bpel sub-directory and store them within the JBoss Enterprise SOA Platform's SOA_ROOT/jboss-as/server/PROFILE/deploy directory.
  • Finally, you need to define the undeployment target. This is simply used to remove the BPEL process archive from the JBoss Enterprise SOA Platform's SOA_ROOT/jboss-as/server/PROFILE/deploy directory.

5.6. Remove a Process


If you remove ("undeploy") an active process definition, every one of its process instances will be terminated. If you do not want this to happen, then you must retire the process definition first.

Procedure 5.4. Task

  1. Check to see if the processes have any active process instances.
  2. If there are any, use the BPEL Web Console to retire them first.
  3. Remove the processes only when there are no longer any active process instances.

5.7. Configure and Deploy an End-Point Reference

Procedure 5.5. Task

  1. Create a sample end-point file: vi SOA_ROOT/jboss-as/samples/quickstart/hello_world/bpelContent/test.endpoint.
  2. Add the following content to it:
    # 3 minutes
  3. Save the file and exit.
    Once deployed, the helloworld example will wait up to three minutes to respond.
  4. To test this out, edit the hello_world.bpel file and insert a wait activity before the response:
    This will make it wait two minutes and thirty seconds before responding, which is thirty seconds longer than the default timeout, but still within the limits of the new timeout period specified within the test.endpoint file.
  5. Save the file and exit.
  6. If you wish to force the timeout to occur, increase the wait duration to three minutes and thirty seconds and re-submit the test message using the ant runtest command.


    The BPEL Web Console does not yet support the global configuration file, so it can only obtain the configuration data from the deployed BPEL bundle. (Specifically, it looks in the root location within the BPEL deployment unit alongside the BPEL deployment descriptor.)

5.8. Supported End-Point Reference Configuration Properties

The BPEL Web Console supports the following properties:
  • mex.timeout