Class: Camunda::Signal

Inherits:
Model
  • Object
show all
Includes:
VariableSerialization
Defined in:
lib/camunda/signal.rb

Overview

Signal events are events which reference a named signal. Camunda::Signal is used to create a signal with variables.

Examples:

`Camunda::Signal.create name: 'Signal Name', variables: {foo: "bar"}`

Class Method Summary collapse

Methods included from VariableSerialization

#serialize_variables

Methods inherited from Model

base_path, find_by!, worker_id

Class Method Details

.create(hash = {}) ⇒ {Symbol => Hash,Faraday::Response}

Creates a signal within the process definition on the Camunda engine

Parameters:

  • hash (Hash) (defaults to: {})

    variables that are sent to Camunda engine

Returns:

  • ({Symbol => Hash,Faraday::Response})


12
13
14
15
# File 'lib/camunda/signal.rb', line 12

def self.create(hash={})
  hash[:variables] = serialize_variables(hash[:variables]) if hash[:variables]
  request :post, 'signal', hash
end