Skip to main content

skip to main content

developerWorks  >  WebSphere  >

An end-to-end solution using IBM WebSphere Business Integration V6.0 products, Part 2: Implement, deploy, and test the business process

developerWorks
Document options

Document options requiring JavaScript are not displayed

Discuss

Sample code


Rate this page

Help us improve this content


Level: Intermediate

Ji Wen Jin (jinjiwen@cn.ibm.com), Staff Software Engineer, IBM
Xiong Fei Pan (panxiongfei@gmail.com), Software Engineer, Tongji University

21 Jun 2006

Part 2 of this article series guides you through the steps to implement a business process in WebSphere Integration Developer V6.0 and deploy and test the business process in a WebSphere Process Server V6.0 test environment.

Introduction

This article updates the modeling project that you created in Part 1 of this article series to support a human task. It shows you how to import the modeling project exported from IBM® WebSphere® Business Modeler V6.0 into IBM WebSphere Integration Developer V6.0 and implement, deploy, and test the business process in WebSphere Integration Developer. To learn more about how to create the modeling project, read Part 1 of this series, Model a business process with IBM WebSphere Business Modeler.

Update the modeling project to support a human task

In order to support the human task implementation, you must first update the modeling project.

The following section provides the steps to update the modeling project exported from Part 1 of this series.

Create a new business modeling project in WebSphere Business Modeler

To create a new business modeling project:

  1. From the menu, choose File => New Business Modeling Project.

    Figure 1. Create a new business modeling project
    Create a new business modeling project

  2. Enter the project name, ReportRequest, uncheck the option Create Process, and click Next.

    Figure 2. Enter the project name
    Enter the project name

  3. Keep the default option, Free-Form Layout, and click Finish.

    Figure 3. Free-form layout
    Free-form layout

  4. Right-click ReportRequest and click Import to open the WebSphere Business Modeler Import wizard, and choose WebSphere Business Modeler Import.

    Figure 4. Choose WebSphere Business Modeler Import
    Choose WebSphere Business Modeler Import

  5. Select the WebSphere Business Modeler Project (.zip) file.

    Figure 5. Select WebSphere Business Modeler Project
    Select WebSphere Business Modeler Project

  6. Locate the directory with the ReportRequestPrepare.zip file, Choose Target Project ReportRequest, keep all the other default values, and click Finish.

    Figure 6. Locate the file and choose Target Project
     Locate the file and choose Target Project

  7. To import the model into WebSphere Process Server V6.0, switch the default Mode from Basic to WebSphere Process Server.

    Figure 7. Switch to the WebSphere Process Server Mode
    Switch to WebSphere Process Server Mode

  8. A warning about Stop Node should display.

    Figure 8. A warning about Stop Node displays
    A warning about Stop Node displays

  9. Delete the Stop Node, then choose the element Stop from the panel, and drag it to the appropriate position.

    Figure 9. Correct the Model File
     Correct the Model File

  10. Click the element, Connections, to drag a connection between the element, Generate and Send Report, and the Stop Node. The warning disappears.

    Figure 10. Verify the correct result
    Verify the correct result

  11. Modify the business item, ReportRequest, add an attribute, RequestStatus, for ReportRequest.

    Figure 11. Modify the Business Item ReportRequest
    Modify the Business Item ReportRequest

  12. To model the human task, you should define a human resource for the activity. In the Individual resource requirements panel, click Add to add a resource, then click the Individual Resource button. Select Individual Resource or Resource Definition, choose Predefined resources => Resource definitions => Staff, and then click OK.

    Figure 12. Setting for the human task
    Setting for the human task

  13. Verify that the individual resource, Staff, has been added.

    Figure 13. Verify that the Individual Resource Staff has been added
    Verify the added individual resource

  14. Export the project. From the menu, choose File => Export =>WebSphere Business Modeler Export.

    Figure 14. Select WebSphere Business Modeler Export
    Select WebSphere Business Modeler Export

  15. Select the type: WebSphere Process Server.

    Figure 15. Select the type: WebSphere Process Server
    Select the type: WebSphere Process Server

  16. Select the target directory and project. Please make sure that the option, Export entire project, is checked. Enter Export file name. If the export file exists, check the option Overwrite files. Please refer to Figure 16 to verify that you have the correct setting.

    Figure 16. Select the Destination and Source to Export
    Select the Destination and Source to export

So far, you've completed the modeling task for the human task in WebSphere Business Modeler and exported it for further implementation in WebSphere Integration Developer.

Import the modeling project exported from WebSphere Business Modeler into WebSphere Integration Developer

Now that the modeling work is done, you can implement it in WebSphere Integration Developer. Let's begin by importing the modeling project using the following steps.

  1. Open WebSphere Integration Developer. Right-click a blank place in the Business Integration view, and choose New = > Module.

    Figure 18. Create a new module
    Create a new module

  2. Enter the module name RequestReport. Check the Use default option and then click Finish.

    Figure 19. Verify the module name and location
    Verify the module name and location

  3. Notice that the RequestReport project has been created.

    Figure 20. Verify that the RequestReport project is created
    Verify that the RequestReport project is created

  4. Import the model files exported by WebSphere Business Modeler into the module, RequestReport. Choose File =>Import.

    Figure 21. Import the Model Files.
    Click import

  5. Select File System and click Next.

    Figure 22. Select the File System
    Select the File System

  6. Locate the directory and check the folder ModelerExport, businessitems and processes. Browse to locate the folder, and select RequestReport; choose the Create selected folders only option and click Finish.

    Figure 23. Locate the Model Files directory and the Into Folder.
    Locate the Model Files directory and the Into Folder

  7. After the model files have been imported successfully, notice that a process named RequestReportProcess has been added. These four Interfaces are added at the same time: ApproveRequest, GeneratedSendReport, ReceiveReportRequest and RequestReportProcess. Notice also that a HumanTask Approve Request is also presented in the process panel.

    Figure 24. The model files have been imported successfully
    The model files have been imported successfully

