public CreateProcessInstanceCommandWithResult(Gateway.GatewayClient client, CreateProcessInstanceRequest createRequest) { this.client = client; createWithResultRequest = new CreateProcessInstanceWithResultRequest { Request = createRequest }; }
public async Task ShouldSendRequestWithProcessDefinitionKeyAsExpected() { // given var expectedRequest = new CreateProcessInstanceRequest { ProcessDefinitionKey = 1 }; // when await ZeebeClient.NewCreateProcessInstanceCommand() .ProcessDefinitionKey(1) .Send(); // then var request = TestService.Requests[typeof(CreateProcessInstanceRequest)][0]; Assert.AreEqual(expectedRequest, request); }
public async Task ShouldSendRequestWithVersionAsExpected() { // given var expectedRequest = new CreateProcessInstanceRequest { BpmnProcessId = "process", Version = 1 }; // when await ZeebeClient.NewCreateProcessInstanceCommand() .BpmnProcessId("process") .Version(1) .Send(); // then var request = TestService.Requests[typeof(CreateProcessInstanceRequest)][0]; Assert.AreEqual(expectedRequest, request); }
public async Task ShouldSendRequestWithVariablesAndProcessIdAsExpected() { // given var expectedRequest = new CreateProcessInstanceRequest { BpmnProcessId = "process", Version = -1, Variables = "{\"foo\":1}" }; // when await ZeebeClient.NewCreateProcessInstanceCommand() .BpmnProcessId("process") .LatestVersion() .Variables("{\"foo\":1}") .Send(); // then var request = TestService.Requests[typeof(CreateProcessInstanceRequest)][0]; Assert.AreEqual(expectedRequest, request); }
public CreateProcessInstanceCommand(Gateway.GatewayClient client) { this.client = client; request = new CreateProcessInstanceRequest(); }
public override AsyncUnaryCall <CreateProcessInstanceResponse> CreateProcessInstanceAsync(CreateProcessInstanceRequest request, CallOptions options) { throw new ObjectDisposedException(ZeebeClientWasAlreadyDisposed); }
public override AsyncUnaryCall <CreateProcessInstanceResponse> CreateProcessInstanceAsync(CreateProcessInstanceRequest request, Metadata headers = null, DateTime?deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { throw new ObjectDisposedException(ZeebeClientWasAlreadyDisposed); }
public override Task <CreateProcessInstanceResponse> CreateProcessInstance(CreateProcessInstanceRequest request, ServerCallContext context) { return(Task.FromResult((CreateProcessInstanceResponse)HandleRequest(request, context))); }
public CreateProcessInstanceCommand(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy) { this.client = client; request = new CreateProcessInstanceRequest(); this.asyncRetryStrategy = asyncRetryStrategy; }
public CreateProcessInstanceCommandWithResult(Gateway.GatewayClient client, IAsyncRetryStrategy asyncRetryStrategy, CreateProcessInstanceRequest createRequest) { this.client = client; createWithResultRequest = new CreateProcessInstanceWithResultRequest { Request = createRequest }; this.asyncRetryStrategy = asyncRetryStrategy; }