Class: Shikibu::Integrations::ActiveJob::WorkflowJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/shikibu/integrations/active_job.rb

Overview

Base job for running workflows

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.workflow_classObject

Returns the value of attribute workflow_class.



34
35
36
# File 'lib/shikibu/integrations/active_job.rb', line 34

def workflow_class
  @workflow_class
end

Instance Method Details

#perform(workflow_class: nil, **input) ⇒ Object

Run a workflow

Parameters:

  • workflow_class (String, nil) (defaults to: nil)

    Workflow class name (if not set on class)

  • input (Hash)

    Input parameters



40
41
42
43
# File 'lib/shikibu/integrations/active_job.rb', line 40

def perform(workflow_class: nil, **input)
  klass = resolve_workflow_class(workflow_class)
  Shikibu.run(klass, **input)
end