WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class TaskInfo

java.lang.Object
  |
  +--com.bea.wlpi.common.TaskInfo

public final class TaskInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Holds information about a workflow task.

Objects of this class override the boolean equals(Object) and implement the comparable interface. Homogeneous collections containing objects of this class may, therefore, be searched and sorted using the Collection.contains(Object), List.indexOf(Object), Collections.sort(List) methods.

See Also:
Serialized Form

Field Summary
static int STATUS_COMPLETE
          Task is complete.
static int STATUS_INACTIVE
          Task has not yet been started.
static int STATUS_OVERDUE
          As for STATUS_PENDING, but due date is in the past.
static int STATUS_PENDING
          Task has been started but is not yet complete.
 
Constructor Summary
TaskInfo(java.lang.String templateId, java.lang.String templateDefinitionId, java.lang.String instanceId, java.lang.String taskId, java.lang.String name, java.lang.String assignee, java.lang.String workflow, java.lang.String workflowId, int priority, java.sql.Timestamp started, java.sql.Timestamp completed, java.sql.Timestamp due, java.lang.String comment, boolean doneWithoutDoit, boolean doitIfDone, boolean unmarkDone, boolean modifiable, boolean reassignment)
          Create a new TaskInfo object.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare two TaskInfo objects.
 boolean equals(java.lang.Object obj)
          Test two TaskInfo objects for equality.
 java.lang.String getAssignee()
          Return the task's assignee.
 java.lang.String getComment()
          Return the human-readable task comment.
 java.sql.Timestamp getCompleted()
          Return the date/time at which the task was completed.
 boolean getDoitIfDone()
          Return whether a user can execute the task once it is complete.
 boolean getDoneWithoutDoit()
          Return whether a user can manually mark the task as complete.
 java.sql.Timestamp getDue()
          Return the date/time by which the task should be completed.
 java.lang.String getInstanceId()
          Return the workflow instance ID.
 boolean getModifiable()
          Return whether a user can modify the task settings at runtime.
 java.lang.String getName()
          Return the task name.
 int getPriority()
          Return the task priority.
 boolean getReassignment()
          Return whether a user can reassign the task at runtime.
 java.sql.Timestamp getStarted()
          Return the date/time at which the task was started.
 int getStatus()
          Return the task's status.
 java.lang.String getTaskId()
          Return the task ID.
 java.lang.String getTemplateDefinitionId()
          Return the workflow template definition ID.
 java.lang.String getTemplateId()
          Return the workflow template ID.
 boolean getUnmarkDone()
          Return whether a user can manually mark the task as incomplete.
 java.lang.String getWorkflow()
          Return the workflow name.
 java.lang.String getWorkflowId()
          Return the human-readable workflow instance label.
 java.lang.String toString()
          Return a string representation of the object, listing the field values.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_INACTIVE

public static final int STATUS_INACTIVE
Task has not yet been started.

STATUS_PENDING

public static final int STATUS_PENDING
Task has been started but is not yet complete.

STATUS_OVERDUE

public static final int STATUS_OVERDUE
As for STATUS_PENDING, but due date is in the past.

STATUS_COMPLETE

public static final int STATUS_COMPLETE
Task is complete.
Constructor Detail

TaskInfo

public TaskInfo(java.lang.String templateId,
                java.lang.String templateDefinitionId,
                java.lang.String instanceId,
                java.lang.String taskId,
                java.lang.String name,
                java.lang.String assignee,
                java.lang.String workflow,
                java.lang.String workflowId,
                int priority,
                java.sql.Timestamp started,
                java.sql.Timestamp completed,
                java.sql.Timestamp due,
                java.lang.String comment,
                boolean doneWithoutDoit,
                boolean doitIfDone,
                boolean unmarkDone,
                boolean modifiable,
                boolean reassignment)
