This tutorial describes the steps how you can set up a group worklist.
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 find out how you can use the existing WebClient.properties
file to store the properties for your Web Client extensions.
The group worklist is designed as follows: It is assumed that there
is a so-called logical Workflow user, called GROUP. Note that the name and all
other settings can be customized through the WebClient.properties
file. The work items of the GROUP user must be handled by serveral other (real)
users. Whenever one of the users logs on, the worklist for this user (containing
only work items that are assigned to this user) is checked and if there are only
few work items available on this worklist, several new work items are
transferred from the GROUP worklist. The number of work items to be transferred
is controlled by the grouplist query threshold.
The tutorial provides source code templates for each implementation step
as well as 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 this tutorial 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.javaMake sure that you add the
groupwl
directory to your Application server's or Servlet container's
CLASSPATH, before testing your Web Client extensions.
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.
It can be useful to use the logging facility for testing purposes. To activate
logging, edit
<MQWFDir>/WebClient/WebClient.properties
and change the line
#Logfile=e:/fmcwinnt/cfgs/FMC/log/servlet.logto
Logfile=<MQWFDir>/WebClient/servlet.log
Viewer
that displays a
particular worklist.CommandHandler
that provides
a queryGroupWorkItems
command.group.fdl
'as is', this
user will have the default password 'password' assigned) in the
GroupWorkListHandler
class and use
this session to transfer work items to the worklists of other users.GroupWorkList.jsp
file would have
to use the
Catalog class instead of hardcoded strings. This class takes care of
the problem that the standard Java mechanism only uses the language setting
of the server machine, however, in a Web environment each client might
require a different language.