Completing the Step

In order to understand the options available for customizing completion of a workflow step, it is helpful to understand the basic page data flow for Step Processors and Launch Step Processors. A Step Processor (such as the Workplace out-of-the-box VWTabbedStepApplication) is typically invoked from a User Tasks Page. When an end user (workflow participant) in the User Tasks Page selects either the "Inbox" User queue (a user involved in an workflow will normally receive new assignments in a workflow user Inbox) or a public Work queue (for work that may be done by any one of a number of users), the queue's contents are displayed in the User Tasks Page window. When the end user selects a particular step assignment from the displayed queue contents, the appropriate Step Processor client application is launched in a browser window (for information on the algorithm used to determine which Step Processor to select, see Opening Step Processors).

When an end user completes a workflow step, the user selects one of a number of options; for example, to click a Complete button or menu option on the Step Processor user interface if the user's work for this step has been completed, to click a Save button to save the work as of its current state, and so on. In order to understand how to customize your Step Processor for the completion of a user's work, it is helpful to understand the page data flow of a typical Step Processor and Launch Step Processor (e.g., the out-of-the-box VWTabbedStepApplication Java Step Processor).

This topic describes the operations associated with completing a workflow step as follows:

Step Processor Page Data Flow

The following figure illustrates the basic page data flow for theout-of-the-box VWTabbedStepApplication Java Step Processor:

As indicated in the figure, when the end user completes the step with any of the following actions: Complete, Return, or MoveToQueue the user is redirected back to the User Task Page (queue content page). The user can also elect to save work as of its current state or cancel any updating activity. If the user elects to reassign the step assignment, the Step Reassignment application is launched. From the Step Reassignment page, the user can then either cancel (returning to the popup Step Processor application) or apply the reassignment, in which case the user is redirected back to the PWM queue.

Launch Step Processor Page Data Flow

The page data flow for a Launch Step Processor differs from — and is more limited than— a typical general step page data flow. The following figure illustrates the basic page data flow for theout-of-the-box VWTabbedLaunchApplication Java Launch Step Processor:

As indicated in the figure, when the end user launches a workflow definition, the workflow launcher launches the Launch Step Processor page. The only options an end user can select are to either launch the workflow or to cancel the launch. In either case, the user is redirected back to the Workflow Launcher page.

Sample Step Completion Code

The following example code illustrates two ways of completing a step:

1. The following example code illustrates completing a step (using the doDispatch() API method) for Step Elements retrieved from a queue. vwStepElement.doDispatch() saves changes made to the object associated with this Step Element, unlocks it, and moves the current step to the next workflow step.

 // complete the step
       vwStepElement.doDispatch();
   

2. The following example code illustrates completing a step (using the doDispatch() API method) for work objects retrieved from a queue:

 // complete the step
       workObject.doDispatch();