Class: Beez::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/beez/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url: ::Beez.config.zeebe_url, opts: :this_channel_is_insecure) ⇒ Client

Returns a new instance of Client.



7
8
9
# File 'lib/beez/client.rb', line 7

def initialize(url: ::Beez.config.zeebe_url, opts: :this_channel_is_insecure)
  @client = ::Zeebe::Client::GatewayProtocol::Gateway::Stub.new(url, opts)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/beez/client.rb', line 5

def client
  @client
end

Instance Method Details

#activate_jobs(params = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/beez/client.rb', line 11

def activate_jobs(params = {})
  run(
    :activate_jobs,
    ::Zeebe::Client::GatewayProtocol::ActivateJobsRequest.new(params)
  )
end

#cancel_workflow_instance(params = {}) ⇒ Object



18
19
20
21
22
23
# File 'lib/beez/client.rb', line 18

def cancel_workflow_instance(params = {})
  run(
    :cancel_workflow_instance,
    ::Zeebe::Client::GatewayProtocol::CancelWorkflowInstanceRequest.new(params)
  )
end

#complete_job(params = {}) ⇒ Object



25
26
27
28
29
30
# File 'lib/beez/client.rb', line 25

def complete_job(params = {})
  run(
    :complete_job,
    ::Zeebe::Client::GatewayProtocol::CompleteJobRequest.new(params)
  )
end

#create_process_instance(params = {}) ⇒ Object



32
33
34
35
36
37
# File 'lib/beez/client.rb', line 32

def create_process_instance(params = {})
  run(
    :create_process_instance,
    ::Zeebe::Client::GatewayProtocol::CreateProcessInstanceRequest.new(params)
  )
end

#deploy_process(params = {}) ⇒ Object



39
40
41
42
43
44
# File 'lib/beez/client.rb', line 39

def deploy_process(params = {})
  run(
    :deploy_process,
    ::Zeebe::Client::GatewayProtocol::DeployProcessRequest.new(params)
  )
end

#fail_job(params = {}) ⇒ Object



46
47
48
49
50
51
# File 'lib/beez/client.rb', line 46

def fail_job(params = {})
  run(
    :fail_job,
    ::Zeebe::Client::GatewayProtocol::FailJobRequest.new(params)
  )
end

#publish_message(params = {}) ⇒ Object



60
61
62
63
64
65
# File 'lib/beez/client.rb', line 60

def publish_message(params = {})
  run(
    :publish_message,
    ::Zeebe::Client::GatewayProtocol::PublishMessageRequest.new(params)
  )
end

#resolve_incident(params = {}) ⇒ Object



67
68
69
70
71
72
# File 'lib/beez/client.rb', line 67

def resolve_incident(params = {})
  run(
    :resolve_incident,
    ::Zeebe::Client::GatewayProtocol::ResolveIncidentRequest.new(params)
  )
end

#set_variables(params = {}) ⇒ Object

rubocop:disable Naming/AccessorMethodName



75
76
77
78
79
80
# File 'lib/beez/client.rb', line 75

def set_variables(params = {})
  run(
    :set_variables,
    ::Zeebe::Client::GatewayProtocol::SetVariablesRequest.new(params)
  )
end

#throw_error(params = {}) ⇒ Object



53
54
55
56
57
58
# File 'lib/beez/client.rb', line 53

def throw_error(params = {})
  run(
    :throw_error,
    ::Zeebe::Client::GatewayProtocol::ThrowErrorRequest.new(params)
  )
end

#topology(params = {}) ⇒ Object

rubocop:enable Naming/AccessorMethodName



83
84
85
86
87
88
# File 'lib/beez/client.rb', line 83

def topology(params = {})
  run(
    :topology,
    ::Zeebe::Client::GatewayProtocol::TopologyRequest.new(params)
  )
end

#update_job_retries(params = {}) ⇒ Object



90
91
92
93
94
95
# File 'lib/beez/client.rb', line 90

def update_job_retries(params = {})
  run(
    :update_job_retries,
    ::Zeebe::Client::GatewayProtocol::UpdateJobRetriesRequest.new(params)
  )
end