Interface LifecycleManager
-
- All Known Implementing Classes:
LifecycleManagerImpl
public interface LifecycleManager
Provides lifecycle functionality for a project. This is the entry point for executing a transition on a stateful object. TheLifecycleManager
uses internallyLifecycleConfiguration
lifecycle configuration which must be configured by a user. If any exception occurs during a transition will be placed into theTransitionResult
transition result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TransitionResult
execute(StatefulObject statefulObject, String event)
Executes a transition of the stateful object according the event.TransitionResult
execute(StatefulObject statefulObject, String event, Map<String,Object> variables)
Executes a transition of the stateful object according the event.
-
-
-
Method Detail
-
execute
TransitionResult execute(StatefulObject statefulObject, String event)
Executes a transition of the stateful object according the event.- Parameters:
statefulObject
- an object which state should be changed with corresponding actions executionevent
- a signal which helps to define the target state- Returns:
TransitionResult
transition result containing information about executed transition- Throws:
TransitionNotFoundException
- if no transition was found for corresponding stateful object's source state and eventAmbiguousTransitionException
- if there are more then one matching transitions
-
execute
TransitionResult execute(StatefulObject statefulObject, String event, Map<String,Object> variables)
Executes a transition of the stateful object according the event. The method contains an additional map of variables which is used in the actions and conditions during a transition.- Parameters:
statefulObject
- an object which state should be changed with corresponding actions executionevent
- a signal which helps to define the target statevariables
- any external data which is necessary during transition performance- Returns:
TransitionResult
transition result containing information about executed transition- Throws:
TransitionNotFoundException
- if no transition was found for the corresponding stateful object's source state and eventAmbiguousTransitionException
- if there are more then one matching transitions
-
-