Class: Wf::CaseCommand::StartCase
- Inherits:
-
Object
- Object
- Wf::CaseCommand::StartCase
- Includes:
- SimpleCommand
- Defined in:
- app/models/wf/case_command/start_case.rb
Instance Attribute Summary collapse
-
#wf_case ⇒ Object
readonly
Returns the value of attribute wf_case.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(wf_case) ⇒ StartCase
constructor
A new instance of StartCase.
Constructor Details
#initialize(wf_case) ⇒ StartCase
Returns a new instance of StartCase.
7 8 9 |
# File 'app/models/wf/case_command/start_case.rb', line 7 def initialize(wf_case) @wf_case = wf_case end |
Instance Attribute Details
#wf_case ⇒ Object (readonly)
Returns the value of attribute wf_case.
6 7 8 |
# File 'app/models/wf/case_command/start_case.rb', line 6 def wf_case @wf_case end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/models/wf/case_command/start_case.rb', line 11 def call Wf::ApplicationRecord.transaction do wf_case.active! AddToken.call(wf_case, wf_case.workflow.places.start.first) SweepAutomaticTransitions.call(wf_case) end end |