Creating a custom viewer for displaying a worklist

Creating a custom viewer is the first step when coding the sample group worklist that is provided with the Web client. It is designed as follows:

The following steps describe what you need to do to create the custom viewer for the sample group worklist. The source files for setting up the group worklist are stored in the <MQWFDir>/smp/WebClient/groupwl directory. To create the viewer, including the provided design, perform the following steps:

  1. Change to the step1 directory.
  2. Copy the GroupWorkListViewer.start file to GroupWorkListViewer.java.
  3. Edit the GroupWorkListViewer.java file, and add the necessary import statements.
  4. Add the appropriate base class to the GroupWorkListViewer.
  5. Use the Config.getParameter() method to read the WorkListName from the init() method, and the groupListName properties from the WebClient.properties file.
  6. Use the ExecutionService.createWorkList() call from the logonResponse() method to create the worklist called WorkListName if it does not yet exist. Use the parameter OWNER=CURRENT_USER as filter.
  7. Return the items on the worklist WorkListName as the logon response page. The built-in handler already provides a method to query work items that you can use.
  8. Change to the parent directory and run the
    jc step1\GroupWorkListViewer.java
    command to compile your file.
  9. Edit the WebClient.properties file and change the line
    DefaultViewer=com.ibm.workflow.servlet.client.JSPViewer
    to
    DefaultViewer=com.ibm.workflow.servlet.sample.GroupWorkListViewer
  10. Restart your Web server and log on to MQ Workflow using the http://localhost/MQWFClient-<cfgID>/RTC.html page.
  11. Check the servlet.log file to see which Viewer has been loaded by the Web client.
  12. Compare your solution with the provided solution (file name: GroupWorkListViewer.sol).

Go to Step 2: Creating a JSP file to display the worklist