Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

Build and deploy a business process model using WebSphere Business Process Modeler Advanced and Lotus Forms, Part 2: Implement and test the BPEL process using WebSphere Integration Developer

Attila Kiss (attila_kiss_bme@yahoo.com), Student, Budapest University of Technology and Economics
Attila Kiss
Attila Kiss attends Budapest University of Technology and Economics and will graduate as a Computer Science Engineer in 2008. He specializes in IT infrastructure management. He has been working with WebSphere products with special focus on business modeling.
Viktor Muller (viktormuller@gmail.com), Student, Budapest University of Technology and Economics
Viktor Muller Photo
Viktor Müller attends Budapest University of Technology and Economics and graduates as a Computer Science Engineer in 2009. He specializes in information system development. He has worked with WebSphere products with a special focus on BPEL development.

Summary:  Learn how to use IBM® WebSphere® Integration Developer to implement and customize a Business Process Execution Language (BPEL) process and then test it in WebSphere Process Server. Part 2 of this tutorial series shows you the steps for generating the Web interface, assembling the components, and testing the solution.

View more content in this series

Date:  15 Apr 2009
Level:  Intermediate PDF:  A4 and Letter (3098 KB | 55 pages)Get Adobe® Reader®

Activity:  13364 views
Comments:  

Implementing human tasks

This section describes how to implement human tasks.

Creating an invocation human task from RecordingApplicantData

In this step you implement the scenario when the application is not electronic but an administrator records the application data and starts the process. In the Integration Developer you will map this scenario to a stand-alone invocation task. An invocation task offers functions to invoke a service, in our case the process.

First delete the inline to-do task RecordingApplicantData:

  1. Right-click on RecordingApplicantData.
  2. Select Delete from the context menu.

    Next create the new invocation human task:

  3. Right-click on HRProject > Business Logic in the Business Integration view.
  4. Select New > Human Task from the context menu.

    Figure 45. Creating a new human task
    Creating a new human task

  5. Type humantasks/hrprocess for the Folder.
  6. Type RecordingApplicantData for the Name.

    Figure 46. Selecting a destination for the human task
    Selecting a destination for the human task

  7. Click Next.
  8. Select Invocation Task.
  9. Click Next.
  10. Select HRProcess from the drop-down list for the Interface.

    Figure 47. Specifying the interface of the human task
    Specifying the interface of the human task

  11. Click Finish.

    The Human Task Editor appears and the new human task is opened. Now you generate a new Lotus Form user interface for the invocation task.

  12. Click the plus sign next to User Interfaces.

    Figure 48. Generating a user interface for a task
    Generating a user interface for a task

  13. Select IBM Lotus Forms Client.
  14. In the Properties view click New….
  15. Select HRProject > humantasks > hrprocess.
  16. Click OK.

    Figure 49. The human task invocation diagram
    Human task invocation diagram


Implementing human task Interview

The Interview human task was modeled in Business Modeler so that it uses the application both as its input and output. This is a simple and valid model for the process from a business perspective. However this approach demands a user interface implementation which is out of scope of this tutorial. To keep things simple you will refactor the interface of this human task and regenerate the output Lotus Form.

  1. Select Interview human task.
  2. Navigate Properties > Details.
  3. Click the link HRProcess_Interview to open the human task editor.
  4. Open Service Interface by clicking the triangle in front of it.
  5. Click the name of the interface: Interview. Now the interface editor opens.
  6. Select Output2.
  7. Click the Delete icon on the tool bar in the top of the view.
  8. Click Add Output.

    Figure 50. The Add Output button
    The Add                                 Output button

  9. Rename the output parameters according to Figure 51.

    Figure 51. Renaming output parameters
    Renaming output parameters

Next, set the variables used in the human task Interview.

  1. Open the process.
  2. Click OK for the information message indicating the change in the interface of the human task.
  3. Select Interview human task.
  4. Navigate Properties > Details.
  5. Click (none) in the row of Input parameters to select the variable to use.
  6. Select InterviewDataVariable.
  7. Select ApplicationVariable_2 for parameter Input2.
  8. Select booleanVariable for parameter Passed.
  9. Create new variable for parameter Comment by clicking (none) > New…
  10. Name it CommentVariable.

    Figure 52. Setting variables for the Interview human task
    Setting                                 variables for the Interview human task

Next, generate a new Lotus Form for the output user interface of the Interview human task.

  1. Select Interview human task.
  2. Navigate to Properties > Details.
  3. Click the link HRProcess_Interview to open the human task editor.
  4. Click IBM Lotus Forms client under User Interface.
  5. Click New… for Output.
  6. Select HRProject > humantasks > hrprocess for the folder where the form is to be saved.

    Figure 53. Generating a Lotus Form
    Generating a Lotus Form

Next, create a new snippet after Interview to copy the CommentVariable into ApplicationVariable_2.

  1. Create a new snippet named CopyComment.
  2. Place it after Interview.
  3. Navigate to Properties > Details.
  4. Drag and drop ApplicationVariable_2 to the canvas.
  5. Select the Comments field of ApplicationVariable_2.
  6. Drag and drop CommentVariable to the canvas.
  7. Click Main group > Standard Visual Snippet.
  8. Select list > add item to list.
  9. Connect the elements according to Figure 54.
  10. Drag and drop a new CommentVariable variable.
  11. Add a new Expression with an empty string.
  12. Connect these elements to reset CommentVariable.

    Figure 54. Creating the CopyComment Java snippet
    Creating the CopyComment Java snippet

At this point, your process diagram should look similar to Figure 55.


Figure 55. The completed process diagram
The completed                         process diagram

Creating a user interface for human tasks

In this section you create the user interface for human tasks based on the forms you generated and customized in the previous section. You will use Integration Developer to generate a web application that has Java Server Pages (JSP) for browsing human tasks and has the prepared Lotus Forms for the input and output forms of the human tasks. User interfaces can also be generated as Java Server Faces or Business Space powered by WebSphere applications.

  1. Navigate HRProject > Business Logic > Processes > processes/hrprocess > HRProcess.
  2. Select Generate User Interface… from the context menu.

    Figure 56. Generating a user interface
    Generating a user interface

  3. Click Select All.
  4. Select IBM Lotus Forms client from the Generator type drop-down menu.

    Figure 57. Selecting the type of user interface
    Selecting the type of user interface

  5. Click Next.
  6. Type HRProjectWebClient for the Name of dynamic web project.
  7. Select IBM Style for Style.

    Figure 58. Selecting a style for the dynamic Web project
    Selecting a style for the dynamic Web project

  8. Click Finish.
  9. Click OK for the information dialog.

7 of 14 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere
ArticleID=432422
TutorialTitle=Build and deploy a business process model using WebSphere Business Process Modeler Advanced and Lotus Forms, Part 2: Implement and test the BPEL process using WebSphere Integration Developer
publish-date=04152009
author1-email=attila_kiss_bme@yahoo.com
author1-email-cc=crothemi@us.ibm.com
author2-email=viktormuller@gmail.com
author2-email-cc=crothemi@us.ibm.com