Search in sources :

Example 1 with DeployResourceResponse

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);
}
Also used : RecordMetadata(io.camunda.zeebe.protocol.impl.record.RecordMetadata) RecordType(io.camunda.zeebe.protocol.record.RecordType) VariableDocumentIntent(io.camunda.zeebe.protocol.record.intent.VariableDocumentIntent) CompleteJobResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CompleteJobResponse) DeploymentIntent(io.camunda.zeebe.protocol.record.intent.DeploymentIntent) CreateProcessInstanceWithResultRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultRequest) VariableDocumentRecord(io.camunda.zeebe.protocol.impl.record.value.variable.VariableDocumentRecord) TopologyResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.TopologyResponse) JobRecord(io.camunda.zeebe.protocol.impl.record.value.job.JobRecord) ActivateJobsRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ActivateJobsRequest) RecordMetadata(io.camunda.zeebe.protocol.impl.record.RecordMetadata) StreamObserver(io.grpc.stub.StreamObserver) CreateProcessInstanceWithResultResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultResponse) GatewayOuterClass(io.camunda.zeebe.gateway.protocol.GatewayOuterClass) ResolveIncidentRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest) VariableDocumentUpdateSemantic(io.camunda.zeebe.protocol.record.value.VariableDocumentUpdateSemantic) VersionUtil(io.camunda.zeebe.util.VersionUtil) ResolveIncidentResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse) BrokerInfo(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.BrokerInfo) CreateProcessInstanceRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceRequest) SetVariablesResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.SetVariablesResponse) TopologyRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.TopologyRequest) ProcessInstanceCreationRecord(io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceCreationRecord) FailJobRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.FailJobRequest) ThrowErrorResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ThrowErrorResponse) JobBatchIntent(io.camunda.zeebe.protocol.record.intent.JobBatchIntent) ThrowErrorRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ThrowErrorRequest) CompleteJobRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CompleteJobRequest) DeployResourceResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployResourceResponse) DeploymentRecord(io.camunda.zeebe.protocol.impl.record.value.deployment.DeploymentRecord) IncidentIntent(io.camunda.zeebe.protocol.record.intent.IncidentIntent) PublishMessageResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageResponse) CancelProcessInstanceRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest) IncidentRecord(io.camunda.zeebe.protocol.impl.record.value.incident.IncidentRecord) ProcessInstanceCreationIntent(io.camunda.zeebe.protocol.record.intent.ProcessInstanceCreationIntent) BufferUtil(io.camunda.zeebe.util.buffer.BufferUtil) DeployProcessRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployProcessRequest) SetVariablesRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.SetVariablesRequest) ProcessInstanceIntent(io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent) CreateProcessInstanceResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceResponse) FailJobResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.FailJobResponse) ValueType(io.camunda.zeebe.protocol.record.ValueType) MessageIntent(io.camunda.zeebe.protocol.record.intent.MessageIntent) UpdateJobRetriesRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.UpdateJobRetriesRequest) DeployProcessResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployProcessResponse) MsgPackConverter(io.camunda.zeebe.protocol.impl.encoding.MsgPackConverter) PublishMessageRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageRequest) DeploymentResource(io.camunda.zeebe.protocol.impl.record.value.deployment.DeploymentResource) UpdateJobRetriesResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.UpdateJobRetriesResponse) Partition(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.Partition) ValueArray(io.camunda.zeebe.msgpack.value.ValueArray) CancelProcessInstanceResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceResponse) GatewayGrpc(io.camunda.zeebe.gateway.protocol.GatewayGrpc) ActivateJobsResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ActivateJobsResponse) ProcessInstanceRecord(io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceRecord) JobBatchRecord(io.camunda.zeebe.protocol.impl.record.value.job.JobBatchRecord) MessageRecord(io.camunda.zeebe.protocol.impl.record.value.message.MessageRecord) DeployResourceRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployResourceRequest) JobIntent(io.camunda.zeebe.protocol.record.intent.JobIntent) DeploymentRecord(io.camunda.zeebe.protocol.impl.record.value.deployment.DeploymentRecord) DeploymentResource(io.camunda.zeebe.protocol.impl.record.value.deployment.DeploymentResource)

Aggregations

GatewayGrpc (io.camunda.zeebe.gateway.protocol.GatewayGrpc)1 GatewayOuterClass (io.camunda.zeebe.gateway.protocol.GatewayOuterClass)1 ActivateJobsRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ActivateJobsRequest)1 ActivateJobsResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ActivateJobsResponse)1 BrokerInfo (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.BrokerInfo)1 CancelProcessInstanceRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest)1 CancelProcessInstanceResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceResponse)1 CompleteJobRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CompleteJobRequest)1 CompleteJobResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CompleteJobResponse)1 CreateProcessInstanceRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceRequest)1 CreateProcessInstanceResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceResponse)1 CreateProcessInstanceWithResultRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultRequest)1 CreateProcessInstanceWithResultResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultResponse)1 DeployProcessRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployProcessRequest)1 DeployProcessResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployProcessResponse)1 DeployResourceRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployResourceRequest)1 DeployResourceResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.DeployResourceResponse)1 FailJobRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.FailJobRequest)1 FailJobResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.FailJobResponse)1 Partition (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.Partition)1