@Configuration
public class StateMachineAutoConfiguration
extends java.lang.Object
JobExecutionStateMachine state machine for the agent process.| Constructor and Description |
|---|
StateMachineAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<org.apache.commons.lang3.tuple.Triple<States,Events,States>> |
eventDrivenTransitions()
Provide a lazy bean definition for the event driven transitions within the state machine.
|
JobExecutionStateMachine |
jobExecutionStateMachine(org.springframework.statemachine.StateMachine<States,Events> stateMachine)
Provide a lazy
JobExecutionStateMachine bean if one hasn't already been defined. |
LoggingListener |
loggingListener()
Provide a lazy
LoggingListener bean. |
org.springframework.statemachine.StateMachine<States,Events> |
stateMachine(java.util.Collection<org.apache.commons.lang3.tuple.Pair<States,StateAction>> statesWithActions,
java.util.Collection<org.apache.commons.lang3.tuple.Triple<States,Events,States>> eventDrivenTransitions,
java.util.Collection<States> statesWithErrorTransition,
java.util.Collection<JobExecutionListener> listeners)
Provide a lazy
StateMachine instance configured with the current model expected for job execution. |
java.util.Collection<org.apache.commons.lang3.tuple.Pair<States,StateAction>> |
statesWithActions(StateAction.Initialize initializeAction,
StateAction.ConfigureAgent configureAgentAction,
StateAction.ResolveJobSpecification resolveJobSpecificationAction,
StateAction.SetUpJob setUpJobAction,
StateAction.LaunchJob launchJobAction,
StateAction.MonitorJob monitorJobAction,
StateAction.CleanupJob cleanupJobAction,
StateAction.Shutdown shutdownAction,
StateAction.HandleError handleErrorAction)
Provide a lazy bean which is a collection of all the states the state machine should contain which have an
associated action.
|
java.util.Collection<States> |
statesWithErrorTransition()
Provide a bean with a collection of states which should have transitions to an error action when an error occurs.
|
@Bean @Lazy public LoggingListener loggingListener()
LoggingListener bean.LoggingListener instance@Bean @Lazy @ConditionalOnMissingBean(value=JobExecutionStateMachine.class) public JobExecutionStateMachine jobExecutionStateMachine(org.springframework.statemachine.StateMachine<States,Events> stateMachine)
JobExecutionStateMachine bean if one hasn't already been defined.stateMachine - The state machine to use for job executionJobExecutionStateMachineImpl instance@Bean @Lazy public org.springframework.statemachine.StateMachine<States,Events> stateMachine(java.util.Collection<org.apache.commons.lang3.tuple.Pair<States,StateAction>> statesWithActions, java.util.Collection<org.apache.commons.lang3.tuple.Triple<States,Events,States>> eventDrivenTransitions, java.util.Collection<States> statesWithErrorTransition, java.util.Collection<JobExecutionListener> listeners) throws java.lang.Exception
StateMachine instance configured with the current model expected for job execution.statesWithActions - The states to use that have actions associated with them available in the
Spring contexteventDrivenTransitions - The event driven transitions available in the Spring contextstatesWithErrorTransition - The states that have error transitions associated with them available in the
Spring contextlisteners - Any JobExecutionListener implementations available in the Spring contextStateMachine instance configured with the available options from the application contextjava.lang.Exception - On any error configuring the state machine@Bean @Lazy public java.util.Collection<org.apache.commons.lang3.tuple.Pair<States,StateAction>> statesWithActions(StateAction.Initialize initializeAction, StateAction.ConfigureAgent configureAgentAction, StateAction.ResolveJobSpecification resolveJobSpecificationAction, StateAction.SetUpJob setUpJobAction, StateAction.LaunchJob launchJobAction, StateAction.MonitorJob monitorJobAction, StateAction.CleanupJob cleanupJobAction, StateAction.Shutdown shutdownAction, StateAction.HandleError handleErrorAction)
StateAction.initializeAction - The initialization actionconfigureAgentAction - The configure agent actionresolveJobSpecificationAction - The resolve job specification actionsetUpJobAction - The setup job actionlaunchJobAction - The launch job actionmonitorJobAction - The monitor job actioncleanupJobAction - The cleanup job actionshutdownAction - The shut down actionhandleErrorAction - The handle error action@Bean @Lazy public java.util.Collection<org.apache.commons.lang3.tuple.Triple<States,Events,States>> eventDrivenTransitions()