Package com.thortech.xl.vo.workflow
Class TaskDefinition
java.lang.Object
com.thortech.xl.vo.workflow.TaskDefinition
- All Implemented Interfaces:
Serializable
- Author:
- nkaushik Represents the definition of a workflow task in a workflow definition. Includes all information about the task definition like name, properties, etc.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependsOnTask
(String taskName) Add a task to the list of tasks this task depends onReturns the list of tasks this task depends on.String[]
Returns the list of tasks this task depends on.Returns the description of the taskgetKey()
Returns the Definition Key of the taskgetName()
Returns the name of the taskReturns the list of Email Notifications set up for this task.String[]
Returns the list of Recovery Tasks defined for this task.Returns the HashSet of Recovery Tasks defined for this task.getResponseDefinition
(String response) Returns the Response Definition object defined for this task with the provided Response CodeString[]
Returns the list of Response Codes for all responses defined for this taskReturns the list of Responses defined for this task.Returns the number of times a rejected instance of this task will be retriedReturns the time period after which a rejected instance of this task will be retriedReturns the list of Task Status to Object Status Mappings defined for this task.Returns the name of the task adapter attached to this taskReturns the Definition Key (EVT_KEY) of the Adapter or Event Handler attachedReturns the list of Task Adapter Mappings defined for this task.Returns the attachment status of the attached adaptergetTaskAssignment
(int priority) Returns the Task Assignment Rule defined for this task with the provided priorityReturns a list of Task Assignment Rules defined for this task.Returns the Task Effect of this taskReturns the name of the form field for which this task is a listenerString[]
Returns the list of Undo Tasks defined for this task.Returns the HashSet of Undo Tasks defined for this task.int
boolean
Returns whether the task is allowed to be inserted multiple times into the same workflow instanceboolean
Returns whether the task is automated or not.boolean
Returns whether the task is allowed to be cancelled while still in pending stateboolean
Returns whether the task should Complete on Recovery Tasks completionboolean
Returns whether the task is a conditional task or notboolean
boolean
Returns whether the task can be manually inserted into a workflow or notboolean
boolean
boolean
Returns whether the task is required to be complete for workflow completion or notboolean
boolean
boolean
void
removeDependsOnTask
(String taskName) Remove a task from the list of tasks this task depends onvoid
removeNotification
(EmailNotification notification) Removes an Email Notification from the list of notifications set up for this taskvoid
removeTaskAssignment
(int priority) Remove the task assignment rule attached with the provided priorityvoid
removeUndoTask
(String undoTask) Removes a task from the list of Undo Tasksvoid
setAllowMultiple
(boolean allowMultiple) Sets whether the task is allowed to be inserted multiple times into the same workflow instancevoid
setCancelWhilePending
(boolean cancelWhilePending) Sets whether the task is allowed to be cancelled while still in pending statevoid
setChildOf
(HashMap childOf) void
setChildTable
(String childTable) void
setCompleteOnRecovery
(boolean completeOnRecovery) Set whether the task should Complete on Recovery Tasks completionvoid
setConditionalTask
(boolean conditionalTask) Sets whether the task is a conditional task or notvoid
setDependsOn
(HashSet dependsOn) Sets the list of tasks this task depends on.void
setDescription
(String description) Sets the description of the taskvoid
setEventHandler
(boolean isEventHandler) void
Sets the Definition Key of the taskvoid
setManualInsertNotAllowed
(boolean manualInsertNotAllowed) Sets whether the task can be manually inserted into a workflow or notvoid
Sets the name of the taskvoid
setNotification
(EmailNotification notification) Adds an Email Notification to the list of notifications set up for this task.void
setNotifications
(HashSet notifications) Sets the list of Email Notifications set up for this task.void
setOfflined
(boolean offlined) void
setRecoveryTask
(String recoveryTask) Add a task to the list of Recovery Tasksvoid
setRecoveryTasks
(String[] recoveryTaskList) Sets the list of Recovery Tasks defined for this task.void
setRemovedTask
(boolean removedTask) void
setRequiredComplete
(boolean requiredComplete) Sets whether the task is required to be complete for workflow completion or notvoid
setResponse
(String response, ResponseDefinition responseDefinition) Add a new Response Definition to the list of Responses defined for this task.void
setResponses
(HashMap responses) Sets the list of Responses defined for this task.void
setRetryCount
(String retryCount) Sets the number of times a rejected instance of this task will be retriedvoid
setRetryPeriod
(String retryPeriod) Sets the time period after which a rejected instance of this task will be retriedvoid
setStatusMapping
(StatusMapping statusMapping) Adds a Task Status to Object Status Mapping to the list defined for this task.void
setStatusMappings
(HashMap statusMappings) Sets the list of Task Status to Object Status Mappings defined for this task.void
setTaskAdapter
(String taskAdapter) Sets the name of the task adapter attached to this taskvoid
setTaskAdapterKey
(String taskAdapterKey) Sets the Definition Key (EVT_KEY) of the Adapter or Event Handler attachedvoid
setTaskAdapterMapping
(AdapterMapping adapterMapping) Add a Task Adapter Mapping (@see AdapterMapping) to the list of Adapter Mappings defined for this taskvoid
setTaskAdapterMappings
(HashSet taskAdapterMappings) Sets the list of Task Adapter Mappings defined for this task.void
setTaskAdapterStatus
(String taskAdapterStatus) Sets the attachment status of the attached adaptervoid
setTaskAssignment
(int priority, TaskAssignment taskAssignment) Add a Task Assignment Rule to this task.void
setTaskAssignments
(HashMap taskAssignments) Sets the list of Task Assignment Rules defined for this task.void
setTaskEffect
(String taskEffect) Sets the Task Effect of this taskvoid
setTaskEffectField
(String taskEffectField) Sets the name of the form field for which this task is a listenervoid
setTaskInstancePresent
(boolean isTaskInstancePresent) void
setTaskNameUpdatable
(boolean taskNameUpdatable) void
setTaskNotRemovable
(boolean taskNotRemovable) void
setTriggerType
(String triggerType) void
setUndoTask
(String undoTask) Add a task to the list of Undo Tasksvoid
setUndoTasks
(String[] undoTaskList) Sets the list of Undo Tasks defined for this task.void
setUpdateAction
(int updateAction) void
setWorkflowsPresent
(HashSet workflowsPresent)
-
Field Details
-
NO_ACTION
public static final int NO_ACTION- See Also:
-
UPDATE
public static final int UPDATE- See Also:
-
CREATE
public static final int CREATE- See Also:
-
DELETE
public static final int DELETE- See Also:
-
-
Constructor Details
-
TaskDefinition
public TaskDefinition()Constructor
-
-
Method Details
-
getDependsOn
Returns the list of tasks this task depends on. The returned hashset contains the list of task names- Returns:
- The list of tasks this task depends on.
-
getDependsOnTaskList
Returns the list of tasks this task depends on. The returned String array contains the list of task names- Returns:
- The list of tasks this task depends on.
-
setDependsOn
Sets the list of tasks this task depends on. The provided hashset should contain the list of task names- Parameters:
dependsOn
- The list of task names this task depends on.
-
addDependsOnTask
Add a task to the list of tasks this task depends on- Parameters:
taskName
- The name of the task this task depends on.
-
removeDependsOnTask
Remove a task from the list of tasks this task depends on- Parameters:
taskName
- The name of the task to remove from the list.
-
getDescription
Returns the description of the task- Returns:
- The description.
-
setDescription
Sets the description of the task- Parameters:
description
- The description.
-
getName
Returns the name of the task- Returns:
- The name.
-
setName
Sets the name of the task- Parameters:
name
- The name.
-
getNotifications
Returns the list of Email Notifications set up for this task. The returned hashset contains a list of @see EmailNotification objects- Returns:
- The list of notifications.
-
setNotifications
Sets the list of Email Notifications set up for this task. The provided hashset should contain a list of @see EmailNotification objects- Parameters:
notifications
- The list of notifications.
-
setNotification
Adds an Email Notification to the list of notifications set up for this task.- Parameters:
notification
- The notification to add.
-
removeNotification
Removes an Email Notification from the list of notifications set up for this task- Parameters:
notification
- The notifications to remove.
-
getResponses
Returns the list of Responses defined for this task. The returned HashMap contains the list of responses, with the Response Codes as the keys and the corresponding- Returns:
- Returns the list of responses.
- See Also:
-
getResponseDefinition
Returns the Response Definition object defined for this task with the provided Response Code- Parameters:
The
- response code- Returns:
- The response definition @see ResponseDefinition
-
getResponseList
Returns the list of Response Codes for all responses defined for this task- Returns:
- The list of response codes.
-
setResponses
Sets the list of Responses defined for this task. The provided HashMap should contain the list of responses, with the Response Codes as the keys and the corresponding- Parameters:
responses
- The list of responses to set.- See Also:
-
setResponse
Add a new Response Definition to the list of Responses defined for this task.- Parameters:
response
- The response code of the response.responseDefinition
- The Response Definition of the response to add @see ResponseDefinition
-
getStatusMappings
Returns the list of Task Status to Object Status Mappings defined for this task. The returned HashMap contains a list of Status Mappings, with the task status as the keys and the corresponding @see StatusMapping objects as the values- Returns:
- The list of Status Mappings.
-
setStatusMappings
Sets the list of Task Status to Object Status Mappings defined for this task. The provided HashMap should contain a list of Status Mappings, with the task status as the keys and the corresponding @see StatusMapping objects as the values- Parameters:
statusMappings
- The list of statusMappings to set.
-
setStatusMapping
Adds a Task Status to Object Status Mapping to the list defined for this task.- Parameters:
statusMapping
- The StatusMapping to add @see StatusMapping
-
getTaskAdapter
Returns the name of the task adapter attached to this task- Returns:
- The name of the Task Adapter.
-
setTaskAdapter
Sets the name of the task adapter attached to this task- Parameters:
taskAdapter
- The name of the Task Adapter.
-
getTaskAdapterMappings
Returns the list of Task Adapter Mappings defined for this task. The returned hashset contains the list of @see AdapterMapping objects that represent these Task Adapter Variable Mappings- Returns:
- Returns the list of Task Adapter Variable Mappings.
-
setTaskAdapterMappings
Sets the list of Task Adapter Mappings defined for this task. The provided hashset should contain the list of @see AdapterMapping objects that represent these Task Adapter Variable Mappings- Parameters:
taskAdapterMappings
- The list of Task Adapter Mappings to set.
-
setTaskAdapterMapping
Add a Task Adapter Mapping (@see AdapterMapping) to the list of Adapter Mappings defined for this task- Parameters:
taskAdapterMapping
- The TaskAdapterMapping to set (@see AdapterMapping).
-
getTaskAssignments
Returns a list of Task Assignment Rules defined for this task. The returned hashmap contains the list of task assignments, with the rule priority as the key and the Task Assignments (@see TaskAssignment) as the values- Returns:
- The list of Task Assignments.
-
getTaskAssignment
Returns the Task Assignment Rule defined for this task with the provided priority- Parameters:
priority
- The priority of the Assignment Rule to retrieve- Returns:
- The Task Assignment defined with this priority for this task (@see TaskAssignment)
-
setTaskAssignments
Sets the list of Task Assignment Rules defined for this task. The provided hashmap should contain the list of task assignments, with the rule priority as the key and the Task Assignments (@see TaskAssignment) as the values- Parameters:
taskAssignments
- The list of Task Assignments to set.
-
setTaskAssignment
Add a Task Assignment Rule to this task.- Parameters:
priority
- The priority with which this assignment rule is defined for this tasktaskAssignment
- The Task Assignment rule to add.
-
removeTaskAssignment
public void removeTaskAssignment(int priority) Remove the task assignment rule attached with the provided priority- Parameters:
priority
- The priority of the Task Assignment rule to remove.
-
getUndoTasks
Returns the list of Undo Tasks defined for this task. The returned string array contains the list of task names- Returns:
- Returns the undoTasks.
-
getUndoTasksList
Returns the HashSet of Undo Tasks defined for this task. The returned HashSet contains the set of task names- Returns:
- Returns the undoTasks.
-
setUndoTasks
Sets the list of Undo Tasks defined for this task. The provided string array should contain the list of task names- Parameters:
undoTaskList
- The list of Undo Tasks to set.
-
setUndoTask
Add a task to the list of Undo Tasks- Parameters:
undoTask
- The Task to set as an Undo Task.
-
removeUndoTask
Removes a task from the list of Undo Tasks- Parameters:
undoTask
- The Task to remove from Undo Task.
-
getRecoveryTasks
Returns the list of Recovery Tasks defined for this task. The returned string array contains the list of task names- Returns:
- Returns the recoveryTasks.
-
getRecoveryTasksList
Returns the HashSet of Recovery Tasks defined for this task. The returned HashSet contains the list of task names- Returns:
- Returns the recoveryTasks.
-
setRecoveryTasks
Sets the list of Recovery Tasks defined for this task. The provided string array should contain the list of task names- Parameters:
recoveryTaskList
- The list of Recovery Tasks to set.
-
setRecoveryTask
Add a task to the list of Recovery Tasks- Parameters:
recoveryTask
- The Task to set as a Recovery Task.
-
isCompleteOnRecovery
public boolean isCompleteOnRecovery()Returns whether the task should Complete on Recovery Tasks completion- Returns:
- True if it should recover, False if not.
-
setCompleteOnRecovery
public void setCompleteOnRecovery(boolean completeOnRecovery) Set whether the task should Complete on Recovery Tasks completion- Parameters:
completeOnRecovery
- True if it should recover, False if not.
-
getKey
Returns the Definition Key of the task- Returns:
- The key.
-
setKey
Sets the Definition Key of the task- Parameters:
key
- The key to set.
-
isAutomated
public boolean isAutomated()Returns whether the task is automated or not. This is based on whether a task adapter is attached or not- Returns:
- True if the task is automated, False if not
-
getTaskAdapterKey
Returns the Definition Key (EVT_KEY) of the Adapter or Event Handler attached- Returns:
- The Key of the Adapter/Event Handler attached.
-
setTaskAdapterKey
Sets the Definition Key (EVT_KEY) of the Adapter or Event Handler attached- Parameters:
taskAdapterKey
- The Key of the Adapter/Event Handler attached.
-
isAllowMultiple
public boolean isAllowMultiple()Returns whether the task is allowed to be inserted multiple times into the same workflow instance- Returns:
- True if allowed, False if not
-
setAllowMultiple
public void setAllowMultiple(boolean allowMultiple) Sets whether the task is allowed to be inserted multiple times into the same workflow instance- Parameters:
allowMultiple
- True if allowed, False if not
-
isCancelWhilePending
public boolean isCancelWhilePending()Returns whether the task is allowed to be cancelled while still in pending state- Returns:
- True if allowed, False if not
-
setCancelWhilePending
public void setCancelWhilePending(boolean cancelWhilePending) Sets whether the task is allowed to be cancelled while still in pending state- Parameters:
cancelWhilePending
- True if allowed, False if not
-
isConditionalTask
public boolean isConditionalTask()Returns whether the task is a conditional task or not- Returns:
- True if conditional, False if not
-
setConditionalTask
public void setConditionalTask(boolean conditionalTask) Sets whether the task is a conditional task or not- Parameters:
conditionalTask
- True if conditional, False if not
-
isManualInsertNotAllowed
public boolean isManualInsertNotAllowed()Returns whether the task can be manually inserted into a workflow or not- Returns:
- True if not allowed, False if it is allowed
-
setManualInsertNotAllowed
public void setManualInsertNotAllowed(boolean manualInsertNotAllowed) Sets whether the task can be manually inserted into a workflow or not- Parameters:
manualInsertNotAllowed
- True if not allowed, False if it is allowed
-
isRequiredComplete
public boolean isRequiredComplete()Returns whether the task is required to be complete for workflow completion or not- Returns:
- True if required, False if not
-
setRequiredComplete
public void setRequiredComplete(boolean requiredComplete) Sets whether the task is required to be complete for workflow completion or not- Parameters:
requiredComplete
- True if required, False if not
-
getRetryCount
Returns the number of times a rejected instance of this task will be retried- Returns:
- The number if times task will be retried
-
setRetryCount
Sets the number of times a rejected instance of this task will be retried- Parameters:
retryCount
- The number if times task will be retried
-
getRetryPeriod
Returns the time period after which a rejected instance of this task will be retried- Returns:
- The Retry Period.
-
setRetryPeriod
Sets the time period after which a rejected instance of this task will be retried- Parameters:
retryPeriod
- The Retry Period to set.
-
getTaskEffect
Returns the Task Effect of this task- Returns:
- The Task Effect (like Enable/Disable).
-
setTaskEffect
Sets the Task Effect of this task- Parameters:
taskEffect
- The Task Effect to set.
-
getTaskEffectField
Returns the name of the form field for which this task is a listener- Returns:
- The name of the Form Field.
-
setTaskEffectField
Sets the name of the form field for which this task is a listener- Parameters:
taskEffectField
- The name of the Form Field to set.
-
getTaskAdapterStatus
Returns the attachment status of the attached adapter- Returns:
- The Task Adapter Attachment Status.
-
setTaskAdapterStatus
Sets the attachment status of the attached adapter- Parameters:
taskAdapterStatus
- The Task Adapter Attachment Status.
-
getTriggerType
- Returns:
- Returns the triggerType.
-
setTriggerType
- Parameters:
triggerType
- The triggerType to set.
-
getChildTable
- Returns:
- Returns the childTable.
-
setChildTable
- Parameters:
childTable
- The childTable to set.
-
getUpdateAction
public int getUpdateAction()- Returns:
- Returns the updateAction.
-
setUpdateAction
public void setUpdateAction(int updateAction) - Parameters:
updateAction
- The updateAction to set.
-
getWorkflowsPresent
-
setWorkflowsPresent
-
isRemovedTask
public boolean isRemovedTask() -
setRemovedTask
public void setRemovedTask(boolean removedTask) -
getChildOf
-
setChildOf
-
isTaskNameUpdatable
public boolean isTaskNameUpdatable() -
setTaskNameUpdatable
public void setTaskNameUpdatable(boolean taskNameUpdatable) -
isTaskNotRemovable
public boolean isTaskNotRemovable() -
setTaskNotRemovable
public void setTaskNotRemovable(boolean taskNotRemovable) -
isEventHandler
public boolean isEventHandler() -
setEventHandler
public void setEventHandler(boolean isEventHandler) -
isTaskInstancePresent
public boolean isTaskInstancePresent() -
setTaskInstancePresent
public void setTaskInstancePresent(boolean isTaskInstancePresent) -
isOfflined
public boolean isOfflined() -
setOfflined
public void setOfflined(boolean offlined)
-