Implement the business process in WebSphere Integration Developer V6.0

In this section, you learn how to add the Java™ Implementation for the process components in WebSphere Integration Developer V6.0.

  1. Double-click Export RequestReportProcess. Four new components have been added to your module. Right-click the Receive Report Request component, in the pop-up menu, and choose Generate Implementation = > Java.

    Figure 25. Generate the Java implementation for the component
    Generate the Java implementation  for the component

  2. In the pop-up dialog, select default package and click OK.

    Figure 26. Select Default Package
    Select Default Package

  3. Notice that a Java component implementation ReceiveReportRequest_01227944638Impl has been created automatically by WebSphere Integration Developer.

    Figure 27. A Java component implementation is created
    A Java component implementation is created

  4. Now you can update the Java code to implement your business logic in the public method, InputCriterion . Here is the implementation for example as shown in the figure below.

    Figure 28. Sample code for the Java implementation
    Sample code for the Java implementation

  5. Repeat steps 1 through 4 to generate the Java implementation for component Generate and Send Report. Verify it with Figure 29 below.

    Figure 29. Verify the Java implementation for component Generate and Send Report
    Verify the Java implementation for component Generate and Send Report



Back to top


Deploy and test in the WebSphere Integration Developer V6.0 testing environment.

After finishing the implementation, you need to deploy the project to the WebSphere Process Server V6.0 testing environment before your client programming starts.

Before we start, let's review the business scenario (see Figure 30 below). When the condition, SecurityLevel < 3 is true, the Generate and send Report invocation is executed, or the HumanTask Approve Request is invoked.


Figure 30. The business process diagram
The business process diagram

Use these steps to deployment and test.

  1. After starting the instance of WebSphere Process Server V6.0 in WebSphere Integration Developer testing environment successfully, select it by right-clicking. In the pop-up menu, choose the item, Add and remove projects.

    Figure 31. Add and remove projects
    Add and remove projects

  2. Select the project, RequestReportApp, click Add and then click Finish.

    Figure 32. Add project RequestReportApp
    Add project RequestReportApp

  3. Launch the process test tool, BPC Explorer.

    Figure 33. BPC Explorer
     BPC Explorer

  4. Click My Process Templates, check the Process Template Name RequestReportProcess and click Start Instance.

    Figure 34. Start the Instance RequestReportProcess
     Start the instance

  5. Enter the Process Name p1 and the Process Input Message inReportRequest. The values you enter correspond to the figure below. Make sure the SecurityLevel value is less than 3; then Click Submit.

    Figure 35. Make sure the value of SecurityLevel Is less than 3.
     Verify the values you entered

  6. The Test result is shown in the console. According to the business process we defined (refer to Figure 30) and business logic defined in the Java component, Generate and send Report, (refer to Figure 29); the value of requestStatus should transfer from Submitted to Approved.

    Figure 36. Verify that the test result shows in the console
     Verify that the test result shows in the console

  7. Enter the Process Name p2 and enter the Process Input Message inReportRequest. The values you enter correspond to Figure 37. Make sure that the value of SecurityLevel is larger than or equal to 3; then click Submit.

    Figure 37. Make sure that the value of SecurityLevel is larger than or equal to 3.
     Verify the values you have entered

  8. The log comes from the console. Since SecurityLevel = 4 > 3, it needs a human staff person to approve or reject the request. You need to click My Tasks, check the running Human Task, and then click Work on.

    Figure 38. Human Task works
     Human Task works

  9. Enter the Task Output Message outReportRequest. The values you enter correspond to Figure 39. Assure that the value of RequestStatus is Approved. Then click Complete.

    Figure 39. Human Task: the Value of RequestStatus is Approved
     The human task is approved

  10. The corresponding logs are shown in the console.

    Figure 40. Verify the logs
     Verify the logs

  11. If you entered Rejected as the value of RequestStatus when SecurityLevel > 3, then click Complete.

    Figure 41. Reject the request
     Reject the request

  12. The corresponding logs are shown in the console.

    Figure 42. Verify the logs
     Verify the logs

Conclusion

This article has shown you how to assemble and deploy a business process in WebSphere Integration Developer V6.0. After you perform these steps, you'll have the basic skills to update the modeling project to support a human task, add a Java implementation for the components, and deploy and test the business process in WebSphere Integration Developer V6.0.

Part 3 of this series shows you how to monitor the business process using WebSphere Business Monitor V6.0.




Back to top


Downloads

DescriptionNameSizeDownload method
Sample model project0606_pan-ReportRequest.zip111KBFTP
Imported modeling project0606_pan-ReportRequestPrepare.zip10KBFTP
Sample model project0606_pan-ModelerExport.zip5KBFTP
Interchange project for WID0606_pan-ReportRequest4WID.zip16KBFTP
Information about download methods


Resources

Learn

Discuss


About the authors

Ji Wen Jin, PhD, is a Staff Software Engineer with the IBM Software Group, Application and Integration Middleware Software, in China. The fields he researches include EAI, Business Intelligence, MDA, and Java technology. He has worked on DB2 Cube Views, DB2 Alphablox, WebSphere DataStage, WebSphere Business Modeler, WebSphere Integration Developer, WebSphere Process Server, and WebSphere Business Monitor.


Panxiongfei's photo

Xiong Fei Pan is a graduate student from Tongji University, Shanghai, China. He is interested in Java technology. You can learn more about him by reading his blog.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top


This is the first trademark attribution statement. This is the second trademark attribution statement. Other company, product, or service names may be trademarks or service marks of others.