Exemplo n.º 1
0
        public override async Task <BindingResponseEnvelope> OnBindingEvent(BindingEventEnvelope request,
                                                                            ServerCallContext context)
        {
            var bindingResponse = new BindingResponseEnvelope();

            return(bindingResponse);
        }
Exemplo n.º 2
0
        public async override Task <BindingResponseEnvelope> OnBindingEvent(BindingEventEnvelope request, Grpc.Core.ServerCallContext context)
        {
            if (!WorkflowExists(request.Name))
            {
                throw new RpcException(new Status(StatusCode.InvalidArgument, $"Worflow with name {request.Name} was not found"));
            }
            var response = await ExecuteWorkflow(request.Name);

            Console.WriteLine(response.Value.ToStringUtf8());

            return(new BindingResponseEnvelope()
            {
                Data = response
            });
        }