Setting up a group worklist

This section describes how to set up a worklist for a group of users. It explains how you can customize the look and feel of the Web client by adding a custom Viewer. This GroupWorkListViewer shows how to take advantage of the built-in commands and how to use Java Server Pages (JSPs) to create response pages. The tutorial also adds a new queryGroupWorkItems command by implementing a user-defined CommandHandler. In addition, you can learn how you can use the existing WebClient.properties file to store the properties for your Web client extensions. Because it is not only configuring the sample but also programming code, the sections for setting up a group are also called tutorial.

The group worklist is designed as follows: It is assumed that there is a so-called logical Workflow user, called GROUP. The name and all other settings can be customized by editing the WebClient.properties file. The work items of the GROUP user must be handled by serveral other (real) users. If a user logs on, the worklist for this user is displayed. It contains only those work items that are assigned to this user. If there are only few work items available on this worklist, new work items are transferred from the GROUP worklist. The number of work items to be transferred is controlled by the grouplist query threshold.

Coding the group worklist

The tutorial for setting up a group worklist provides source code templates for each implementation step together with a possible solution. The resulting group worklist is fully functional for the Web client. The areas in the source code where you need to add your own code are marked with a '@tbd' tag.

The source files for setting up a worklist are stored in <MQWFDir>/smp/WebClient/groupwl. Change to this directory and edit the jc.bat file to point to your MQSeries Workflow installation and to your servlet.jar file. You can then use the jc.bat to compile your Web client extensions, for example:

jc step1\GroupWorkListViewer.java
Make sure that you add the groupwl directory to the CLASSPATH of your application server, or of the servlet container before testing your Web client extensions.

Coding the group worklist consists of the following steps:
  1. Create a Viewer that displays a particular worklist.
  2. Create a JSP file to display the worklist.
  3. Create a CommandHandler that provides a queryGroupWorkItems command.

Limitations of the group worklist

When you use the group worklist, there are several things that you must consider:

Testing

For testing purposes, this tutorial contains a test FDL file, which defines a logical user 'GROUP' and a small process with work items that are assigned to GROUP. Import and translate this FDL file which can be found at <MQWFDir>/smp/WebClient/groupwl/group.fdl. The directory also contains a utility, Group.java, that allows you to delete the worklists as well as to create or delete instances of the sample GroupWorkList process. If you use Windows as platform, a small batch file is provided to compile and invoke the Group class. You must edit this group.bat file to point the CLASSPATH to your MQSeries Workflow installation.

You can use the logging facility for testing purposes. To activate logging, edit the WebClient.properties file and change the line

#Logfile=<MQWFDir>/cfgs/<cfgID>/WebClient/servlet.log
to
Logfile=<MQWFDir>/cfgs/<cfgID>/WebClient/servlet.log