class Beez::Client
Attributes
client[R]
Public Class Methods
new(url: ::Beez.config.zeebe_url, opts: :this_channel_is_insecure)
click to toggle source
# File lib/beez/client.rb, line 8 def initialize(url: ::Beez.config.zeebe_url, opts: :this_channel_is_insecure) @client = ::Zeebe::Client::GatewayProtocol::Gateway::Stub.new(url, opts) end
Public Instance Methods
activate_jobs(params = {})
click to toggle source
# File lib/beez/client.rb, line 12 def activate_jobs(params = {}) run(:activate_jobs, ::Zeebe::Client::GatewayProtocol::ActivateJobsRequest.new(params) ) end
cancel_workflow_instance(params = {})
click to toggle source
# 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 = {})
click to toggle source
# File lib/beez/client.rb, line 24 def complete_job(params = {}) run(:complete_job, ::Zeebe::Client::GatewayProtocol::CompleteJobRequest.new(params) ) end
create_workflow_instance(params = {})
click to toggle source
# File lib/beez/client.rb, line 30 def create_workflow_instance(params = {}) run(:create_workflow_instance, ::Zeebe::Client::GatewayProtocol::CreateWorkflowInstanceRequest.new(params) ) end
deploy_workflow(params = {})
click to toggle source
# File lib/beez/client.rb, line 36 def deploy_workflow(params = {}) run(:deploy_workflow, ::Zeebe::Client::GatewayProtocol::DeployWorkflowRequest.new(params) ) end
fail_job(params = {})
click to toggle source
# File lib/beez/client.rb, line 42 def fail_job(params = {}) run(:fail_job, ::Zeebe::Client::GatewayProtocol::FailJobRequest.new(params) ) end
publish_message(params = {})
click to toggle source
# File lib/beez/client.rb, line 54 def publish_message(params = {}) run(:publish_message, ::Zeebe::Client::GatewayProtocol::PublishMessageRequest.new(params) ) end
resolve_incident(params = {})
click to toggle source
# File lib/beez/client.rb, line 60 def resolve_incident(params = {}) run(:resolve_incident, ::Zeebe::Client::GatewayProtocol::ResolveIncidentRequest.new(params) ) end
set_variables(params = {})
click to toggle source
# File lib/beez/client.rb, line 66 def set_variables(params = {}) run(:set_variables, ::Zeebe::Client::GatewayProtocol::SetVariablesRequest.new(params) ) end
throw_error(params = {})
click to toggle source
# File lib/beez/client.rb, line 48 def throw_error(params = {}) run(:throw_error, ::Zeebe::Client::GatewayProtocol::ThrowErrorRequest.new(params) ) end
topology(params = {})
click to toggle source
# File lib/beez/client.rb, line 72 def topology(params = {}) run(:topology, ::Zeebe::Client::GatewayProtocol::TopologyRequest.new(params) ) end
update_job_retries(params = {})
click to toggle source
# File lib/beez/client.rb, line 78 def update_job_retries(params = {}) run(:update_job_retries, ::Zeebe::Client::GatewayProtocol::UpdateJobRetriesRequest.new(params) ) end
Private Instance Methods
logger()
click to toggle source
# File lib/beez/client.rb, line 93 def logger ::Beez.logger end
run(method, params = {})
click to toggle source
# File lib/beez/client.rb, line 86 def run(method, params = {}) client.public_send(method, params) rescue ::GRPC::Unavailable => exception logger.error exception.message raise exception end