From 6705e11650c52a3deaca30432358d9fd28c8fa4e Mon Sep 17 00:00:00 2001 From: "i.navrotskyj" Date: Thu, 11 Apr 2024 16:51:27 +0300 Subject: [PATCH] WTEL-4442 --- go.mod | 4 ++-- queue/schema.go | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index d209894d..2ca833e9 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( buf.build/gen/go/webitel/cc/protocolbuffers/go v1.33.0-20240404135440-3efb61ebef03.1 buf.build/gen/go/webitel/fs/grpc/go v1.3.0-20240404140117-b025f673b11a.2 buf.build/gen/go/webitel/fs/protocolbuffers/go v1.33.0-20240404140117-b025f673b11a.1 - buf.build/gen/go/webitel/workflow/protocolbuffers/go v1.33.0-20240404140117-0cc0abc10b4f.1 + buf.build/gen/go/webitel/workflow/protocolbuffers/go v1.33.0-20240411132047-cd3c8f61d791.1 github.com/go-gorp/gorp v2.2.0+incompatible github.com/lib/pq v1.10.9 github.com/olebedev/emitter v0.0.0-20190110104742-e8d1457e6aee @@ -27,7 +27,7 @@ require ( buf.build/gen/go/webitel/chat/grpc/go v1.3.0-20240402124150-079f64c1d382.2 // indirect buf.build/gen/go/webitel/chat/protocolbuffers/go v1.33.0-20240402124150-079f64c1d382.1 // indirect buf.build/gen/go/webitel/engine/protocolbuffers/go v1.33.0-20240402125447-cb375844242f.1 // indirect - buf.build/gen/go/webitel/workflow/grpc/go v1.3.0-20240404140117-0cc0abc10b4f.2 // indirect + buf.build/gen/go/webitel/workflow/grpc/go v1.3.0-20240411120545-24ef43af6db3.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/golang/protobuf v1.5.3 // indirect diff --git a/queue/schema.go b/queue/schema.go index 9e61e118..2efa5a2a 100644 --- a/queue/schema.go +++ b/queue/schema.go @@ -191,9 +191,18 @@ func (qm *QueueManager) AfterDistributeSchema(att *Attempt) (*model.SchemaResult } } + var sc *flow.FlowScope + if att.channel == model.QueueChannelCall && att.memberChannel != nil { + sc = &flow.FlowScope{ + Channel: att.channel, + Id: att.memberChannel.Id(), + } + } + res, err := qm.app.FlowManager().Queue().ResultAttempt(&flow.ResultAttemptRequest{ DomainId: att.queue.DomainId(), SchemaId: *att.queue.AfterSchemaId(), + Scope: sc, Variables: model.UnionStringMaps( att.queue.Variables(), att.ExportSchemaVariables(),