Class: ProcessEngine::ProcessInstance
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ProcessEngine::ProcessInstance
- Defined in:
- app/models/process_engine/process_instance.rb
Instance Method Summary collapse
- #last_process_task_by_state_name(state_name) ⇒ Object
- #move_to_next_state(pdn_slug_state, options = {}) ⇒ Object
- #process_tasks_by_state_name(state_name) ⇒ Object
- #start ⇒ Object
Instance Method Details
#last_process_task_by_state_name(state_name) ⇒ Object
25 26 27 |
# File 'app/models/process_engine/process_instance.rb', line 25 def last_process_task_by_state_name(state_name) process_tasks_by_state_name(state_name).first end |
#move_to_next_state(pdn_slug_state, options = {}) ⇒ Object
11 12 13 |
# File 'app/models/process_engine/process_instance.rb', line 11 def move_to_next_state(pdn_slug_state, = {}) move_to_next_cur_state(pdn_slug_state, [], ) end |
#process_tasks_by_state_name(state_name) ⇒ Object
21 22 23 |
# File 'app/models/process_engine/process_instance.rb', line 21 def process_tasks_by_state_name(state_name) process_tasks.by_state(state_name).desc end |
#start ⇒ Object
15 16 17 18 19 |
# File 'app/models/process_engine/process_instance.rb', line 15 def start update_attributes!(states: [process_definition.starting_node]) begin_process_instance self end |