Search in sources :

Example 1 with CancelProcessInstanceResponse

use of io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse in project zeebe by camunda.

the class CancelProcessInstanceCommandImpl method send.

@Override
public ZeebeFuture<CancelProcessInstanceResponse> send() {
    final CancelProcessInstanceRequest request = builder.build();
    final RetriableClientFutureImpl<CancelProcessInstanceResponse, GatewayOuterClass.CancelProcessInstanceResponse> future = new RetriableClientFutureImpl<>(CancelProcessInstanceResponseImpl::new, retryPredicate, streamObserver -> send(request, streamObserver));
    send(request, future);
    return future;
}
Also used : CancelProcessInstanceRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest) RetriableClientFutureImpl(io.camunda.zeebe.client.impl.RetriableClientFutureImpl) CancelProcessInstanceResponseImpl(io.camunda.zeebe.client.impl.response.CancelProcessInstanceResponseImpl) CancelProcessInstanceResponse(io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse)

Example 2 with CancelProcessInstanceResponse

use of io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse in project zeebe by camunda.

the class CancelProcessInstanceTest method shouldNotHaveNullResponse.

@Test
public void shouldNotHaveNullResponse() {
    // given
    final CancelProcessInstanceCommandStep1 command = client.newCancelInstanceCommand(12);
    // when
    final CancelProcessInstanceResponse response = command.send().join();
    // then
    assertThat(response).isNotNull();
}
Also used : CancelProcessInstanceCommandStep1(io.camunda.zeebe.client.api.command.CancelProcessInstanceCommandStep1) CancelProcessInstanceResponse(io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse) ClientTest(io.camunda.zeebe.client.util.ClientTest) Test(org.junit.Test)

Example 3 with CancelProcessInstanceResponse

use of io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse in project zeebe by zeebe-io.

the class CancelProcessInstanceTest method shouldNotHaveNullResponse.

@Test
public void shouldNotHaveNullResponse() {
    // given
    final CancelProcessInstanceCommandStep1 command = client.newCancelInstanceCommand(12);
    // when
    final CancelProcessInstanceResponse response = command.send().join();
    // then
    assertThat(response).isNotNull();
}
Also used : CancelProcessInstanceCommandStep1(io.camunda.zeebe.client.api.command.CancelProcessInstanceCommandStep1) CancelProcessInstanceResponse(io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse) ClientTest(io.camunda.zeebe.client.util.ClientTest) Test(org.junit.Test)

Example 4 with CancelProcessInstanceResponse

use of io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse in project zeebe by camunda-cloud.

the class CancelProcessInstanceCommandImpl method send.

@Override
public ZeebeFuture<CancelProcessInstanceResponse> send() {
    final CancelProcessInstanceRequest request = builder.build();
    final RetriableClientFutureImpl<CancelProcessInstanceResponse, GatewayOuterClass.CancelProcessInstanceResponse> future = new RetriableClientFutureImpl<>(CancelProcessInstanceResponseImpl::new, retryPredicate, streamObserver -> send(request, streamObserver));
    send(request, future);
    return future;
}
Also used : CancelProcessInstanceRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest) RetriableClientFutureImpl(io.camunda.zeebe.client.impl.RetriableClientFutureImpl) CancelProcessInstanceResponseImpl(io.camunda.zeebe.client.impl.response.CancelProcessInstanceResponseImpl) CancelProcessInstanceResponse(io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse)

Example 5 with CancelProcessInstanceResponse

use of io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse in project zeebe by zeebe-io.

the class CancelProcessInstanceCommandImpl method send.

@Override
public ZeebeFuture<CancelProcessInstanceResponse> send() {
    final CancelProcessInstanceRequest request = builder.build();
    final RetriableClientFutureImpl<CancelProcessInstanceResponse, GatewayOuterClass.CancelProcessInstanceResponse> future = new RetriableClientFutureImpl<>(CancelProcessInstanceResponseImpl::new, retryPredicate, streamObserver -> send(request, streamObserver));
    send(request, future);
    return future;
}
Also used : CancelProcessInstanceRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest) RetriableClientFutureImpl(io.camunda.zeebe.client.impl.RetriableClientFutureImpl) CancelProcessInstanceResponseImpl(io.camunda.zeebe.client.impl.response.CancelProcessInstanceResponseImpl) CancelProcessInstanceResponse(io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse)

Aggregations

CancelProcessInstanceResponse (io.camunda.zeebe.client.api.response.CancelProcessInstanceResponse)6 CancelProcessInstanceCommandStep1 (io.camunda.zeebe.client.api.command.CancelProcessInstanceCommandStep1)3 RetriableClientFutureImpl (io.camunda.zeebe.client.impl.RetriableClientFutureImpl)3 CancelProcessInstanceResponseImpl (io.camunda.zeebe.client.impl.response.CancelProcessInstanceResponseImpl)3 ClientTest (io.camunda.zeebe.client.util.ClientTest)3 CancelProcessInstanceRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest)3 Test (org.junit.Test)3