atg.workflow
Class TaskDescriptor

java.lang.Object
  extended by atg.workflow.ElementDescriptor
      extended by atg.workflow.TaskDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class TaskDescriptor
extends ElementDescriptor

Description of a task as specified in a workflow.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
TaskDescriptor(WorkflowDescriptor pWorkflow, java.lang.String pTaskElementId, java.lang.String pName)
          Constructs a TaskDescriptor with the given workflow, task element id, and name.
 
Method Summary
 void addOutcome(OutcomeDescriptor pOutcome)
          Adds a new outcome to this task description.
 void addWaitElementId(java.lang.String pElementId)
          Adds a new wait state element id to this task description.
 boolean equals(java.lang.Object o)
          Determines equality with another TaskDescriptor.
 AccessControlList getAccessControlList()
          Returns the default access control list which specifies who is permitted to act on this task.
 OutcomeDescriptor getOutcomeByElementId(java.lang.String pOutcomeElementId)
          Returns an OutcomeDescriptor for an outcome of this task with the given element id, or null if no such OutcomeDescriptor exists.
 OutcomeDescriptor getOutcomeByName(java.lang.String pName)
          Returns an OutcomeDescriptor for an outcome of this task with the given logical name, or null if no such OutcomeDescriptor exists.
 java.util.List getOutcomes()
          Returns the List of outcomes for this workflow.
 int getPriority()
          Returns the default priority for this task.
 java.lang.String getResourceBundleName()
          If resourceBundleName is null will return the workflow descriptors resourceBundleName.
 atg.workflow.AssetDescriptor getSubject()
          Returns the AssetDescriptor object which describes this task's subject, null if the task has no subject.
 java.lang.String getTaskElementId()
          Returns the process element id of the task element in the workflow, as it appears in the workflow definition file.
 java.util.List getWaitElementIds()
          Returns the List of wait state element ids accumulated for this task description.
 ProcessWaitState getWaitState()
          Returns the ProcessWaitState corresponding to this task.
 WorkflowDescriptor getWorkflow()
          Returns the WorkflowDescriptor for the workflow that contains this task.
 int hashCode()
          Computes the hash code for this TaskDescriptor.
 boolean isAssignable()
          Returns the flag indicating whether this task can be assigned and/or claimed.
 void setAccessControlList(AccessControlList pAcl)
          Sets the default access control list which specifies who is permitted to act on this task.
 void setAssignable(boolean pAssignable)
          Sets the flag indicating whether this task can be assigned and/or claimed.
 void setPriority(int pPriority)
          Sets the default priority for this task.
 void setSubject(atg.workflow.AssetDescriptor pSubject)
          Sets the AssetDescriptor object which describes this task's subject.
 void setTaskElementId(java.lang.String pTaskElementId)
          Sets the process element id of the task element in the workflow.
 java.lang.String toString()
          Returns a String representation of this TaskDescriptor.
 
Methods inherited from class atg.workflow.ElementDescriptor
addDescription, addDisplayName, compareTo, getDescription, getDescription, getDescriptionResource, getDisplayName, getDisplayName, getDisplayNameResource, getName, getPresentationOrdinal, getResourceBundle, setDescription, setDescriptionResource, setDisplayName, setDisplayNameResource, setName, setPresentationOrdinal, setResourceBundleName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

TaskDescriptor

public TaskDescriptor(WorkflowDescriptor pWorkflow,
                      java.lang.String pTaskElementId,
                      java.lang.String pName)
Constructs a TaskDescriptor with the given workflow, task element id, and name. The rest of the properties remain unset and must be subsequently filled in.

Parameters:
pWorkflow - the WorkflowDescriptor for the workflow that contains this task
pTaskElementId - the process element id of the task element, as it appears in the workflow definition file
pName - the logical name of this element
Method Detail

getWorkflow

public WorkflowDescriptor getWorkflow()
Returns the WorkflowDescriptor for the workflow that contains this task.


getTaskElementId

public java.lang.String getTaskElementId()
Returns the process element id of the task element in the workflow, as it appears in the workflow definition file.


setTaskElementId

public void setTaskElementId(java.lang.String pTaskElementId)
Sets the process element id of the task element in the workflow.


getAccessControlList

public AccessControlList getAccessControlList()
Returns the default access control list which specifies who is permitted to act on this task. If null, then no security checks are required. The task's default ACL can be overriden for each individual workflow instance.


setAccessControlList

public void setAccessControlList(AccessControlList pAcl)
Sets the default access control list which specifies who is permitted to act on this task.


getPriority

public int getPriority()
Returns the default priority for this task. The task's default priority can be overriden for each individual workflow instance.


setPriority

public void setPriority(int pPriority)
Sets the default priority for this task.


isAssignable

public boolean isAssignable()
Returns the flag indicating whether this task can be assigned and/or claimed.


setAssignable

public void setAssignable(boolean pAssignable)
Sets the flag indicating whether this task can be assigned and/or claimed.


addOutcome

public void addOutcome(OutcomeDescriptor pOutcome)
Adds a new outcome to this task description.

Parameters:
pOutcome - an OutcomeDescriptor for the outcome to be added

getOutcomes

public java.util.List getOutcomes()
Returns the List of outcomes for this workflow.

Returns:
a List of OutcomeDescriptor objects corresponding to this task's outcomes
See Also:
OutcomeDescriptor

getOutcomeByElementId

public OutcomeDescriptor getOutcomeByElementId(java.lang.String pOutcomeElementId)
Returns an OutcomeDescriptor for an outcome of this task with the given element id, or null if no such OutcomeDescriptor exists.

Parameters:
pOutcomeElementId - the process element id of the outcome element, as it appears in the workflow definition file

getOutcomeByName

public OutcomeDescriptor getOutcomeByName(java.lang.String pName)
Returns an OutcomeDescriptor for an outcome of this task with the given logical name, or null if no such OutcomeDescriptor exists.

Parameters:
pName - the logical name of the outcome

addWaitElementId

public void addWaitElementId(java.lang.String pElementId)
Adds a new wait state element id to this task description. This is the id of a process element waiting for a task outcome to fire. Note that this id does not necessarily correspond to a specific outcome process element, as the process engine is free to perform optimizations which cause topological changes in the workflow definition.

Parameters:
pElementId - the process element id of the task outcome event element

getWaitElementIds

public java.util.List getWaitElementIds()
Returns the List of wait state element ids accumulated for this task description. Together, all the wait element ids indicate the location in the workflow where this task is waiting for its outcomes to fire.

Returns:
a List of process element ids of the task outcome event elements

getWaitState

public ProcessWaitState getWaitState()
Returns the ProcessWaitState corresponding to this task. The ProcessWaitState is constructed using the list of accumulated wait element ids.


getSubject

public atg.workflow.AssetDescriptor getSubject()
Returns the AssetDescriptor object which describes this task's subject, null if the task has no subject.


setSubject

public void setSubject(atg.workflow.AssetDescriptor pSubject)
Sets the AssetDescriptor object which describes this task's subject.


equals

public boolean equals(java.lang.Object o)
Determines equality with another TaskDescriptor. This method only tests element ids associated with the two TaskDescriptors, not any other attributes.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Computes the hash code for this TaskDescriptor.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of this TaskDescriptor.

Overrides:
toString in class java.lang.Object

getResourceBundleName

public java.lang.String getResourceBundleName()
If resourceBundleName is null will return the workflow descriptors resourceBundleName.

Overrides:
getResourceBundleName in class ElementDescriptor