ActiveBPEL® Designer User’s Guide

Tutorial Part 9: Deploying the Process

To start at the beginning of the tutorial, see Introduction to ActiveBPEL Tutorial.

If you have followed all tutorial parts so far, you have designed and debugged a BPEL process.

It is time to deploy the process to the ActiveBPEL embedded server. Deployment is the act of publishing your BPEL process to the ActiveBPEL server where it can run. In the deployment procedure, you use the WS-Addressing specification to define endpoint references.

In the Project Explorer view of ActiveBPEL, you should have the following files:

By completing Part 9 of the tutorial, you will be able to:

Step 1: Complete the prerequisite checklist for deployment

A BPEL file is ready for deployment to the ActiveBPEL Server when there are no errors in the Tasks view and when a simulated execution of the process terminates normally.

  1. Open tutorial.bpel.
  2. Simulate the process, as described in Tutorial Part 8: Simulating the Process, and test all execution paths.

Step 2: Create a process deployment descriptor file

A Process Deployment Descriptor (.pdd) file describes the relationship between the partner links defined in the BPEL file and the implementation required to interact with actual partner endpoints. You create a .pdd file to indicate where your endpoint references are. The .pdd file is an integral part of the deployment package for the process.

Recall that the loan approval process has the following definitions for partner links:

Partner Link Name

Partner Role

My Role

LoanApproval

approver

none

RiskAssessment

assessor

none

LoanProcess

none

loanProcessor

You will assign an endpoint type for each partner role and will provide access protocol information for the process role (My Role). An endpoint type is a binding property that indicates the actual service the process interacts with. Different types give you control over specifying services you work with now and in the future. In this tutorial, you will indicate a static reference to partner services.

  1. Select File>New>Deployment Descriptor to open the New Deployment Descriptor dialog.
  2. Select tutorial.bpel , and click Next, as shown.
  3. New Deployment Descriptor wizard, page one

  4. Select the deploy folder to store your deployment descriptor, shown in the example above, and click Finish to open the PDD Editor.
  5. On the General tab, do not make any changes. The Deployment Platform. ActiveBPEL Engine is the appropriate choice for this deployment.
  6. On the Partner Links tab, select the LoanApproval partner link.
  7. Select Address from the Invoke Handlers list. We are bypassing the system default invocation framework of the ActiveBPEL Engine by providing a URN in the address. This addressing technique provides flexibility in deploying your processes into different server locations.
  8. Select Static from the Endpoint Type list, as shown in the example.
  9. New Deployment Descriptor wizard, partner link definition

    WS-Addressing is automatically added based on the binding information in the WSDL file. Note that a URN is supplied as the address. On the server we will be mapping this URN to a URL.

  10. Select RiskAssessment and then select Address as the Invoke Handler and Static as the Endpoint Type.
  11. Select LoanProcess, and in the My Role panel, select Document Literal for the Binding style.
  12. In the Service field, the name is TutorialService.
  13. Leave the Allowed Roles field blank, leave the My Role Policy tab blank, and save the file. The Indexed Properties tab of the PDD editor does not apply to the ActiveBPEL Engine, only to ActiveBPEL Professional and above.
  14. Save and close tutorial.pdd

Step 3: Starting the ActiveBPEL Embedded Engine

We will deploy tutorial.pdd and its resources to the server. To do so, we will start up the server.

The ActiveBPEL Server consists of the ActiveBPEL engine running under Apache Tomcat 5.5. Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies.

  1. Select the Servers view in the lower right of the workspace.
  2. Select the Start the Server button, as shown in the example.
  3. start the server

  4. As the server starts up, you see start up tasks scroll in the Console. Several files are deployed to the embedded server each time you start it. Many of these files are for BPEL for People activities that you may want to create for your next project. When the server is started, the State indicates this, as shown above.

Step 4: Create a business process deployment archive

To deploy your process to the ActiveBPEL Server, you must add all relevant files to an archive file (.bpr file), which is similar to a Web archive file.

  1. Select File>Export>Orchestration>Business Process Archive File and click Next.
  2. Select the tutorial.pdd file to include in the archive, as shown in the following example.XXXXX
  3. Export Business Process Archive  dialog

  4. For the export destination BPR file, browse to the bpr folder and name the .bpr file tutorial.bpr. Your path should be similar to the following:
  5. designer\workspace\Tutorial\deploy\tutorial.bpr
  6. Select Web Service in the Type field. The embedded engine is automatically filled in for the Deployment URL.
  7. Selecting this option automatically deploys your .bpr file to the ActiveBPEL server upon completion of the export.

  8. Select the check box next to Save the archive specification..., and browse to the deploy folder.
  9. Name the BPRD file tutorial.bprd. This file is an Ant script which you can run to re-deploy the bpr file whenever you modify a .bpel or .pdd file.
  10. Select Finish. A deployment details dialog shows the results.

Your BPR file has been automatically deployed to the server, as indicated by the information dialog. You can also see the results in the Console:.

Console

Step 5: Deploy the Loan Approval and Risk Assessment BPRs

The Loan Approval and Risk Assessment services have been created as BPEL processes for the convenience of this tutorial. Once you deploy them, you can study the process logic and test accordingly. We will do this in the next part of the tutorial.

  1. In the Tutorial project, select the Partner Services folder.
  2. Right-mouse click on loanApprovalDeployOnly.bprd and select Execute. Within 20 seconds, view the Console to see the deployment of loanApproval.bpr.
  3. Repeat step 2 for riskAssessmentDeployOnly.bprd.
  4. Note that the BPRD files for the partner services have been modified just for the tutorial. The BPRD files that you create for your own processes contain many more deployment details.

Continue to Tutorial Part 10: Running the Process on the Server.