In addition to workflow servlet beans, the configuration for each new workflow type typically includes a request-scoped component of class atg.workflow.servlet.WorkflowTaskFormHandler. This form handler is used to perform workflow task operations such as setting a task’s owner and firing outcomes.

Read-only properties

The WorkflowTaskFormHandler class has four properties that together uniquely identify the task being operated on by the form handler: processName, segmentName, subjectId, and taskElementId. It also has the following read-only properties that can be accessed once the task’s identifying information has been specified:

Property

Description

taskDescriptor

TaskDescriptor object that describes the task

outcomeDescriptors

list of OutcomeDescriptor objects that describe all the possible outcomes of the task

taskInfo

TaskInfo object that describes the given task instance

Submit methods

The form handler’s submit methods operate on the task on behalf of the WorkflowView associated with the form. The following submit methods are supported:

Submit Method

Description

setTaskPriority

Sets the task’s priority to the value of the newPriority property

setTaskOwner

Sets the task’s owner to the atg.userdirectory.DirectoryPrincipal corresponding to the atg.security.Persona name specified via the newOwnerName property

claimTask

Claims the task on behalf of the current user’s view

releaseTask

Releases the task on behalf of the current user’s view

fireOutcome

Fires the task outcome identified by the outcomeElementId property

The following properties of the WorkflowTaskFormHandler are typically set in the properties file for this component:

Property

Description

workflowManager

WorkflowManager that provides access to the workflow system

workflowView

Session-scoped WorkflowView on behalf of which the task is to be manipulated

subjectRepository

MutableRepository that stores workflow subjects

subjectType

Workflow subject item type

subjectClassName

Name of the class to use when instantiating the object to be returned by the subject property; the default is atg.workflow.servlet.WorkflowTaskFormSubject (see below for details)

The following properties are typically set in the JSP:

Property

Description

processName

Name of the workflow process

segmentName

Name of the workflow process segment

subjectId

Repository ID of the workflow subject

taskElementId

ID of the workflow element of the task

newPriority

New priority value to be set by the setTaskPriority submit method

newOwnerName

Unique atg.security.Persona name of new owner, to be set by the setTaskOwner submit method

outcomeElementId

ID of the outcome element to be fired by the fireOutcome submit method

updateSubjectOnSubmit

flag indicating whether the workflow subject should be updated when the submit methods are executed (see below for details)

Navigation properties

The WorkflowTaskFormHandler also has a set of properties that are used to control navigation after a form operation has been completed. These properties specify the URLs to redirect to on certain error and success conditions. If the value for a particular condition is not set, the form is left on the page defined as the action for that form (in other words, no redirect takes place). Each operation has its own successURL and errorURL properties. Thus the following properties are available:

These properties can be set in the properties file of the form handler or by hidden tags in the JSP.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices