use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest in project zeebe by camunda.
the class ResolveIncidentCommandImpl method send.
@Override
public ZeebeFuture<ResolveIncidentResponse> send() {
final ResolveIncidentRequest request = builder.build();
final RetriableClientFutureImpl<ResolveIncidentResponse, GatewayOuterClass.ResolveIncidentResponse> future = new RetriableClientFutureImpl<>(ResolveIncidentResponseImpl::new, retryPredicate, streamObserver -> send(request, streamObserver));
send(request, future);
return future;
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest in project zeebe by camunda.
the class ResolveIncidentTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final ResolveIncidentStub stub = new ResolveIncidentStub();
stub.registerWith(brokerClient);
final ResolveIncidentRequest request = ResolveIncidentRequest.newBuilder().setIncidentKey(stub.getIncidentKey()).build();
// when
final ResolveIncidentResponse response = client.resolveIncident(request);
// then
assertThat(response).isNotNull();
final BrokerResolveIncidentRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getIntent()).isEqualTo(IncidentIntent.RESOLVE);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.INCIDENT);
assertThat(brokerRequest.getKey()).isEqualTo(stub.getIncidentKey());
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest in project zeebe by zeebe-io.
the class ResolveIncidentCommandImpl method send.
@Override
public ZeebeFuture<ResolveIncidentResponse> send() {
final ResolveIncidentRequest request = builder.build();
final RetriableClientFutureImpl<ResolveIncidentResponse, GatewayOuterClass.ResolveIncidentResponse> future = new RetriableClientFutureImpl<>(ResolveIncidentResponseImpl::new, retryPredicate, streamObserver -> send(request, streamObserver));
send(request, future);
return future;
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest in project zeebe by camunda-cloud.
the class ResolveIncidentCommandImpl method send.
@Override
public ZeebeFuture<ResolveIncidentResponse> send() {
final ResolveIncidentRequest request = builder.build();
final RetriableClientFutureImpl<ResolveIncidentResponse, GatewayOuterClass.ResolveIncidentResponse> future = new RetriableClientFutureImpl<>(ResolveIncidentResponseImpl::new, retryPredicate, streamObserver -> send(request, streamObserver));
send(request, future);
return future;
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest in project zeebe by camunda-cloud.
the class ResolveIncidentTest method shouldSendCommand.
@Test
public void shouldSendCommand() {
// when
client.newResolveIncidentCommand(123).send().join();
// then
final ResolveIncidentRequest request = gatewayService.getLastRequest();
assertThat(request.getIncidentKey()).isEqualTo(123);
rule.verifyDefaultRequestTimeout();
}
Aggregations