A state pattern implements for state machine.For solving the complex workflow coding.