Summer.Batch.Core.Job.Flow.Support.StateTransition Class Reference

Value object representing a potential transition from one IState to another. The originating IState name and the next IState to execute are linked by a pattern for the ExitStatus::ExitCode exit code of an execution of the originating IState. More...

Public Member Functions

bool Matches (string status)
 Check if the provided status matches the pattern, signalling that the next State should be executed. More...
 
bool IsEnd ()
 Is this state the last ? More...
 
override string ToString ()
 ToString override More...
 

Static Public Member Functions

static StateTransition CreateEndStateTransition (IState state)
 Create a new end state StateTransition specification. This transition explicitly goes unconditionally to an end state (i.e. no more executions). More...
 
static StateTransition CreateEndStateTransition (IState state, string pattern)
 Create a new end state StateTransition specification. This transition explicitly goes to an end state (i.e. no more processing) if the outcome matches the pattern. More...
 
static StateTransition SwitchOriginAndDestination (StateTransition stateTransition, IState state, string next)
 Convenience method to switch the origin and destination of a transition, creating a new instance. More...
 
static StateTransition CreateStateTransition (IState state, string next)
 Create a new state IStateTransition specification with a wildcard pattern that matches all outcomes. More...
 
static StateTransition CreateStateTransition (IState state, string pattern, string next)
 Create a new StateTransition specification from one IState to another (by name). More...
 

Properties

IState State [get]
 State property. More...
 
string Pattern [get]
 Pattern property. More...
 
string Next [get]
 Next state name property. More...
 

Detailed Description

Value object representing a potential transition from one IState to another. The originating IState name and the next IState to execute are linked by a pattern for the ExitStatus::ExitCode exit code of an execution of the originating IState.

Member Function Documentation

static StateTransition Summer.Batch.Core.Job.Flow.Support.StateTransition.CreateEndStateTransition ( IState  state)
static

Create a new end state StateTransition specification. This transition explicitly goes unconditionally to an end state (i.e. no more executions).

Parameters
statethe IState used to generate the outcome for this transition
Returns
static StateTransition Summer.Batch.Core.Job.Flow.Support.StateTransition.CreateEndStateTransition ( IState  state,
string  pattern 
)
static

Create a new end state StateTransition specification. This transition explicitly goes to an end state (i.e. no more processing) if the outcome matches the pattern.

Parameters
statethe IState used to generate the outcome for this transition
patternthe pattern to match in the exit status of the IState
Returns
static StateTransition Summer.Batch.Core.Job.Flow.Support.StateTransition.CreateStateTransition ( IState  state,
string  next 
)
static

Create a new state IStateTransition specification with a wildcard pattern that matches all outcomes.

Parameters
statethe IState used to generate the outcome for this transition
nextthe name of the next IState to execute
Returns
static StateTransition Summer.Batch.Core.Job.Flow.Support.StateTransition.CreateStateTransition ( IState  state,
string  pattern,
string  next 
)
static

Create a new StateTransition specification from one IState to another (by name).

Parameters
statethe IState used to generate the outcome for this transition
patternthe pattern to match in the exit status of the IState
nextthe name of the next IState to execute
Returns
bool Summer.Batch.Core.Job.Flow.Support.StateTransition.IsEnd ( )

Is this state the last ?

Returns
bool Summer.Batch.Core.Job.Flow.Support.StateTransition.Matches ( string  status)

Check if the provided status matches the pattern, signalling that the next State should be executed.

Parameters
status
Returns
static StateTransition Summer.Batch.Core.Job.Flow.Support.StateTransition.SwitchOriginAndDestination ( StateTransition  stateTransition,
IState  state,
string  next 
)
static

Convenience method to switch the origin and destination of a transition, creating a new instance.

Parameters
stateTransitionan existing state transition
statethe new state for the origin
nextthe new name for the destination
Returns
override string Summer.Batch.Core.Job.Flow.Support.StateTransition.ToString ( )

ToString override

Returns

Property Documentation

string Summer.Batch.Core.Job.Flow.Support.StateTransition.Next
get

Next state name property.

string Summer.Batch.Core.Job.Flow.Support.StateTransition.Pattern
get

Pattern property.

IState Summer.Batch.Core.Job.Flow.Support.StateTransition.State
get

State property.


The documentation for this class was generated from the following file:
  • Summer.Batch.Core/Core/Job/Flow/Support/StateTransition.cs