Selecting and Opening a Work Item

When an end user (workflow participant or Tracker) opens a work item displayed in a User Inbox (e.g., selects a step assignment from a User Inbox), a pop-up window containing either the Step Processor user interface page or a Tracker page opens in the browser. In developing a custom User Inbox, it is important to understand how these applications are opened when the user selects the work item he or she wants to work on. In addition, you will need to know which parameters to pass to the application.

The topic provides information on opening work items displayed as the results of a queue query in a User Inbox as follows:

Opening a Step Assignment

When opening a Step Processor as a work item's step assignment, it is important to understand the algorithm used to determine which is the correct Step Processor to open (among a number of applications, Step Processors, or Work Performers that may be available). In addition, you will need to know how the URL for the Step Processor user interface is supplied for the web application (for example, for Workplace) and optionally, how to display the work item state to indicate the deadline status for this work item.

Subtopics include:

Note Information used for the algorithm and the URL is provided by a VWAttributeInfo API object. For information on the VWAttributeInfo API, see the Process API JavaDoc reference documentation.

Algorithm Used for Opening a Step Processor

The algorithm used for opening a Step Processor is as follows:

Note This algorithm assumes that the Step Processor has been deployed, registered, and added to the workflow. For information, see Deploying Java Applications (Step Processors) and Adding a Custom Processor to the Workflow.

  1. Use the current web application (defined by either the applet or HTML page) to retrieve the Step Processor location and URL template (see below).
    if either one is null, then:
  2. Use a web application setting to retrieve the location, URL template and web server base URL information (user preferences first, then isolated region, then global setting). If a suitable set cannot be found, then:
  3. Iterate through the remaining "registered" web applications to find the first available set of location, URL template, and web server base URL information (note that region settings override global settings). If a suitable set cannot be found, then:
  4. If opening from an applet, then use the out-of-the-box Java Step Processor (otherwise, the application does not have enough information to open a web page). If opening from an HTML page, then the isolated region’s default Step Processor is used.

Supplying the URL for a Step Processor

When a Step Processor is launched, a corresponding URL is constructed (using the default URL template or your own URL template), as follows:

Note that the web server URL, the Step Processor JSP location, and the URL Template all need to "match" (from the same web application).

{0} - WebServer URL (use current, if it is the same web application, use set values if different)
{1} - location (use current if it is the same web application, use Step Processor information values if different)
{2} - queue name (passed in; retrieved from VWQueueElement)
{3} - work object number (passed in; retrieved from VWQueueElement)
{4} - step name (passed in; retrieved from VWQueueElement)

An example of a completed URL, using Workplace as the web application, .../mystep as the directory, step_main.jsp as the Step Processor's "View" JSP, and where MyTest is the step name, is as follows:

http://<your _server>/Workplace/eprocess/stepprocs/java/mystep/step_main.jsp? queueName=Inbox&wobNum=FA3454543AD231FDD3453&stepName=MyTest

Displaying the Work Item State

You may, optionally, wish to display the deadline status of a work item (that is, the deadline status for this workflow step) to the user. Use the VWQueueElement.getStepDeadlineStatus() API method to obtain the work item's status. Valid deadline status conditions are: DEADLINE_NOT_REACHED, DEADLINE_REMINDER_NOTIFICATION, DEADLINE_REACHED, and COMPLETED (indicates the workflow step has completed/terminated). Use the VWQueueElement.getLockedStatus() method to determine the work item's lock status (returns an integer as follows: 0 = LOCKED_BY_NONE, 1 = LOCKED_BY_USER, 2 = LOCKED_BY_SYSTEM).

For example:

// get the work item deadline
  VWQueueElement.getStepDeadlineStatus()
// is the work item locked?
  VWQueueElement.getLockedStatus()

Note For details on these VWQueueElement API methods, see the Process API JavaDoc reference documentation.

Opening a Tracker Assignment

When opening a Tracker application as a work item's Tracker assignment, it is important to understand how the URL for the Tracker user interface is supplied for the web application (for example, for Workplace).

When a Tracker application is launched, a corresponding URL is constructed in a manner similar to a Step assignment, where you specify the <base URL><Tracker Page Location>?<query string> (the <Tracker Page Location>?<query string> portion is specific to the web application), as follows:

Note The web server URL and the Tracker JSP location must "match" (from the same web application).

An example of a completed URL, using Workplace as the web application, .../eprocess as the directory, WcmTracker.jsp as the Tracker application's "View" JSP, is as follows:

http://<your _server>/Workplace/eprocess/WcmTracker.jsp?
queueName=Tracker&wobNum=FA3454543AD231FDD3453&setWindowId=mainWindow