ActiveVOS Designer User’s Guide

Tutorial Part 3: Creating a Process Service Consumer Participant

If you have not already done so, complete or review Tutorial Part 1: Starting a New Process and Tutorial Part 2: Planning and Designing a Process.

In Part 2 of the tutorial, you learned how to create a top-down design by arranging BPEL activities on the Process Editor canvas. Now you will begin creating an executable process based on WSDL files.

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

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

Step 1: Viewing the WSDL and schema needed for the process

A Web Services Description Language (WSDL) file describes business operations that are invoked to carry out the activities of a BPEL process. WSDL files, and the schema types and elements they import, are required in order to create a valid executable BPEL file. A good practice is to include your business partners’ relevant WSDL and schema files in your orchestration project so that you can easily deploy the files in the project to a deployment package.

If you do not have access to WSDL files, you can create them in ActiveVOS.

Normally you would create an orchestration project folder and import (or create) WSDL files into it. We will take a shortcut for the tutorial, since the WSDL files are already imported, as shown in the following illustration:

The WSDL and schema file definitions are as follows:

loanProcess.wsdl

WSDL for the participation of the BPEL process itself, describing the request operation. The BPEL process starts by receiving a loan applicant’s request for a loan.

loanApproval.wsdl

WSDL describing the approve operation for the loan approver partner service. The service is invoked to approve or deny requests for large loans

riskAssessment.wsdl

WSDL describing the check operation for the risk assessment partner service. The service is invoked to check the risk level of an applicant applying for a small loan.

loanMessages.wsdl

WSDL containing the message definitions for data exchanged among the service partners. This WSDL is imported by the other WSDLs.

loanRequest.xsd

Schema that defines the data types used in messages. The schema is imported into loanMessages.wsdl.

Step 2: Using the Participants View to Create a Process Service Consumer

Participants are the Web services and clients using your process and the partner Web services your process uses. A participant exposes an interface to exchange messages with other services.

The loan approval process has three participants: one participant is the process itself, playing the role of receiving a customer request and replying to the customer. The other two participants are partner services that we will create later.

  1. In the Participants view, notice that there are three types of participants: Process Service Consumers, Partner Service Providers, and Human Task Participants.
  2. Participants view -- empty

  3. Right-mouse click on Process Service Consumers and select New Process Service Consumer.
  4. Each process plays at least one participant role, that of being consumed by a Web Service to start the process.

  5. The default Consumer Name is Process_Consumer. Rename this to loanProcessor to identify the participant role that this process is playing.
  6. In the Interface tree, you see three port types listed in the Tutorial project. A port type is a required element of WSDL. It describes the operation to use for invoking a Web service and the message(s) to be exchanged between Web services. These port types are defined in the WSDLs that are provided with the Tutorial orchestration project. Select the LoanProcess port type as shown.
  7. Participants view

  8. Click OK. The new participant is displayed, and you can expand it to show the interface details from loanProcess.wsdl.

Step 3: Complete the interface details for the Receive activity

The loanProcessor participant is consumed by the request operation to begin the process. To implement this, we will fill in the details for the Receive activity.

  1. On the Process Editor canvas, select the Receive activity.
  2. In the Properties view, select the drop-down arrow in the Participant field, and select loanProcessor.
  3. In the Operation field, select the request operation, as shown.
  4. receive properties

  5. Open the Data tab.
  6. From the Assignment Type drop-down arrow, select Single Variable.
  7. From the Variable drop-down, select New Variable.
  8. The New Variable dialog displays a suggested name and data type, based on the schema imported into LoanMessages.wsdl.

  9. Rename the variable to creditInformation, as shown.

New Variable dialog

Step 4: Create a Reply activity

The request operation that the process starts with is a request-response operation. We have created the Receive activity for the request, and now we will create the mandatory reply. The reply tells the customer whether or not the loan amount is approved.

  1. From the Event palette, drag a Reply to the canvas. Place it within the bounding box surrounding the receive, as shown.
  2. bounding box

  3. In the Properties view, in the Activity Name field, name the Reply Return Approval Response.
  4. In the Participant field, select loanProcessor.
  5. In the Operation field, select request.
  6. Select the Data tab.
  7. From the Assignment Type, select Single Variable.
  8. From the Variable drop-down arrow, select New Variable.
  9. Name the new variable approval.

Continue to Tutorial Part 4: Creating Partner Service Provider Activities.