Contents

This document includes the following topics:

  1. Introduction
  2. Prerequisites
  3. Installing the Portal Client
  4. Known restrictions
  5. How to use the Portal Client
  6. Converting your existing Web Client JSPs for use with the Portal Client
  7. API documentation

Introduction

IBM WebSphere MQ Workflow V3.6 - Portal Client allows you to access your WebSphere MQ Workflow system from within WebSphere Portal Server. The functionality is similar to the IBM WebSphere MQ Workflow Web client. Using these functions, you can execute your business processes modelled in the workflow system. Like with the WebSphere MQ Workflow Web Client, you can customize the look and feel of the Portal Client, and can extend it's functionality.

If you have already customized JSPs for the Workflow Web Client, you can also use them in the Portal Client. How to reuse your existing JSPs is described in Converting your existing Web Client JSPs for use with the Portal Client.

The following figure illustrates the structure of the WebSphere MQ Workflow Portal Client.


Two types of Workflow portlets run in the WebSphere Portal Server:

To make full use of the portal's capabilities, you can and should include several action portlet instances on a portal page. These portlets use the Web Client BuiltinHandler to interact with the Workflow system using the Java API and MQ messages.

The architecture of the Workflow Portal Client allows CommandHandlers and viewers that were originally written for the Workflow Web Client to be reused in a portal context. You can use a new viewer interface, JSPPortletViewer, to generate portal specific views of the data in the Workflow system.

Prerequisites

IBM WebSphere MQ Workflow V3.6 - Portal Client requires the following prerequisites:

Installing the Portal Client in WebSphere Portal Server

The Installation Guide book of WebSphere MQ Workflow 3.6 contains the description of the installation steps for the Portal Client. On z/OS please check the Customization and Administration book.

Known restrictions

For version 3.6 of the MQ Workflow Portal Client, there are no known restrictions at the moment when writing these instructions. Check the ReadMe for last minute information

How to use the Portal Client

How to use IBM WebSphere MQ Workflow V3.6 - Portal Client is described here.

 

Converting your existing Web Client JSPs for use with the Portal Client

If you have already created Activity Implementation and Process Start JSPs for the WebSphere MQ Workflow Web Client, you must perform the following steps before you can use them in the Portal Client:

  1. To allow the JavaBean access to the portal specific functions, change the included class from com.ibm.workflow.servlet.client.RequestContext to com.ibm.workflow.portlet.client.RequestContext.
  2. In addition to importing the Java and Workflow packages you also need to include
    <%@ page import="java.text.*, org.apache.jetspeed.portlet.*" %>
  3. To get access to the Portal API functions:
    1. Include the Portlet tag library:
      <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
    2. Initialize the default objects with: <portletAPI:init />
  4. You must modify all commands used in your JSPs to include a Portlet Action together with the Workflow command. Use the RequestContext.getPortletCommand(String PortletAction, String command, String id) method(s) instead of RequestContext.getCommand(...)
    The following Portlet Actions are available:
    Name of DefaultPortletAction Implied actions
    cancel This action type is used for commands that only require the default view to be displayed again, and do not need to inform other instances about any changes. For a List Portlet, the default view is the most recently displayed list. For an Action Portlet, the default view is generated by ActionPortletNotUsed.jsp.
    free This action marks an Action Portlet as free, resets the Action Portlet view to the default view generated by ActionPortletNotUsed.jsp, and refreshes all List Portlet instances on the page.
    list If an action of this type is triggered in a List Portlet, the command is executed and only the list view is updated.
    select This action type causes an MQWFPortletMessage to be sent to a free Action Portlet. When it receives the message, the target Action Portlet sets its status to 'used', it executes the command contained in the message, generates a new view showing the results of the command, and refreshes all List Portlet instances on the page.
    cancelRequest This action type is used by commands that require the views of used Action Portlets to be updated, for example, terminate/delete ProcessInstance or cancelCheckout triggered from a worklist. A message is sent to the Action Portlets to display either the canceled work item or other information related to a terminated process instance, and all List Portlet instances on the page are refreshed.
    A typical activity implementation or process start JSP will therefore only use the "free" action with its commands. As soon as the button is clicked, and the corresponding command has been executed, the portlet will be made available again for following activities.
  5. If you are using the openForm() convenience method to generate the input form's start tag, the portlet.client.RequestContext class will generate an appropriate form with a "free" action appended to the command. The only extra thing you have to do is to set the PortletResponse in the RequestContext prior to the openForm() call. You can do this by calling setPortletResponse(PortletResponse response) on the RequestContext object.
  6. To make the JSPs portal compatible, remove the <head>, </head>, <body> and </body> tags.

 

API documentation

Each method in the IBM WebSphere MQ Workflow V3.6 - Portal Client API is described here.


© Copyright IBM Corporation 2004, 2005. All Rights Reserved.