xf 1 rok pred
rodič
commit
e2e57ec85f

+ 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;
         }