Package fr.gouv.vitam.common.model
Enum Class ProcessState
- All Implemented Interfaces:
Serializable
,Comparable<ProcessState>
,Constable
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 ConstantDescriptionRepresent the current completed state Throws StateNotAllowedException for allRepresent 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.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 TypeMethodDescriptionvoid
eval
(ProcessState targetState) Evaluate for the current state if the given state is permitted or notjavax.ws.rs.core.Response.Status
get equivalent http statusstatic ProcessState
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.
-
Enum Constant Details
-
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
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
Represent the current completed state Throws StateNotAllowedException for all
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
eval
Evaluate for the current state if the given state is permitted or not- Throws:
StateNotAllowedException
-
getEquivalentHttpStatus
public javax.ws.rs.core.Response.Status getEquivalentHttpStatus()get equivalent http status- Returns:
- the status
-