Class: Temporal::Workflow::CommandStateMachine
- Inherits:
-
Object
- Object
- Temporal::Workflow::CommandStateMachine
- Defined in:
- lib/temporal/workflow/command_state_machine.rb
Constant Summary collapse
- NEW_STATE =
:new
- REQUESTED_STATE =
:requested
- SCHEDULED_STATE =
:scheduled
- STARTED_STATE =
:started
- COMPLETED_STATE =
:completed
- CANCELED_STATE =
:canceled
- FAILED_STATE =
:failed
- TIMED_OUT_STATE =
:timed_out
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #cancel ⇒ Object
- #complete ⇒ Object
- #fail ⇒ Object
-
#initialize ⇒ CommandStateMachine
constructor
A new instance of CommandStateMachine.
- #requested ⇒ Object
- #schedule ⇒ Object
- #start ⇒ Object
- #time_out ⇒ Object
Constructor Details
#initialize ⇒ CommandStateMachine
Returns a new instance of CommandStateMachine.
15 16 17 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 15 def initialize @state = NEW_STATE end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
13 14 15 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 13 def state @state end |
Instance Method Details
#cancel ⇒ Object
35 36 37 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 35 def cancel @state = CANCELED_STATE end |
#complete ⇒ Object
31 32 33 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 31 def complete @state = COMPLETED_STATE end |
#fail ⇒ Object
39 40 41 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 39 def fail @state = FAILED_STATE end |
#requested ⇒ Object
19 20 21 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 19 def requested @state = REQUESTED_STATE end |
#schedule ⇒ Object
23 24 25 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 23 def schedule @state = SCHEDULED_STATE end |
#start ⇒ Object
27 28 29 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 27 def start @state = STARTED_STATE end |
#time_out ⇒ Object
43 44 45 |
# File 'lib/temporal/workflow/command_state_machine.rb', line 43 def time_out @state = TIMED_OUT_STATE end |