xf 1 年之前
父节点
当前提交
e2e57ec85f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

+ 2 - 1
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -1649,7 +1649,8 @@ namespace Hotline.FlowEngine.Workflows
         public async Task<bool> CheckCurrentIsStartStepAsync(string workflowId, string userId, string orgId, CancellationToken cancellationToken)
         {
             var workflow = await GetWorkflowAsync(workflowId, withSteps: true, cancellationToken: cancellationToken);
-            var currentStep = FindCurrentStepWaitForHandle(workflow, userId, orgId);
+            var currentStep = GetStep(workflow.Steps, orgId, userId, d => d != EWorkflowStepStatus.Handled);
+            if (currentStep is null) return false;
             return workflow.Steps.Count == 1 && currentStep.StepType is EStepType.Start && currentStep.IsOrigin;
         }