Enum Class TaskState

java.lang.Object
java.lang.Enum<TaskState>
ch.ivyteam.ivy.workflow.TaskState
All Implemented Interfaces:
ch.ivyteam.ivy.persistence.IPersistentEnumeration, Serializable, Comparable<TaskState>, java.lang.constant.Constable

public enum TaskState extends Enum<TaskState> implements ch.ivyteam.ivy.persistence.IPersistentEnumeration
States of a workflow task
Since:
17.05.2006
See Also:
API:
This is a public API.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    This is the initial state of the first task of a process/case.
    Initial state of a task for which a delay period was configured.
    Final task state if a task was destroyed.
    Final task state if the task was successfully done.
    Only system tasks are in this state.
    A task in this state has run into an error during the joining of the task.
    If all input tasks of a task switch process element have been reached then the state of all input tasks are set to the JOINING state.
    Like SUSPENDED but task was exclusively reserved by a user for working on it later (see IWorkflowSession.parkTask(ITask)).
    If a task reaches a task switch process element it changes its state from RESUMED or CREATED to this state.
    A user is working on this task right now (see IWorkflowSession.resumeTask(long)).
    Initial task state of tasks that are not the first task of a process.
    Deprecated, for removal: This API element is subject to removal in a future version.
    not used anymore.
    This is an initial state if the task is waiting for an intermediate event.
    Deprecated, for removal: This API element is subject to removal in a future version.
    not used anymore.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the business state of this state.
  • Enum Constant Details

    • CREATED

      public static final TaskState CREATED

      This is the initial state of the first task of a process/case. A user is currently working on this task.

      Database Value: 0

      API:
      This public API is available in Java.
    • READY_FOR_JOIN

      public static final TaskState READY_FOR_JOIN

      If a task reaches a task switch process element it changes its state from RESUMED or CREATED to this state. The task stays in this state until all input tasks of a case at the task switch process element are in this state. Then the task state is switch to JOINING.

      Database Value: 1

      API:
      This public API is available in Java.
    • JOINING

      public static final TaskState JOINING

      If all input tasks of a task switch process element have been reached then the state of all input tasks are set to the JOINING state. Then the process data of all input tasks are merged to a single process data. This data is then used as start process data of the output tasks of the task switch process element. If the joining is finished the tasks are set to state DONE.

      Database Value: 2

      API:
      This public API is available in Java.
    • DELAYED

      public static final TaskState DELAYED

      Initial state of a task for which a delay period was configured. The task stays in this state until the delay period is over. The task then is set to state SUSPENDED.

      Database Value: 3

      API:
      This public API is available in Java.
    • SUSPENDED

      public static final TaskState SUSPENDED

      Initial task state of tasks that are not the first task of a process. Users that are activator of a task in this state can work on it. If so the task is set to state RESUMED. This state can also be reached again if task was reseted (see ITask.reset()).

      Database Value: 4

      API:
      This public API is available in Java.
    • RESUMED

      public static final TaskState RESUMED

      A user is working on this task right now (see IWorkflowSession.resumeTask(long)). This task is not the first task of a process (see CREATED). If the task ends on a process end the state is set to DONE. If the task ends on a task switch process element it is set to READY_FOR_JOIN. If the user session reaches a timeout then the task is reset to state SUSPENDED. If the task is actively reseted by the working user or administrator (see ITask.reset()).

      Database Value: 5

      API:
      This public API is available in Java.
    • DONE

      public static final TaskState DONE

      Final task state if the task was successfully done.

      Database Value: 6

      API:
      This public API is available in Java.
    • DESTROYED

      public static final TaskState DESTROYED

      Final task state if a task was destroyed. A user can manually destroy a task (see ITask.destroy()). A task can be destroyed because of an expiry timeout.

      Database Value: 7

      API:
      This public API is available in Java.
    • PARKED

      public static final TaskState PARKED

      Like SUSPENDED but task was exclusively reserved by a user for working on it later (see IWorkflowSession.parkTask(ITask)). If user works on this task again state changes to SUSPENDED. If task is reseted state changes also to SUSPENDED (see ITask.reset()).

      Database Value: 8

      API:
      This public API is available in Java.
    • UNASSIGNED

      @Deprecated(forRemoval=true, since="9.1") public static final TaskState UNASSIGNED
      Deprecated, for removal: This API element is subject to removal in a future version.
      not used anymore. no tasks are in this state.

      Database Value: 9

      API:
      This public API is available in Java.
    • FAILED

      public static final TaskState FAILED

      Only system tasks are in this state. The execution of the system task has run into an error. Depending on configuration this is a final state or after a timeout the task is set back to SUSPENDED to retry the execution.

      Database Value: 10

      API:
      This public API is available in Java.
    • JOIN_FAILED

      public static final TaskState JOIN_FAILED

      A task in this state has run into an error during the joining of the task. The task stays in this state until a timeout sets it back to READY_FOR_JOIN. The system will then retry to join the task.

      Database Value: 11

      API:
      This public API is available in Java.
    • WAITING_FOR_INTERMEDIATE_EVENT

      public static final TaskState WAITING_FOR_INTERMEDIATE_EVENT

      This is an initial state if the task is waiting for an intermediate event. Only system tasks can be in this state. If the intermediate event occurs the task is set to state SUSPENDED so that it is executed by the system.

      Database Value: 12

      API:
      This public API is available in Java.
    • ZOMBIE

      @Deprecated(since="11.1", forRemoval=true) public static final TaskState ZOMBIE
      Deprecated, for removal: This API element is subject to removal in a future version.
      not used anymore. tasks which become zombies will be deleted.
      API:
      This public API is available in Java.
  • Method Details

    • getBusinessState

      public TaskBusinessState getBusinessState()
      Returns the business state of this state.
      Returns:
      business state.
      API:
      This public API is available in Java.