Module io.automatiko.engine.api
Interface LifeCycle<T>
- Type Parameters:
T- defines the type of data managed through this life cycle
public interface LifeCycle<T>
Complete life cycle that can be applied to work items. It defines set of
phases and allow to get access to each of them by id.
-
Method Summary
Modifier and TypeMethodDescriptionReturns current data set for given work itemReturns phase by its id if exists.phases()Returns all phases associated with this life cycletransitionTo(WorkItem workItem, WorkItemManager manager, Transition<T> transition) Perform actual transition to the target phase defined via given transition
-
Method Details
-
phaseById
Returns phase by its id if exists.- Parameters:
phaseId- phase id to be used for look up- Returns:
- life cycle phase if exists otherwise null
-
phases
Collection<LifeCyclePhase> phases()Returns all phases associated with this life cycle- Returns:
- list of phases
-
transitionTo
Perform actual transition to the target phase defined via given transition- Parameters:
workItem- work item that is being transitionedmanager- work item manager for given work itemtransition- actual transition- Returns:
- returns work item data after the transition
-
data
Returns current data set for given work item- Parameters:
workItem- work item to get the data for- Returns:
- current data set
-