Group Worklist - Tutorial Part 1

First, create a custom Viewer that overrides the logonResponse method to display a worklist. The name of the worklist is to be read from the WebClient.properties file. Next, use the Web Client's built-in commands to display this worklist. The name of the new Viewer is GroupWorkListViewer and it should extend the DefaultViewer class so that all other methods can be inherited. This is the recommended way if you only want to override certain methods in your custom Viewer. This avoids having to recreate the entire interface. The new section in WebClient.properties should be called GroupWorkList and the properties should be WorkListName (default '_WORKLIST') and GroupListName (default '_GROUPLIST').
  1. Change to the step1 directory.
  2. Copy GroupWorkListViewer.start to GroupWorkListViewer.java.
  3. Edit GroupWorkListViewer.java and add the necessary import statements.
  4. Add the appropriate base class to GroupWorkListViewer.
  5. In the init() method, read the workListName and groupListName properties from the WebClient.properties file. Use the Config.getParameter() method to do so.
  6. In the logonResponse() method, use the ExecutionService.createWorkList() call to create the worklist called workListName if it does not yet exist. Use 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 which you can use.
  8. Change to the parent directory and run
    jc step1\GroupWorkListViewer.java
    to compile your file.
  9. Edit the <MQWFDir>/WebClient/WebClient.properties file and change the line reading
    #DefaultViewer=com.ibm.workflow.servlet.client.DefaultViewer
    to
    DefaultViewer=com.ibm.workflow.servlet.sample.GroupWorkListViewer
  10. Restart your Web server and logon to Workflow using the http://localhost/MQWFClient/RTC.html page.
  11. Check the servlet.log file to see which Viewer has been loaded by the Web Client.
  12. Finally, compare your solution to the one provided (file GroupWorkListViewer.sol).
Go to step 2
© Copyright IBM Corporation 1999, 2001. All Rights Reserved.