use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployResourceResponse in project zeebe-process-test by camunda-cloud.
the class GrpcToLogStreamGateway method deployResource.
@Override
public void deployResource(final DeployResourceRequest request, final StreamObserver<DeployResourceResponse> responseObserver) {
final Long requestId = gatewayRequestStore.registerNewRequest(request.getClass(), responseObserver);
final RecordMetadata recordMetadata = prepareRecordMetadata().requestId(requestId).valueType(ValueType.DEPLOYMENT).intent(DeploymentIntent.CREATE);
final DeploymentRecord deploymentRecord = new DeploymentRecord();
final ValueArray<DeploymentResource> resources = deploymentRecord.resources();
request.getResourcesList().forEach((resource -> resources.add().setResourceName(resource.getName()).setResource(resource.getContent().toByteArray())));
writer.writeCommandWithoutKey(deploymentRecord, recordMetadata);
}
Aggregations