Group Worklist - Tutorial Part 2

The second part of the tutorial involves replacing the worklist page generated by the base class DefaultViewer with a page generated by a custom JSP file.
  1. Change to the step2 directory.
  2. Copy GroupWorkListViewer.start to GroupWorkListViewer.java.
  3. Edit GroupWorkListViewer.java and change the base class from DefaultViewer to JSPViewer. Although this is not necessary for the custom JSP to be displayed, it provides JSP-based implementations for all of the methods, which are not overridden by the GroupWorkListViewer class.
  4. Replace the call to the base class' queryWorkItemsResponse method with a call to your own class' method (which is described in the next step).
  5. Add the queryWorkItemsResponse method. The first statement in this method is used to store the workListOID in the RequestContext object that is being passed to the JSP. This OID is the one, which is set in logonResponse. Here, an instance variable is used instead of a local variable.
  6. Create and return a ResponsePage object that forwards creating the response page to /forms/GroupWorkList.jsp.
  7. Copy GroupWorkList.start to GroupWorkList.jsp.
  8. Edit the GroupWorkList.jsp file and add the import statement for the Web Client's package.
  9. Add a jsp:useBean statement to access the RequestContext object that is necessary to create the response page. This is the same object, which was passed as a parameter to the ResponsePage in the queryWorkItemsResponse method. Use the following attributes for the useBean statement:
    id="context"
    scope="request"
    type="com.ibm.workflow.servlet.client.RequestContext"
    
  10. Retrieve the workListOID that has been set in the queryWorkItemsResponse method. Use the RequestContext.getAttribute() call for this.
  11. Create a string cmdRefresh for the queryWorkItems command used by the 'Refresh' button. Set the useCache parameter to false. The SessionContext class provides methods to create these command strings.
  12. Check the loop that constructs a line for each work item on the worklist.
  13. To deploy the JSP, copy the file GroupWorkList.jsp to the <MQWFDir>/WebClient/webpages/forms directory.
  14. Change to the parent directory and run
    jc step2\GroupWorkListViewer.java
    to compile your file.
  15. Restart your Web server and logon to Workflow using the http://localhost/MQWFClient/RTC.html page.
  16. Finally, compare your solution to the one provided (files GroupWorkListViewer.sol and GroupWorkList.sol).
Go to step 3
© Copyright IBM Corporation 1999, 2001. All Rights Reserved.