Module io.automatiko.engine.api
Interface LifeCyclePhase
public interface LifeCyclePhase
Definition of the life cycle phase that work item can be connected to.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidapply(WorkItem workitem, Transition<?> transition) Optional extra work to be applied on work item upon transition to this phasebooleancanTransition(LifeCyclePhase phase) Returns if given life cycle phase can be transitioned to this phaseid()Returns unique id of this life cycle phasebooleanReturns if given state is the completing phase (final state) for given work itembooleanReturns if given state is the terminating phase (final state) for given work itemstatus()Returns status associated with this life cycle phase
-
Method Details
-
id
String id()Returns unique id of this life cycle phase- Returns:
- phase id
-
status
String status()Returns status associated with this life cycle phase- Returns:
- phase status
-
isCompleting
boolean isCompleting()Returns if given state is the completing phase (final state) for given work item- Returns:
- true if this is final phase otherwise false
-
isTerminating
boolean isTerminating()Returns if given state is the terminating phase (final state) for given work item- Returns:
- true if this is final phase otherwise false
-
canTransition
Returns if given life cycle phase can be transitioned to this phase- Parameters:
phase- phase to be transitioned from- Returns:
- true if phase can be transitioned from to this one otherwise false
-
apply
Optional extra work to be applied on work item upon transition to this phase- Parameters:
workitem- work item that is being transitionedtransition- actual transition
-