Class TaskDefinition

java.lang.Object
com.thortech.xl.vo.workflow.TaskDefinition
All Implemented Interfaces:
Serializable

public class TaskDefinition extends Object implements 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 Details

  • Constructor Details

    • TaskDefinition

      public TaskDefinition()
      Constructor
  • Method Details

    • getDependsOn

      public HashSet 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

      public String[] 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

      public void setDependsOn(HashSet dependsOn)
      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

      public void addDependsOnTask(String taskName)
      Add a task to the list of tasks this task depends on
      Parameters:
      taskName - The name of the task this task depends on.
    • removeDependsOnTask

      public void removeDependsOnTask(String taskName)
      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

      public String getDescription()
      Returns the description of the task
      Returns:
      The description.
    • setDescription

      public void setDescription(String description)
      Sets the description of the task
      Parameters:
      description - The description.
    • getName

      public String getName()
      Returns the name of the task
      Returns:
      The name.
    • setName

      public void setName(String name)
      Sets the name of the task
      Parameters:
      name - The name.
    • getNotifications

      public HashSet 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

      public void setNotifications(HashSet notifications)
      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

      public void setNotification(EmailNotification notification)
      Adds an Email Notification to the list of notifications set up for this task.
      Parameters:
      notification - The notification to add.
    • removeNotification

      public void removeNotification(EmailNotification notification)
      Removes an Email Notification from the list of notifications set up for this task
      Parameters:
      notification - The notifications to remove.
    • getResponses

      public HashMap 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

      public ResponseDefinition getResponseDefinition(String response)
      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

      public String[] getResponseList()
      Returns the list of Response Codes for all responses defined for this task
      Returns:
      The list of response codes.
    • setResponses

      public void setResponses(HashMap responses)
      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

      public void setResponse(String response, ResponseDefinition responseDefinition)
      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

      public HashMap 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

      public void setStatusMappings(HashMap statusMappings)
      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

      public void setStatusMapping(StatusMapping statusMapping)
      Adds a Task Status to Object Status Mapping to the list defined for this task.
      Parameters:
      statusMapping - The StatusMapping to add @see StatusMapping
    • getTaskAdapter

      public String getTaskAdapter()
      Returns the name of the task adapter attached to this task
      Returns:
      The name of the Task Adapter.
    • setTaskAdapter

      public void setTaskAdapter(String taskAdapter)
      Sets the name of the task adapter attached to this task
      Parameters:
      taskAdapter - The name of the Task Adapter.
    • getTaskAdapterMappings

      public HashSet 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

      public void setTaskAdapterMappings(HashSet taskAdapterMappings)
      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

      public void setTaskAdapterMapping(AdapterMapping adapterMapping)
      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

      public HashMap 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

      public TaskAssignment getTaskAssignment(int priority)
      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

      public void setTaskAssignments(HashMap taskAssignments)
      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

      public void setTaskAssignment(int priority, TaskAssignment taskAssignment)
      Add a Task Assignment Rule to this task.
      Parameters:
      priority - The priority with which this assignment rule is defined for this task
      taskAssignment - 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

      public String[] 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

      public HashSet 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

      public void setUndoTasks(String[] undoTaskList)
      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

      public void setUndoTask(String undoTask)
      Add a task to the list of Undo Tasks
      Parameters:
      undoTask - The Task to set as an Undo Task.
    • removeUndoTask

      public void removeUndoTask(String undoTask)
      Removes a task from the list of Undo Tasks
      Parameters:
      undoTask - The Task to remove from Undo Task.
    • getRecoveryTasks

      public String[] 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

      public HashSet 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

      public void setRecoveryTasks(String[] recoveryTaskList)
      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

      public void setRecoveryTask(String recoveryTask)
      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

      public String getKey()
      Returns the Definition Key of the task
      Returns:
      The key.
    • setKey

      public void setKey(String key)
      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

      public String getTaskAdapterKey()
      Returns the Definition Key (EVT_KEY) of the Adapter or Event Handler attached
      Returns:
      The Key of the Adapter/Event Handler attached.
    • setTaskAdapterKey

      public void setTaskAdapterKey(String taskAdapterKey)
      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

      public String 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

      public void setRetryCount(String retryCount)
      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

      public String getRetryPeriod()
      Returns the time period after which a rejected instance of this task will be retried
      Returns:
      The Retry Period.
    • setRetryPeriod

      public void setRetryPeriod(String retryPeriod)
      Sets the time period after which a rejected instance of this task will be retried
      Parameters:
      retryPeriod - The Retry Period to set.
    • getTaskEffect

      public String getTaskEffect()
      Returns the Task Effect of this task
      Returns:
      The Task Effect (like Enable/Disable).
    • setTaskEffect

      public void setTaskEffect(String taskEffect)
      Sets the Task Effect of this task
      Parameters:
      taskEffect - The Task Effect to set.
    • getTaskEffectField

      public String getTaskEffectField()
      Returns the name of the form field for which this task is a listener
      Returns:
      The name of the Form Field.
    • setTaskEffectField

      public void setTaskEffectField(String taskEffectField)
      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

      public String getTaskAdapterStatus()
      Returns the attachment status of the attached adapter
      Returns:
      The Task Adapter Attachment Status.
    • setTaskAdapterStatus

      public void setTaskAdapterStatus(String taskAdapterStatus)
      Sets the attachment status of the attached adapter
      Parameters:
      taskAdapterStatus - The Task Adapter Attachment Status.
    • getTriggerType

      public String getTriggerType()
      Returns:
      Returns the triggerType.
    • setTriggerType

      public void setTriggerType(String triggerType)
      Parameters:
      triggerType - The triggerType to set.
    • getChildTable

      public String getChildTable()
      Returns:
      Returns the childTable.
    • setChildTable

      public void setChildTable(String childTable)
      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

      public HashSet getWorkflowsPresent()
    • setWorkflowsPresent

      public void setWorkflowsPresent(HashSet workflowsPresent)
    • isRemovedTask

      public boolean isRemovedTask()
    • setRemovedTask

      public void setRemovedTask(boolean removedTask)
    • getChildOf

      public HashMap getChildOf()
    • setChildOf

      public void setChildOf(HashMap childOf)
    • 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)