Class: RailsWorkflow::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rails_workflow.rb

Overview

If you want to change some settings, add config/initializers/rails_workflow.rb to your application:

RailsWorkflow.setup do |config|
...
end

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) sidekiq_enabled=(value)

Used to enable/disable sidekiq in engine:

RailsWorkflow.setup do |config|
  config.sidekiq_enabled = false
end

32
33
34
# File 'lib/rails_workflow.rb', line 32

def sidekiq_enabled=(value)
  @sidekiq_enabled = value
end

Instance Method Details

- (Object) assignment_by=(assignment)

User operations can be assigned to users using user's role or group. By default you can use both - group or role. Or you can specify other criteria

RailsWorkflow.setup do |config|
  ...
  config.assignment_by = [:group, :role]
  ...
end
[View source]

73
74
75
# File 'lib/rails_workflow.rb', line 73

def assignment_by=(assignment)
  @assignment_by = assignment
end

- (Object) manager_class=(value)

ProcessManager responsible for building, starting and completing processes. ProcessTemplate allow you to specify custom process manager.

By default configuration using RailsWorkflow::ProcessManager for processes. You can specify some other custom default class:

RailsWorkflow.setup do |config|
  ...
  config.manager_class = "RailsWorkflow::ProcessManager"
  ...
end
[View source]

111
112
113
# File 'lib/rails_workflow.rb', line 111

def manager_class=(value)
  @process_manager = value
end

- (Object) operation_template_klass=(value)

By default configuration using RailsWorkflow::OperationTemplate for new operation templates. You can specify some other custom default class:

RailsWorkflow.setup do |config|
  ...
  config.operation_template_klass = "RailsWorkflow::OperationTemplate"
  ...
end
[View source]

91
92
93
# File 'lib/rails_workflow.rb', line 91

def operation_template_klass=(value)
  @operation_template_type = value
end

- (Object) process_class=(value)

Process class is responsible for process behaviour. By default process templates uses RailsWorkflow::Process. You can specify some other custom default class:

RailsWorkflow.setup do |config|
  ...
  config.process_class = "RailsWorkflow::Process"
  ...
end
[View source]

128
129
130
# File 'lib/rails_workflow.rb', line 128

def process_class=(value)
  @process_class = value
end

- (Object) process_template_klass=(value)

Process template is responsible for building process and operations. You can specify custom process template class for process configuration. By default configuration using RailsWorkflow::ProcessTemplate for process templates. Here you can specify some other custom default class:

RailsWorkflow.setup do |config|
  ...
  config.process_template_klass = "RailsWorkflow::ProcessTemplate"
  ...
end
[View source]

146
147
148
# File 'lib/rails_workflow.rb', line 146

def process_template_klass=(value)
  @process_template_type = value
end