Class: Camunda::Model
- Inherits:
-
Object
- Object
- Camunda::Model
- Includes:
- Her::Model
- Defined in:
- lib/camunda/model.rb
Overview
This class in the main element of Her. It defines which API models will be bound to.
Direct Known Subclasses
Deployment, ExternalTask, Incident, ProcessDefinition, ProcessInstance, Signal, Task
Defined Under Namespace
Classes: RecordNotFound
Class Method Summary collapse
-
.find_by!(params) ⇒ Camunda::Model
Returns result of find_by but raises an exception instead of returning nil.
- .log_details? ⇒ Boolean
-
.worker_id ⇒ String
Returns the worker id.
Class Method Details
.find_by!(params) ⇒ Camunda::Model
Returns result of find_by but raises an exception instead of returning nil
39 40 41 42 43 |
# File 'lib/camunda/model.rb', line 39 def self.find_by!(params) find_by(params).tap do |result| raise Camunda::Model::RecordNotFound unless result end end |
.log_details? ⇒ Boolean
6 7 8 |
# File 'lib/camunda/model.rb', line 6 def self.log_details? defined?(Rails) && Rails.env.development? end |
.worker_id ⇒ String
Note:
default worker id is set in Camunda::Workflow.configuration
Returns the worker id
48 49 50 |
# File 'lib/camunda/model.rb', line 48 def self.worker_id Camunda::Workflow.configuration.worker_id end |