internal ZeebeClient(string address, ChannelCredentials credentials, TimeSpan?keepAlive, Func <int, TimeSpan> sleepDurationProvider, ILoggerFactory loggerFactory = null) { this.loggerFactory = loggerFactory; var channelOptions = new List <ChannelOption>(); var userAgentString = "client: csharp, version: " + typeof(ZeebeClient).Assembly.GetName().Version; var userAgentOption = new ChannelOption(ChannelOptions.PrimaryUserAgentString, userAgentString); channelOptions.Add(userAgentOption); AddKeepAliveToChannelOptions(channelOptions, keepAlive); channelToGateway = new Channel(address, credentials, channelOptions); gatewayClient = new Gateway.GatewayClient(channelToGateway); asyncRetryStrategy = new TransientGrpcErrorRetryStrategy(sleepDurationProvider ?? DefaultWaitTimeProvider); }
public CreateProcessInstanceCommandWithResult(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, CreateProcessInstanceRequest createRequest) { this.client = client; createWithResultRequest = new CreateProcessInstanceWithResultRequest { Request = createRequest }; this.asyncRetryStrategy = asyncRetryStrategy; }
public CompleteJobCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long jobKey) { gatewayClient = client; request = new CompleteJobRequest { JobKey = jobKey }; this.asyncRetryStrategy = asyncRetryStrategy; }
public CancelWorkflowInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long workflowInstanceKey) { request = new CancelWorkflowInstanceRequest { WorkflowInstanceKey = workflowInstanceKey }; this.client = client; this.asyncRetryStrategy = asyncRetryStrategy; }
public SetVariablesCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long elementInstanceKey) { request = new SetVariablesRequest { ElementInstanceKey = elementInstanceKey }; this.client = client; this.asyncRetryStrategy = asyncRetryStrategy; }
public CancelProcessInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long processInstanceKey) { request = new CancelProcessInstanceRequest { ProcessInstanceKey = processInstanceKey }; this.client = client; this.asyncRetryStrategy = asyncRetryStrategy; }
public ThrowErrorCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long jobKey) { gatewayClient = client; this.asyncRetryStrategy = asyncRetryStrategy; request = new ThrowErrorRequest { JobKey = jobKey }; }
public ResolveIncidentCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long incidentKey) { request = new ResolveIncidentRequest { IncidentKey = incidentKey }; this.client = client; this.asyncRetryStrategy = asyncRetryStrategy; }
public UpdateRetriesCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long jobKey) { request = new UpdateJobRetriesRequest { JobKey = jobKey }; this.client = client; this.asyncRetryStrategy = asyncRetryStrategy; }
public ActivateJobsCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy) { this.asyncRetryStrategy = asyncRetryStrategy; activator = new JobActivator(client); Request = new ActivateJobsRequest(); }
public DeployProcessCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy) { gatewayClient = client; this.asyncRetryStrategy = asyncRetryStrategy; request = new DeployProcessRequest(); }
public CreateProcessInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy) { this.client = client; request = new CreateProcessInstanceRequest(); this.asyncRetryStrategy = asyncRetryStrategy; }
public TopologyRequestCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy) { gatewayClient = client; this.asyncRetryStrategy = asyncRetryStrategy; }
public PublishMessageCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy) { gatewayClient = client; request = new PublishMessageRequest(); this.asyncRetryStrategy = asyncRetryStrategy; }