コード例 #1
0
        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;
 }
コード例 #3
0
 public CompleteJobCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long jobKey)
 {
     gatewayClient = client;
     request       = new CompleteJobRequest
     {
         JobKey = jobKey
     };
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #4
0
 public CancelWorkflowInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long workflowInstanceKey)
 {
     request = new CancelWorkflowInstanceRequest
     {
         WorkflowInstanceKey = workflowInstanceKey
     };
     this.client             = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #5
0
 public SetVariablesCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long elementInstanceKey)
 {
     request = new SetVariablesRequest
     {
         ElementInstanceKey = elementInstanceKey
     };
     this.client             = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #6
0
 public CancelProcessInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long processInstanceKey)
 {
     request = new CancelProcessInstanceRequest
     {
         ProcessInstanceKey = processInstanceKey
     };
     this.client             = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #7
0
 public ThrowErrorCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long jobKey)
 {
     gatewayClient           = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
     request = new ThrowErrorRequest
     {
         JobKey = jobKey
     };
 }
コード例 #8
0
 public ResolveIncidentCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long incidentKey)
 {
     request = new ResolveIncidentRequest
     {
         IncidentKey = incidentKey
     };
     this.client             = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #9
0
 public UpdateRetriesCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, long jobKey)
 {
     request = new UpdateJobRetriesRequest
     {
         JobKey = jobKey
     };
     this.client             = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #10
0
 public ActivateJobsCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy)
 {
     this.asyncRetryStrategy = asyncRetryStrategy;
     activator = new JobActivator(client);
     Request   = new ActivateJobsRequest();
 }
コード例 #11
0
 public DeployProcessCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy)
 {
     gatewayClient           = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
     request = new DeployProcessRequest();
 }
コード例 #12
0
 public CreateProcessInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy)
 {
     this.client             = client;
     request                 = new CreateProcessInstanceRequest();
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #13
0
 public TopologyRequestCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy)
 {
     gatewayClient           = client;
     this.asyncRetryStrategy = asyncRetryStrategy;
 }
コード例 #14
0
 public PublishMessageCommand(GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy)
 {
     gatewayClient           = client;
     request                 = new PublishMessageRequest();
     this.asyncRetryStrategy = asyncRetryStrategy;
 }