public WorkflowAction Resume(WorkflowSignaledEvent signal) { Ensure.NotNull(signal, nameof(signal)); var waitEvent = WaitForSignalsEvent(signal.SignalName); if (waitEvent == null) { throw new SignalResumeException($"Workflow item {Identity} is not waiting for signal {signal.SignalName}"); } WorkflowDecision decision = null; if (waitEvent.HasTimedout(signal)) { decision = waitEvent.RecordTimedout(signal); } else { decision = waitEvent.RecordSignal(signal); } var recordedAction = WorkflowAction.Custom(decision); if (waitEvent.IsExpectingSignals) { return(recordedAction); } return(waitEvent.NextAction(this) + recordedAction); }
private WorkflowAction(WorkflowDecision workflowDecision) : this(new [] { workflowDecision }) { }