Interface IProcessTask

All Known Implementing Classes:
ProcessTask, ProcessTaskDelegate, ReadonlyProcessTask

public interface IProcessTask
This interface defines a single process step.
Since:
7.0
Author:
O. Kerpershoek
  • Method Details

    • getId

      long getId()
      This method returns the unique ID of this task.
      Returns:
      the unique ID of this process step.
    • getNodeId

      GUID getNodeId()
      This method returns the optional node ID this task belongs to.
      Returns:
      the node ID of this task.
    • getName

      String getName()
      This method returns the name of the task as present in the task definition.
      Returns:
      The name of the task.
    • getDescription

      String getDescription()
      This method returns an optional description of the task.
      Returns:
      Description of the task
    • getAssigneeInfo

      IAssigneeInfo getAssigneeInfo()
      This method returns the AssigneeInfo of whom the task is assigned to.
      Returns:
      the AssigneeInfo of whom the task is assigned to.
    • getStatus

      TaskStatusType getStatus()
      This method returns the current status of the task.
      Returns:
      the current status of the task.
    • getProcessId

      long getProcessId()
      This method returns the ID of the process the task is defined for.
      Returns:
      The ID of the case the task is defined for.
    • getStartDate

      DateTimeValue getStartDate()
      This method returns the date at which the task may start.
      Returns:
      The date at which the task may start.
    • getTimeoutDate

      DateTimeValue getTimeoutDate()
      this method returns the date at which the task will expire
      Returns:
      The date at which the task will expire
    • setTimeoutDate

      void setTimeoutDate(IUserData userData, DateTimeValue timeoutDate)
      This method may be used to change the timeout date of the task. Adjusting the timeout date of the task may cause the task to be aborted.
      Parameters:
      userData - Object containing information about the current user.
      timeoutDate - The new timeout date for the task.
    • setStartDate

      void setStartDate(DateTimeValue startDate)
      This method may be used to change the start date of the task.
      Parameters:
      startDate - The new timeout date for the task.
    • getDueDate

      DateTimeValue getDueDate()
      this method returns the date at which the task should be completed.
      Returns:
      The date at which the task should be completed.
    • assign

      void assign(IUserData userData, IAssigneeInfo assigneeInfo, boolean isUserSet)
      This method may be used to assign the task.
      Parameters:
      userData - Object containing information about the current user.
      assigneeInfo - The AssigneeInfo of who the task should be assigned to.
      isUserSet - is user set
    • unassign

      void unassign()
      This method may be used to clear the assignment information of the task.
    • start

      void start(IUserData userData)
      This method will attempt to mark the process step as started for the current user. The start operation may fail if another process has updated the case, or started another task, in the time between acquiring the task and starting it. When the start method has completed without an exception, the case will be locked by the current user, and the either the complete or abort method should be invoked to release it.
      Parameters:
      userData - User that will start the task.
      Throws:
      AppException - This exception is thrown when the current task could not be started.
    • complete

      void complete(IUserData userData, IProcessCaseUpdates updates, String taskExit)
      This method may be invoked to indicate the process step has been successfully completed. The complete operation will unlock the case again, and merge the updates from the process step with the case data. This method is also known as "close task" in the documentation.
      Parameters:
      userData - User that marks the task as completed.
      updates - Object containing updates that should be applied to the case data.
      taskExit - The exit state of the completed task, may be null.
      Throws:
      AppException - This exception is thrown when the current task could not be marked as completed.
    • evaluateAfterComplete

      void evaluateAfterComplete(IUserData userData, String taskExit, IProcessCase processCase)
      Evaluates the case after a task has been completed
      Parameters:
      userData - user that marks the task as completed
      taskExit - the exit state of the completed task
      processCase - the case which is evaluated
    • abort

      void abort(IUserData userData, IProcessCaseUpdates updates)
      This method may be invoked to indicate the process step has been aborted. The abort method may be manually invoked, but can also be invoked by a session that has been closed. This method is also known as "cancel task" in the documentation.
      Parameters:
      userData - User that aborts the execution of the task.
      updates - Object containing updates that should be applied to the case data.
      Throws:
      AppException - This exception is thrown when the task could not be aborted.
    • cancel

      void cancel(IUserData userData)
      This method may be used to explicitly cancel the task. Canceling a task may only be done for tasks that are not part of a process definition. Canceling the task will remove the task, and should not be confused with the abort task method.
      Parameters:
      userData - User that aborts the execution of the task.
      Throws:
      AppException - This exception is thrown when the task could not be canceled.
    • evaluateRequiredRoles

      IRole[] evaluateRequiredRoles()
      This method returns the required roles to start this task.
      Returns:
      The required roles.
    • getPriority

      Integer getPriority()
      This method returns the priority of a task.
      Returns:
      The priority
    • getExecutedBy

      String getExecutedBy()
      Gets the name of the user that executed this task.
      Returns:
      Username
    • getCustomFieldValue

      String getCustomFieldValue(String name)
      This method returns the value of a custom field
      Parameters:
      name - the custom field name
      Returns:
      null if the field does not exist or has no value for this task
    • isUserSet

      boolean isUserSet()
      Returns:
      whether the assignee of the task is set manually by an user or by routing algorithm
    • getDisplayName

      IMultilingualText getDisplayName()
      Returns the IMultilingualText display name for the task.
      Returns:
      display name for the task