Ver código fonte

fixed: 临时解决外部系统特提时sessionContext的问题

xf 6 meses atrás
pai
commit
0383d34ef3

+ 15 - 0
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -1091,6 +1091,11 @@ namespace Hotline.FlowEngine.Workflows
         public async Task RecallToStartStepAsync(string workflowId, string opinion, ISessionContext current, bool isOrderFiled,DateTime? expiredTime,
             CancellationToken cancellationToken)
         {
+            //todo 临时方案
+            _sessionContext.UserId = current.UserId;
+            _sessionContext.UserName = current.UserName;
+            _sessionContext.OrgId = current.OrgId;
+            _sessionContext.OrgName = current.OrgName;
             //todo 1.当前待办节点删掉 2.当前待办trace更新(status, opinion) 3.复制startStep为待办 4.更新workflow(status, csStatus, handlers) 5.publish event
             var workflow = await GetWorkflowAsync(workflowId, withDefine: true, withSteps: true, withTraces: true, withCountersigns: true,
                 cancellationToken: cancellationToken);
@@ -1136,6 +1141,11 @@ namespace Hotline.FlowEngine.Workflows
         public async Task RecallToSendStepAsync(string workflowId, string opinion, ISessionContext current, bool isOrderFiled,DateTime? expiredTime,
             CancellationToken cancellationToken)
         {
+            //todo 临时方案
+            _sessionContext.UserId = current.UserId;
+            _sessionContext.UserName = current.UserName;
+            _sessionContext.OrgId = current.OrgId;
+            _sessionContext.OrgName = current.OrgName;
             var workflow = await GetWorkflowAsync(workflowId, withDefine: true, withSteps: true, withTraces: true, withCountersigns: true,
                 cancellationToken: cancellationToken);
             var sendStep = workflow.Steps.FirstOrDefault(d => d.BusinessType == EBusinessType.Send);
@@ -1181,6 +1191,11 @@ namespace Hotline.FlowEngine.Workflows
         public async Task RecallToCenterFirstToSendAsync(string workflowId, string opinion, ISessionContext current, bool isOrderFiled,
             DateTime? expiredTime,  CancellationToken cancellationToken)
         {
+            //todo 临时方案
+            _sessionContext.UserId = current.UserId;
+            _sessionContext.UserName = current.UserName;
+            _sessionContext.OrgId = current.OrgId;
+            _sessionContext.OrgName = current.OrgName;
             var workflow = await GetWorkflowAsync(workflowId, withDefine: true, withSteps: true, withTraces: true, withCountersigns: true,
                 cancellationToken: cancellationToken);
             var sendStep = workflow.Steps.FirstOrDefault(d => d.BusinessType == EBusinessType.Send);