All Implemented Interfaces:
Serializable, Tool, ValidExecution

Business task in order to update the state of the given BOTask.
When the TaskStateUpdateEvent is launched the BT notices the call and updates the BOTask state basing on the event's input.
Since:
9.2
See Also:
GCApi:
task
  • Constructor Details

    • BTTaskStateUpdate

      public BTTaskStateUpdate()
  • Method Details

    • execute

      protected void execute(TaskStateUpdateEvent event, PoolKit pk) throws DAException, DAValidateException
      Updates the BOTask state, i.e. no other field of the timesheet task is going to be updated by this process.
      Specified by:
      execute in class ValidExecutionBusinessTask<TaskStateUpdateEvent>
      Parameters:
      event - the event
      pk - the pool kit
      Throws:
      DAException - the DA exception
      DAValidateException - the DA validate exception
    • prepareFilterData

      protected HashMap<String,Object> prepareFilterData(BOTask task)
      Prepares the filter data in order to load the correct record to update.
      Parameters:
      task - the BOTask to update
      Returns:
      the hash map that is going to be used as filter to update the task
    • prepareUpdateData

      protected HashMap<String,Object> prepareUpdateData(BOTask task)
      Prepares the data that is going to be updated in the selected timesheet task. Only the state of the timesheet task can be updated by this process, therefore all the other fields are removed.
      Parameters:
      task - the BOTask which contains the update data (only the state)
      Returns:
      the hash map that is going to be used as new values to update the task
    • checkBeforeUpdate

      protected void checkBeforeUpdate(BOTask task, PoolKit pk) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • cancelLinkedTask

      protected void cancelLinkedTask(Long linkedTaskId, PoolKit pk) throws DAValidateException, DAException
      If the current task is being deleted, its linked task must be deleted as well.
      Parameters:
      linkedTaskId - the id of the linked task to delete
      pk - the poolKit
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • isValidExecution

      public boolean isValidExecution()
      Description copied from interface: ValidExecution
      Determines whether the current state is valid for execution.
      Returns:
      true if execution is valid, false otherwise