xf 1 anno fa
parent
commit
ac178a9031

+ 6 - 1
src/Hotline.Application/FlowEngine/WorkflowApplication.cs

@@ -1138,7 +1138,12 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
                 var csStartStep = workflow.Steps.FirstOrDefault(d => d.Id == currentStep.CountersignStartStepId);
                 if (csStartStep is null)
                     throw new UserFriendlyException("未查询到会签开始节点");
-                return FlowAssignInfo.Create(csStartStep.FlowAssignType.Value, csStartStep.Handlers, isStartCountersign);
+
+                var prevStep = workflow.Steps.FirstOrDefault(d => d.Id == csStartStep.PrevStepId);
+                if (prevStep is null)
+                    throw new UserFriendlyException("未查询到目标节点的前一节点");
+
+                return FlowAssignInfo.Create(prevStep.FlowAssignType.Value, prevStep.Handlers, isStartCountersign);
             }
             else
             {