Interface WorkItemLifeCycle
- Type Parameters:
T- defines the type of data managed through this life cycle
public interface WorkItemLifeCycle
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 TypeMethodDescriptiondefault Set<WorkItemLifeCyclePhase>allowedPhases(String phaseStatus) Returns the set of phases the provided phase is able to be transitioned todefault WorkItemLifeCyclePhaseReturns phase by its id if exists.default List<WorkItemLifeCyclePhase>phaseByStatus(String phaseStatus) phases()Returns all phases associated with this life cycletransitionTo(KogitoWorkItemManager manager, KogitoWorkItemHandler handler, KogitoWorkItem workItem, WorkItemTransition transition) Perform actual transition to the target phase defined via given transition
-
Method Details
-
phaseByStatus
-
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<WorkItemLifeCyclePhase> phases()Returns all phases associated with this life cycle- Returns:
- list of phases
-
transitionTo
Optional<WorkItemTransition> transitionTo(KogitoWorkItemManager manager, KogitoWorkItemHandler handler, KogitoWorkItem workItem, WorkItemTransition transition) 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
-
allowedPhases
Returns the set of phases the provided phase is able to be transitioned to- Parameters:
phaseId- the phase we want to obtain which phases can be transitioned to- Returns:
- stream containing all phases that can be transitioned from the provided phase
-
newTransition
-