Create a new TaskInfo object.
Parameters:
templateId - The template ID.
templateDefinitionId - The template definition ID.
instanceId - The workflow instance ID.
taskId - The task ID.
name - The task name as displayed to the user.
assigneeId - The ID of the participant to whom the task is assigned.
workflow - The workflow name.
workflowId - The human-readable workflow instance label.
priority - The task priority (0=low,1=medium,2=high).
started - The date on which task was started.
completed - The date on which task was completed.
due - The date by which task should be completed.
comment - The human-readable task comment.
doneWithoutDoit - true if a user can manually mark the task as complete.
doitWithoutDone - true if a user can execute the task once it is marked as complete.
unmarkDone - true if a user can manually mark the task as incomplete.
modifiable - true if a user can modify the task settings at runtime.
reassignment - true if a user can reassign the task at runtime.
Method Detail

getStatus

public final int getStatus()
Return the task's status.
Returns:
A value describing the task's status: STATUS_INACTIVE, STATUS_PENDING, STATUS_OVERDUE or STATUS_COMPLETE.

getTemplateId

public final java.lang.String getTemplateId()
Return the workflow template ID.
Returns:
The workflow template ID.

getTemplateDefinitionId

public final java.lang.String getTemplateDefinitionId()
Return the workflow template definition ID.
Returns:
The workflow template definition ID.

getInstanceId

public final java.lang.String getInstanceId()
Return the workflow instance ID.
Returns:
The workflow instance ID.

getTaskId

public final java.lang.String getTaskId()
Return the task ID.
Returns:
The task ID.

getName

public final java.lang.String getName()
Return the task name.
Returns:
The task name.

getAssignee

public final java.lang.String getAssignee()
Return the task's assignee.
Returns:
The ID of the task's assignee.

getWorkflow

public final java.lang.String getWorkflow()
Return the workflow name.
Returns:
The workflow name.

getWorkflowId

public final java.lang.String getWorkflowId()
Return the human-readable workflow instance label.
Returns:
The human-readable workflow instance label.

getPriority

public final int getPriority()
Return the task priority.
Returns:
The task priority.

getStarted

public final java.sql.Timestamp getStarted()
Return the date/time at which the task was started.
Returns:
The date/time at which the task was started.

getCompleted

public final java.sql.Timestamp getCompleted()
Return the date/time at which the task was completed.
Returns:
The date/time at which the task was completed.

getDue

public final java.sql.Timestamp getDue()
Return the date/time by which the task should be completed.
Returns:
The date/time by which the task should be completed.

getComment

public final java.lang.String getComment()
Return the human-readable task comment.
Returns:
The human-readable task comment.

getDoneWithoutDoit

public final boolean getDoneWithoutDoit()
Return whether a user can manually mark the task as complete.
Returns:
true if a user can manually mark the task as complete.

getDoitIfDone

public final boolean getDoitIfDone()
Return whether a user can execute the task once it is complete.
Returns:
true if a user can execute the task once it is marked as complete.

getUnmarkDone

public final boolean getUnmarkDone()
Return whether a user can manually mark the task as incomplete.
Returns:
true if a user can manually mark the task as incomplete.

getModifiable

public final boolean getModifiable()
Return whether a user can modify the task settings at runtime.
Returns:
true if a user can modify the task settings at runtime.

getReassignment

public final boolean getReassignment()
Return whether a user can reassign the task at runtime.
Returns:
true if a user can reassign the task at runtime.

equals

public boolean equals(java.lang.Object obj)
Test two TaskInfo objects for equality.
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object with which to compare this one.
Returns:
true if obj is an instance of TaskInfo with the same taskId and instanceId as this one.
See Also:
compareTo(java.lang.Object)

compareTo

public int compareTo(java.lang.Object o)
Compare two TaskInfo objects.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - Object with which to compare this one. Must be null or an instance of TaskInfo.
Returns:
The result of comparing the started members using the Date.compareTo(Object) method.
Throws:
java.lang.ClassCastException - if o is not an instance of TaskInfo.
See Also:
equals(java.lang.Object)

toString

public java.lang.String toString()
Return a string representation of the object, listing the field values.
Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object, listing the field values.

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.