Skip to main content

skip to main content

developerWorks  >  WebSphere  >

Building a process task portlet application using the Portlet Generator in WebSphere Integration Developer 6.2

developerWorks
Go to the previous pagePage 4 of 12 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
587 KB (24 pages)

Get Adobe® Reader®

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


Using the Portlet Generator

Now, you will learn how to use the Portlet Generator. The completed Project InterChange file is in the sample Portlet_Generator_PI.zip file.

Creating the business process

Figure 4 shows a simple business process, SimpleOrderProcess, used in our example to illustrate the Portlet Generator application. This is optional if you use an existing business process.


Figure 4. Sample business process
Sample business                         process

The installable process file, CustomerServiceApp.ear, is included in the Download section.



Back to top


Defining a user interface

This section describes how to define user interface client from WebSphere Integration Developer.



Back to top


Adding the user interface client definition

  1. Open the WebSphere Integration Developer project in the Business Integration perspective.
  2. Click the plus sign in the Human Task interface (CustomerService in the sample) as shown in Figure 5, and navigate to CustomerService (double-click to open the Human Task panel).
  3. Add a user interface definition to be used by the client by clicking the plus sign shown in Figure 5, and then choose Portlets for Portal Server.

    Figure 5. User interface definition
    User interface definition



Back to top


Specifying portal client properties

Specify the unique name and type as shown in Figure 6.


Figure 6. Portal client properties
Portal client                         properties

Note: The unique name will be associated with the task page in the process portal.



Back to top


Generating the portlet graphic user interface

Now, you are ready to use the Portlet Generator wizard.

  1. Start the Portlet Generator from any Human Task (CustomerService in our example). Right-click the popup menu and choose Generate Human Task User Interface..., as shown in Figure 7.

    Figure 7. Human task user interface menu option
    Human task user                         interface menu option

  2. Specify the Generator type, Portlets for WebSphere Portal Server, and select the human tasks for generation, CustomerService in our example, as shown in Figure 8.

    Figure 8. Client generator selection
    Client generator                         selection

  3. On the Portlet Generator Settings page, enter a portlet project name, portlet_w, in our example. Choose the target runtime as WebSphere Portal v6.1 stub, and click the Finish button as shown in Figure 9.

Figure 9. Portlet generator settings
Portlet                         generator settings

Hint: Alternatively, you can start the Portlet Generator from a human task Properties panel, as shown in Figure 10, to generate the portlet user interface for the human task.


Figure 10. Alternative Portlet Generator button
Alternative                         Portlet Generator button


Back to top


Copying business process files

Copy all Web Service Description Language (WSDL) and XML Schema Definition (XSD) files that are associated with the business process into the portlet project created by the Portlet Generator wizard. The file structure of these copied files in the portlet project needs to be the same as the process project.

  1. In our example, go to the WebSphere Integration Developer Resource perspective, and copy all files under the CustomerService > com.ibm.sample package as shown in Figure 11.

    Figure 11. Business process source files
    Business                         process source files

  2. Paste these files into the portlet project's class directory as shown in Figure 12: portlet_w > WebContent > WEB-INF > classes.

    Figure 12. Business process files inclusion in the portlet project


    These process files are required in the cross-cell deployment scenario.

Hint: Alternatively, you can include the business process jar file (CustomerService.jar, in our example) into the portlet project's WEB-INF > lib directory.



Back to top


Exporting the generated portlet application

To export the generated portlet application, do the following steps:

  1. Go to WebSphere Integration Developer Menu: File > Export.
  2. Select War > War File.
  3. Export the portlet application portlet_w.war in our example, to a chosen destination folder.


Back to top



Go to the previous pagePage 4 of 12 Go to the next page