Class: Camunda::Workflow::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/camunda/workflow.rb

Overview

Default instance variables configurations for Spyke and camunda-workflow

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/camunda/workflow.rb', line 74

def initialize
  @engine_url = 'http://localhost:8080'
  @engine_route_prefix = 'rest'
  @camunda_user = ''
  @camunda_password = ''
  @worker_id = '0'
  @lock_duration = 14.days
  @max_polling_tasks = 2
  @long_polling_duration = 30.seconds
  @backtrace_silencer_lines = %w[gems/activesupport gems/sidekiq gems/activejob gems/i18n gems/actionpack]
  @tenant_id = if defined?(Rails)
                 Rails.env.test? ? 'test-environment' : nil
               end
end

Instance Attribute Details

#backtrace_silencer_linesArray<String>

Can configure the backtrace silencer

Returns:

  • (Array<String>)

    List of backtrace silencer strings which are used to clean incident backtraces



69
70
71
# File 'lib/camunda/workflow.rb', line 69

def backtrace_silencer_lines
  @backtrace_silencer_lines
end

#camunda_passwordString

Camunda password is supplied with the Camunda user to authenticate using HTTP Basic Auth.

Returns:

  • (String)

    Camunda password for HTTP Basic Auth



66
67
68
# File 'lib/camunda/workflow.rb', line 66

def camunda_password
  @camunda_password
end

#camunda_userString

When HTTP Basic Auth is turned on for Camunda, a user needs to be created in Camunda Admin and set in to be used in the configuration.

Returns:

  • (String)

    Camunda user name for HTTP Basic Auth



63
64
65
# File 'lib/camunda/workflow.rb', line 63

def camunda_user
  @camunda_user
end

#engine_route_prefixString

Engine route prefix that determines the path for the REST Api Default route for Java spring app is ‘/rest` Default route for Camunda deployment is `/rest-engine`

Returns:

  • (String)

    the prefix for Camunda REST Api



41
42
43
# File 'lib/camunda/workflow.rb', line 41

def engine_route_prefix
  @engine_route_prefix
end

#engine_urlString

Sets the deult engine url for Camunda REST Api

Returns:

  • (String)

    the url for Camunda deployment



36
37
38
# File 'lib/camunda/workflow.rb', line 36

def engine_url
  @engine_url
end

#http_proxyString

Configure an HTTP proxy for all requests to use

Returns:

  • (String)

    The defined HTTP proxy



72
73
74
# File 'lib/camunda/workflow.rb', line 72

def http_proxy
  @http_proxy
end

#lock_durationInteger

The default fetch_and_lock time duration when fetching a task

Returns:

  • (Integer)

    time in days to lock task



47
48
49
# File 'lib/camunda/workflow.rb', line 47

def lock_duration
  @lock_duration
end

#long_polling_durationInteger

With the aid of log polling, a request is suspended by the server if no external tasks are available. Long polling significantly reduces the number of request and enables using resources more efficiently on both the server and client.

Returns:

  • (Integer)


55
56
57
# File 'lib/camunda/workflow.rb', line 55

def long_polling_duration
  @long_polling_duration
end

#max_polling_tasksInteger

Max polling tasks when using the command line to fetch and lock tasks

Returns:

  • (Integer)

    default is set to fetch and lock 2 tasks



50
51
52
# File 'lib/camunda/workflow.rb', line 50

def max_polling_tasks
  @max_polling_tasks
end

#tenant_idString

The tenant identifier is specified on the deployment and is propagated to all data that is created from the deployment(e.g. process definitions, process instances, tacks).

Returns:

  • (String)

    name for tenant identifier



59
60
61
# File 'lib/camunda/workflow.rb', line 59

def tenant_id
  @tenant_id
end

#worker_idString

Name of worker, defaults to ‘0’

Returns:

  • (String)

    name of worker



44
45
46
# File 'lib/camunda/workflow.rb', line 44

def worker_id
  @worker_id
end