The samples for the Web Client are not part of the initial installation. After having installed the Web Client, configure the samples as described in the following sections.
It is assumed that the Web Client is already installed and configured. You should also have created a process template list, a process instance list, and a work list. You can do this either by configuring the JSPViewer before starting the Web Client or by using the standard Runtime Client.
| Core Viewers | Source code for the DefaultViewer and JSPViewer classes |
| InternetConnectionViewer | Changes the look and feel of the worklist to mimic the IBM FlowMark V2 Internet Connection |
| CommandHandlerAdapter | Allows to register more than one command handler and dispatches commands |
| HTMLDocHandler | Accesses process documentation from the Web Client's template list |
| AuditTrailHandler | Uses JDBC and XML to display audit trail information for processes and activites |
| EmailHandler | Uses SMTP to send notification emails when an item has been transferred |
| Credit Request | Web Client additions for the credit request sample that comes with MQSeries Workflow |
| StarterPEAHandler | Uses the onLogon hook to start a batch PEA for the 'Web user' |
| BasicAuthenticationHandler | Demonstrates third-party authentication using HTTP/1.1 Basic Authentication |
| Application Data Integration | Demonstrates how to integrate non-Workflow data in activity implementation JSPs |
| Group Work List | A tutorial that shows how to customize the work list and how to add new commands |
| Web Credit Request | A complementary support pac that illustrates the 'Web user' feature and the usage of a UPES |
This is not actually a sample, but the source code for two Viewers shipped
with the Web Client. You can find the files at
<MQWFDir>/smp/WebClient/DefaultViewer.java and
<MQWFDir>/smp/WebClient/JSPViewer.java. You may want to
have a look at this code when developing your own Viewers.
This sample changes the look and feel of the Web Client's work list to
mimic the IBM FlowMark V2 Internet Connection. This can be done by
either registering a custom Viewer or - when using
JSPViewer - by replacing the JSP responsible
for rendering the lists. Switch your browser's language to German in
order to see localized texts.
See also the API documentation for
InternetConnectionViewer.java.
To run this sample using a custom Viewer:
point.gif, workflow.gif, and
restart.gif files from the
<MQWFDir>/smp/WebClient/images directory to the
<MQWFDir>/WebClient/webpages/images directory.| DefaultViewer=com.ibm.workflow.servlet.sample.InternetConnectionViewer |
<MQWFDir>/smp/WebClient directory. You must restart
the Web Client for this change to become effective. There is no change to the
CLASSPATH necessary since this sample Viewer is already
contained in fmcohcli.jar.To run this sample using a custom JSP:
point.gif, workflow.gif, and
restart.gif files from the
<MQWFDir>/smp/WebClient/images directory to the
<MQWFDir>/WebClient/webpages/images directory.<MQWFDir>/WebClient/webpages/forms/ListViewer.jsp, then
copy <MQWFDir>/smp/WebClient/forms/InternetConnectionListViewer.jsp to
<MQWFDir>/WebClient/webpages/forms/ListViewer.jsp. Make
sure the new ListViewer.jsp has its modification time updated
or the JSP might not be recompiled.| DefaultViewer=com.ibm.workflow.servlet.client.JSPViewer |
ListViewer.jsp
from your backup.This sample
CommandHandler loads up to 16 other command handlers
and dispatches user-defined commands to them, thus allowing for more than one
custom handler. It also shows how to read settings from the
WebClient.properties file.
See also the API documentation for
CommandHandlerAdapter.java.
To use this sample:
| CommandHandler=com.ibm.workflow.servlet.sample.CommandHandlerAdapter |
[CommandHandlerAdapter] section of WebClient.properties
register all command handlers that you would like to use by adding lines
of the form
| <CommandHandlerClassName>=<index> |
CLASSPATH necessary since this sample
CommandHandler is already contained in fmcohcli.jar.This sample allows HTML documentation exported from MQSeries Workflow Buildtime to be accessed from the Web Client's template list. See also the API documentation for HTMLDocHandler.java.
To prepare the HTML documentation for a process:
ProcessDocs subdirectory in
<MQWFDir>/WebClient/webpages. The process documentation
files will be created in this directory. If the Buildtime component is
installed on a different machine than the Web Client, you will have to
copy the exported HTML files to that subdirectory on your Web server.<MQWFDir>/WebClient/webpages/ProcessDocs/<ProcessName>.htm.
Make sure to use the process name as file name and to use .htm
(not .html) as file extension. This is necessary because the
HTMLDocHandler uses the Process Template name to find the corresponding
HTML file (for the same reason you must export each process
individually).To run this sample:
htmldoc.gif file from the
<MQWFDir>/smp/WebClient/images/action directory to the
<MQWFDir>/WebClient/webpages/images/action directory.| CommandHandler=com.ibm.workflow.servlet.sample.HTMLDocHandler |
CLASSPATH necessary since this sample
CommandHandler is already contained in fmcohcli.jar.HTMLDocHandler does not
show the icon for processes where no HTML documentation is available
in <MQWFDir>/WebClient/webpages/ProcessDocs.
Note that you can find the source code for this CommandHandler in the
<MQWFDir>/smp/WebClient directory.This sample accesses the audit trail using JDBC and returns the event data in XML format. This data is then formatted using XSL style sheets. Audit trail data can be queried from the process list where a table with all events will be shown as well as from the work list where activity statistics will be shown. Both use the Bean Scripting Framework to exploit JavaScript within the XSL style sheet. See also the API documentation for AuditTrailHandler.java.
CLASSPATH. Usually this is the same place where you registered
fmcohcli.jar, for example, in WebSphere it is the
'Command line arguments' field on the 'Application Server Properties' -
'General' page.CLASSPATH.
Note that WebSphere Application Server V3.5 already ships all those
.jar files, but they might not work because they are incompatible.audittrail.gif file from the
<MQWFDir>/smp/WebClient/images/action directory to the
<MQWFDir>/WebClient/webpages/images/action directory.AuditTrail.xsl and Statistics.xsl from the
<MQWFDir>/smp/WebClient/xml/xsl directory to the
<MQWFDir>/WebClient/webpages/xml/xsl directory.| CommandHandler=com.ibm.workflow.servlet.sample.AuditTrailHandler |
DB2Server, Database, DB2User,
and DB2Password settings in the [AuditTrail]
section of WebClient.properties and make sure they are
correctly set for your environment.StyleSheetPI and StyleSheetWI
lines in order to get formatted HTML pages instead of raw XML output.
You must restart your application server for all these changes to become
effective.This sample handler intercepts the transferItem command in
ListViewer.jsp. It allows to specify an email address where
to send a notification of the item transfer.
See also the API documentation for
EmailHandler.java.
CLASSPATH. Usually
this is the same place where you registered fmcohcli.jar,
for example, in WebSphere it is the 'Command line arguments' field on the
'Application Server Properties' - 'General' page.EmailViewer.jsp file from the
<MQWFDir>/smp/WebClient/forms directory to the
<MQWFDir>/WebClient/webpages/forms directory.
Alternatively, you can copy
<MQWFDir>/smp/WebClient/forms/EmailViewer_html.jsp to
<MQWFDir>/WebClient/webpages/forms/EmailViewer.jsp if
your mail client natively supports HTML. The latter form also contains
some additional documentation.| CommandHandler=com.ibm.workflow.servlet.sample.EmailHandler |
| DefaultViewer=com.ibm.workflow.servlet.client.JSPViewer |
DefaultViewer class.Host and Address settings in the
[SMTP] section of WebClient.properties and
make sure they are correctly set for your environment.
You must restart your application server for all these changes to become
effective.This sample contains HTML and JSP forms to be used with the Credit Request sample that comes with MQSeries Workflow. It shows how to customize the look and feel of the forms being displayed when processes and work items are started from the Web Client. See also the corresponding section in Activity Execution for more details. Furthermore, this sample shows how to use the 'Web user' feature of the Web Client that allows you to start processes without logging on to workflow.
To run this sample using the Web Client:
<MQWFDir>/scenario/credit/fmccred.fdl
into Runtime and translate it. For details on how to use the Runtime import utility,
see the MQSeries Workflow Getting Started with Buildtime book.<MQWFDir>/scenario/credit/processes to
<MQWFDir>/WebClient/webpages/processes.<MQWFDir>/scenario/credit/programs to
<MQWFDir>/WebClient/webpages/programs.<MQWFDir>/scenario/credit/images to
<MQWFDir>/WebClient/webpages/images.creditsample.css from <MQWFDir>/scenario/credit
to <MQWFDir>/WebClient/webpages.<MQWFDir>/WebClient/webpages/processes/CreditRequest.html
(when using DefaultViewer) or
<MQWFDir>/WebClient/webpages/processes/CreditRequest.jsp
(when using JSPViewer). Note that
the name of the JSP or HTML form to be launched is derived from the process template
name. When developing your own applications you should use JSPs rather
than the propriatary HTML templates. The latter are only supported for
backward compatibility with application servers that do not yet support
JSPs.<MQWFDir>/WebClient/webpages/programs/NCollectCreditData.html or
<MQWFDir>/WebClient/webpages/programs/NCollectCreditData.jsp.
Note that the name of the JSP or HTML form to be launched is derived from
the name of the program assigned to the activity.To run this sample using the 'Web user' feature:
<MQWFDir>/scenario/credit/fmccred.fdl
into Runtime and translate it. For details on how to use the Runtime import utility,
see the MQSeries Workflow Getting Started with Buildtime book.<MQWFDir>/scenario/credit/starter to
<MQWFDir>/WebClient/webpages/starter.<MQWFDir>/scenario/credit/starter/starter.fdl file
to create a user ID STARTER with password password.StarterUserID and StarterPassword
properties. Note that you have to restart the Web Client for these changes
to become effective. Also note that the StarterUserID cannot
be used to log on to Workflow with the Web Client./MQWFClient,
you must enter the new root URI in these files.This sample shows how to use the CommandHandler.onLogon() and CommandHandler.onLogoff() hooks to automatically start a Program Execution Agent for the 'Web user'. See also the API documentation for StarterPEAHandler.java.
Note that since this PEA runs on the Application server machine
it is not suited for activities that require user interaction. If you expect
more than small workload for the Web user ID, you should consider using a
User-defined PES (UPES) instead of this PEA.
For a completely different use of the onLogon hook see the
Group Work List tutorial.
| CommandHandler=com.ibm.workflow.servlet.sample.StarterPEAHandler |
| StarterPEA=true |
This sample shows how to use the
CommandHandler.getCredentials() hook to extract credentials from an HTTP
request which are later used to authenticate with MQSeries Workflow without
having to specify userID and password for the
BuilinHandler.logon() command.
See also the API documentation for
BasicAuthenticationHandler.java.
| CommandHandler=com.ibm.workflow.servlet.sample.BasicAuthenticationHandler |
| fmczchk -c inst:m,RTAuthenticationExitTypeServer,JAVA -y <cfgID> |
| CLASSPATH=<MQWFDir>\bin\fmcoutil.jar;<MQWFDir>\WebClient\fmcohcli.jar |
com.ibm.workflow.java.exit.Authentication,
is already contained in fmcohcli.jar. That is, you must not put this jar
file on the Workflow Administration server's CLASSPATH if you do not use this
example.java.exe
in the <WinDir>\system32 directory since the
Workflow Java bridge must be able to find the JVM DLL.userID or
password needed for the logon command.This example demonstrates how to display non-Workflow data in activity implementation JSPs, how to store non-Workflow data entered in theses JSPs, and how to use custom icons in the process monitor.
Custom icons are assigned to activities when modeling the process in
Buildtime. If these icons are to be shown in the Web Client's process monitor,
they must be converted to the JPG format and placed in the
<MQWFDir>/WebClient/webpages/images/icons directory. On Unix platforms,
make sure the file names consist of lowercase characters only.
<MQWFDir>/smp/WebCredit/appdata.fdl into Runtime and
translate it. For details on how to use the Runtime import utility,
see the MQSeries Workflow Getting Started with Buildtime book.ACreateCustomer.jsp, ASaveCustomer.jsp,
and AShowCustomer.jsp files from
<MQWFDir>/smp/WebClient/programs to
<MQWFDir>/WebClient/webpages/programs.letter.jpg and diskette.jpg files
from <MQWFDir>/smp/WebClient/images/icons to
<MQWFDir>/WebClient/webpages/images/icons.