Class: CurationConcerns::Workflow::WorkflowActionService
- Inherits:
-
Object
- Object
- CurationConcerns::Workflow::WorkflowActionService
- Defined in:
- app/services/curation_concerns/workflow/workflow_action_service.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#comment_text ⇒ Object
readonly
Returns the value of attribute comment_text.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(subject:, action:, comment:) ⇒ WorkflowActionService
constructor
A new instance of WorkflowActionService.
- #run ⇒ Object
Constructor Details
#initialize(subject:, action:, comment:) ⇒ WorkflowActionService
Returns a new instance of WorkflowActionService.
8 9 10 11 12 |
# File 'app/services/curation_concerns/workflow/workflow_action_service.rb', line 8 def initialize(subject:, action:, comment:) @subject = subject @action = action @comment_text = comment end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
14 15 16 |
# File 'app/services/curation_concerns/workflow/workflow_action_service.rb', line 14 def action @action end |
#comment_text ⇒ Object (readonly)
Returns the value of attribute comment_text.
14 15 16 |
# File 'app/services/curation_concerns/workflow/workflow_action_service.rb', line 14 def comment_text @comment_text end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
14 15 16 |
# File 'app/services/curation_concerns/workflow/workflow_action_service.rb', line 14 def subject @subject end |
Class Method Details
.run(subject:, action:, comment: nil) ⇒ Object
4 5 6 |
# File 'app/services/curation_concerns/workflow/workflow_action_service.rb', line 4 def self.run(subject:, action:, comment: nil) new(subject: subject, action: action, comment: comment).run end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/services/curation_concerns/workflow/workflow_action_service.rb', line 16 def run update_sipity_workflow_state comment = create_sipity_comment handle_sipity_notifications(comment: comment) handle_additional_sipity_workflow_action_processing(comment: comment) subject.work.update_index # So that the new actions and state are written into solr. end |