Interface Task

All Superinterfaces:
Lockable

public interface Task extends Lockable
A workflow task.
Since:
4.0.120
  • Field Details

    • ERROR_USER_LOGIN

      static final String ERROR_USER_LOGIN
      String for the error attribute of the user login.
      Since:
      4.0.120
      See Also:
    • ERROR_USER_NAME

      static final String ERROR_USER_NAME
      String for the error attribute of the user name.
      Since:
      4.0.120
      See Also:
    • ERROR_COMMENT

      static final String ERROR_COMMENT
      String for the error attribute of a comment.
      Since:
      4.0.120
      See Also:
    • ERROR_THROWABLE

      static final String ERROR_THROWABLE
      String for the error attribute of the throwable.
      Since:
      4.0.120
      See Also:
    • ERROR_INFO

      static final String ERROR_INFO
      String for the error attribute of the throwable info.
      Since:
      4.1.2
      See Also:
    • ERROR_ACTIVITY_ID

      static final String ERROR_ACTIVITY_ID
      String for the error attribute of the activity ID.
      Since:
      4.0.120
      See Also:
  • Method Details

    • getId

      long getId()
      Get task id
      Since:
      4.0.120
    • getProject

      Project getProject()
      Get project
      Since:
      4.0.120
    • getMode

      Task.Mode getMode()
      Get task mode
      Since:
      4.0.120
    • getCreationDate

      Date getCreationDate()
      Get task creation date
      Since:
      4.0.120
    • isFinished

      boolean isFinished()
      Is task finished
      Since:
      4.0.120
    • getCreator

      User getCreator()
      Ger task creator
      Since:
      4.0.120
    • getWorkflowable

      @Nullable @Nullable Workflowable getWorkflowable()
      Since:
      4.0.120
    • getTaskState

      TaskState getTaskState()
      Get current task state
      Since:
      4.0.120
    • doTransition

      State doTransition(@NotNull @NotNull WorkflowContext context, @NotNull @NotNull Transition transition) throws LockException, ElementDeletedException
      Perform transition execution on this task. The task has to be locked. The task is changed during the transition, you have to save it afterwards.
      Throws:
      LockException
      ElementDeletedException
      Since:
      4.0.120
    • gotoErrorState

      void gotoErrorState(@NotNull @NotNull WorkflowContext context, @Nullable @Nullable Activity activity, @Nullable @Nullable String comment, @Nullable @Nullable Throwable throwable)
      Goto model error state. The error information is saved as custom attributes.
      Throws:
      IllegalStateException - thrown if no error state is defined in model
      Since:
      4.0.120
    • getErrorInfo

      TaskErrorInfo getErrorInfo()
      Return error info object or null if the error state has not been reached.
      Since:
      4.0.120
    • getHistory

      List<TaskState> getHistory()
      Get task state history
      Since:
      4.0.120
    • getWorkflow

      Workflow getWorkflow()
      Get workflow model
      Since:
      4.0.120
    • getPriority

      Task.Priority getPriority()
      Get task priority
      Since:
      4.0.120
    • setPriority

      void setPriority(Task.Priority priority)
      Set task priority
      Since:
      4.0.120
    • isTimeoutMailSend

      boolean isTimeoutMailSend()
      Was task timeout mail send
      Since:
      4.0.120
    • getDueDate

      Date getDueDate()
      Get task due date
      Since:
      4.0.120
    • setDueDate

      void setDueDate(Date dueDate)
      Set task due date
      Since:
      4.0.120
    • getCustomData

      @Deprecated Data getCustomData()
      Deprecated.
      since 5.2.19, use getCustomFormData().
      Get task custom data xml
      Since:
      4.0.120
    • setCustomData

      @Deprecated void setCustomData(Data customData)
      Deprecated.
      since 5.2.19, use setCustomFormData(FormData).
      Set custom data xml
      Since:
      4.0.120
    • getCustomFormData

      @Nullable @Nullable FormData getCustomFormData()
      Get this task's custom form data.
      Returns:
      The custom form data or null.
      Since:
      5.2.19
    • setCustomFormData

      void setCustomFormData(@Nullable @Nullable FormData customFormData)
      Set this task's custom form data.
      Parameters:
      customFormData - The form data to set, may be null.
      Since:
      5.2.19
    • getCustomAttributes

      Map<Object,Object> getCustomAttributes()
      Get task session attributes.
      Keys, values and all referenced fields (recursively) must provide a no arg constructor to be valid for serialization.
      A IllegalArgumentException is thrown if a key or value with serialisation problems is added to the map.
      Since:
      4.0.120
    • getEditors

      List<Principal> getEditors()
      Get task allowed editors list
      Since:
      4.0.120
    • setEditors

      void setEditors(List<Principal> editorUsers)
      Set allowed editors
      Since:
      4.0.120
    • getEditorMode

      Task.EditorMode getEditorMode()
      Get task editor mode
      Since:
      4.0.120
    • closeTask

      void closeTask()
      Close this task
      Since:
      4.0.120
    • verify

      Verify state of this task object. Check all references to other objects and back.
      Since:
      4.2.400