Sun Worklist Manager Service Engine User's Guide

Including the Worklist Manager Task in a BPEL Process

Once you define a Worklist Manager task, you can include it in a BPEL process. The following procedure includes very general instructions for creating the BPEL process. For more detailed information, see the BPEL Designer and Service Engine User’s Guide.


Note –

You can call the worklist manager task directly from a main BPEL process for synchronous operation; that is, the BPEL process waits for the task to be completed before continuing the process. This is described below.

For asynchronous operation, call the worklist manager task from a subprocess, which is in turned called from the main BPEL process. The subprocess is one-way, so the main process can create tasks asynchronously.


ProcedureTo Include the Worklist Manager Task in a BPEL Process

  1. To create the BPEL Module project, do the following:

    1. Right-click in the Projects window and select New Project.

    2. On the New Project Wizard, select SOA under Categories and then select BPEL Module under Projects.

    3. Click Next.

    4. Enter a name for the Project and then click Finish.

      A new BPEL process is created and is displayed in the BPEL Editor.

  2. Copy the WSDL and XSD files from the WLM project to the new BPEL project.


    Note –

    You do not need to copy the email handler WSDL file if you are using email notifications. The NetBeans Editor uses standard copy and paste features.


  3. Create any necessary XSD and WSDL files to define the BPEL process interface.

  4. If the BPEL process is not already open, double-click the process file in the Projects window to display it in the BPEL Editor Design view.

  5. Add a partner link to the BPEL process:

    1. In the Projects window, expand the BPEL project and select a WSDL file that defines the BPEL process interface.

    2. Drag the WSDL file to one of the partner link sides of the BPEL Editor.

    3. Repeat the above steps for each partner link to add.

    4. Repeat the above steps to add the WSDL file you copied from the WLM project to the BPEL process.

    Figure shows the WSDL partner links in the BPEL
process.
  6. Add and configure any needed activities in the BPEL process. At the point where you want to call the Worklist Manager task, add an Invoke activity.

  7. Link the Receive and Reply activities to the BPEL process partner links, and link the Invoke activity to the Worklist Manager task partner link.

    Figure shows links in the BPEL process.
  8. Create any necessary variables, including variables for the task input and task output.

    Figure shows the Create New Variable dialog box.
  9. Configure the activities that require variables by adding the variables to the activities.

    The following figure shows an example of Invoke activity variables for a Worklist Manager task.

    Figure shows the Property Editor for the Invoke
activity.
  10. Define any necessary variable mappings from one activity to the next.

  11. Save the BPEL process.

  12. Clean and build the BPEL process to be sure it is valid.