Package fr.gouv.vitam.common.model

# Enum Class ProcessState

java.lang.Object
java.lang.Enum<ProcessState>
fr.gouv.vitam.common.model.ProcessState

All Implemented Interfaces:
  `Serializable`, `Comparable<ProcessState>`, `Constable`

public enum ProcessState extends Enum<ProcessState>
The different states of the ProcessWorkflow For each state (PAUSE, RUNNING, COMPLETED) we can send an number of events.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `COMPLETED`
  Represent the current completed state Throws StateNotAllowedException for all
  `PAUSE`
  Represent the current pause state Accept all Pause => do nothing Resume => change the state to running then run all steps at the end change step to completed Next => Change the state to running then run the next step only.
  `RUNNING`
  Represent the current running state Accept Pause and cancel Pause => continue execution of current step (only for step by step) then change state to : - pause if not last step - completed Cancel => continue execution of current process (step or all steps) then change state to complete Throws StateNotAllowedException for other

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `eval(ProcessState targetState)`
  Evaluate for the current state if the given state is permitted or not
  `jakarta.ws.rs.core.Response.Status`
  `getEquivalentHttpStatus()`
  get equivalent http status
  `static ProcessState`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ProcessState[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### PAUSE

    public static final ProcessState PAUSE
    Represent the current pause state Accept all Pause => do nothing Resume => change the state to running then run all steps at the end change step to completed Next => Change the state to running then run the next step only. If the last step then change the state to completed else change the state to pause Cancel => Change the state to completed

  - ### RUNNING

    public static final ProcessState RUNNING
    Represent the current running state Accept Pause and cancel Pause => continue execution of current step (only for step by step) then change state to : - pause if not last step - completed Cancel => continue execution of current process (step or all steps) then change state to complete Throws StateNotAllowedException for other

  - ### COMPLETED

    public static final ProcessState COMPLETED
    Represent the current completed state Throws StateNotAllowedException for all

- ## Method Details

  - ### values

    public static ProcessState[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static ProcessState valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### eval

    public void eval(ProcessState targetState) throws StateNotAllowedException
    Evaluate for the current state if the given state is permitted or not
    Throws:
      `StateNotAllowedException`

  - ### getEquivalentHttpStatus

    public jakarta.ws.rs.core.Response.Status getEquivalentHttpStatus()
    get equivalent http status
    Returns:
      the status