Class ProcessTaskDelegate

java.lang.Object
com.aquima.interactions.process.wrapper.ProcessTaskDelegate
All Implemented Interfaces:
IProcessTask
Direct Known Subclasses:
ReadonlyProcessTask

public abstract class ProcessTaskDelegate extends Object implements IProcessTask
Utility class to allow for easy wrapping of a process engine implementation. This an internal class.
Since:
7.1
Author:
Jon van Leuven
  • Constructor Details

    • ProcessTaskDelegate

      protected ProcessTaskDelegate(IProcessTask processTask)
  • Method Details

    • abort

      public void abort(IUserData userData, IProcessCaseUpdates updates)
      Description copied from interface: IProcessTask
      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.
      Specified by:
      abort in interface IProcessTask
      Parameters:
      userData - User that aborts the execution of the task.
      updates - Object containing updates that should be applied to the case data.
    • assign

      public void assign(IUserData userData, IAssigneeInfo assigneeInfo, boolean isUserSet)
      Description copied from interface: IProcessTask
      This method may be used to assign the task.
      Specified by:
      assign in interface IProcessTask
      Parameters:
      userData - Object containing information about the current user.
      assigneeInfo - The AssigneeInfo of who the task should be assigned to.
      isUserSet - is user set
    • cancel

      public void cancel(IUserData userData)
      Description copied from interface: IProcessTask
      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.
      Specified by:
      cancel in interface IProcessTask
      Parameters:
      userData - User that aborts the execution of the task.
    • complete

      public void complete(IUserData userData, IProcessCaseUpdates updates, String taskExit)
      Description copied from interface: IProcessTask
      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.
      Specified by:
      complete in interface IProcessTask
      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.
    • getAssigneeInfo

      public IAssigneeInfo getAssigneeInfo()
      Description copied from interface: IProcessTask
      This method returns the AssigneeInfo of whom the task is assigned to.
      Specified by:
      getAssigneeInfo in interface IProcessTask
      Returns:
      the AssigneeInfo of whom the task is assigned to.
    • getProcessId

      public long getProcessId()
      Description copied from interface: IProcessTask
      This method returns the ID of the process the task is defined for.
      Specified by:
      getProcessId in interface IProcessTask
      Returns:
      The ID of the case the task is defined for.
    • getDescription

      public String getDescription()
      Description copied from interface: IProcessTask
      This method returns an optional description of the task.
      Specified by:
      getDescription in interface IProcessTask
      Returns:
      Description of the task
    • getTimeoutDate

      public DateTimeValue getTimeoutDate()
      Description copied from interface: IProcessTask
      this method returns the date at which the task will expire
      Specified by:
      getTimeoutDate in interface IProcessTask
      Returns:
      The date at which the task will expire
    • getId

      public long getId()
      Description copied from interface: IProcessTask
      This method returns the unique ID of this task.
      Specified by:
      getId in interface IProcessTask
      Returns:
      the unique ID of this process step.
    • getName

      public String getName()
      Description copied from interface: IProcessTask
      This method returns the name of the task as present in the task definition.
      Specified by:
      getName in interface IProcessTask
      Returns:
      The name of the task.
    • getNodeId

      public GUID getNodeId()
      Description copied from interface: IProcessTask
      This method returns the optional node ID this task belongs to.
      Specified by:
      getNodeId in interface IProcessTask
      Returns:
      the node ID of this task.
    • evaluateRequiredRoles

      public IRole[] evaluateRequiredRoles()
      Description copied from interface: IProcessTask
      This method returns the required roles to start this task.
      Specified by:
      evaluateRequiredRoles in interface IProcessTask
      Returns:
      The required roles.
    • getPriority

      public Integer getPriority()
      Description copied from interface: IProcessTask
      This method returns the priority of a task.
      Specified by:
      getPriority in interface IProcessTask
      Returns:
      The priority
    • getCustomFieldValue

      public String getCustomFieldValue(String name)
      Description copied from interface: IProcessTask
      This method returns the value of a custom field
      Specified by:
      getCustomFieldValue in interface IProcessTask
      Parameters:
      name - the custom field name
      Returns:
      null if the field does not exist or has no value for this task
    • getStartDate

      public DateTimeValue getStartDate()
      Description copied from interface: IProcessTask
      This method returns the date at which the task may start.
      Specified by:
      getStartDate in interface IProcessTask
      Returns:
      The date at which the task may start.
    • getStatus

      public TaskStatusType getStatus()
      Description copied from interface: IProcessTask
      This method returns the current status of the task.
      Specified by:
      getStatus in interface IProcessTask
      Returns:
      the current status of the task.
    • setTimeoutDate

      public void setTimeoutDate(IUserData userData, DateTimeValue dueDate)
      Description copied from interface: IProcessTask
      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.
      Specified by:
      setTimeoutDate in interface IProcessTask
      Parameters:
      userData - Object containing information about the current user.
      dueDate - The new timeout date for the task.
    • setStartDate

      public void setStartDate(DateTimeValue startDate)
      Description copied from interface: IProcessTask
      This method may be used to change the start date of the task.
      Specified by:
      setStartDate in interface IProcessTask
      Parameters:
      startDate - The new timeout date for the task.
    • getDueDate

      public DateTimeValue getDueDate()
      Description copied from interface: IProcessTask
      this method returns the date at which the task should be completed.
      Specified by:
      getDueDate in interface IProcessTask
      Returns:
      The date at which the task should be completed.
    • start

      public void start(IUserData userData)
      Description copied from interface: IProcessTask
      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.
      Specified by:
      start in interface IProcessTask
      Parameters:
      userData - User that will start the task.
    • unassign

      public void unassign(IUserData userData)
    • getExecutedBy

      public String getExecutedBy()
      Description copied from interface: IProcessTask
      Gets the name of the user that executed this task.
      Specified by:
      getExecutedBy in interface IProcessTask
      Returns:
      Username
    • isUserSet

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

      public IMultilingualText getDisplayName()
      Description copied from interface: IProcessTask
      Returns the IMultilingualText display name for the task.
      Specified by:
      getDisplayName in interface IProcessTask
      Returns:
      display name for the task