Beispiel #1
0
        public virtual WorkflowAction Fired(TimerFiredEvent timerFiredEvent)
        {
            if (timerFiredEvent.TimerType == TimerType.Reschedule)
            {
                ITimer timer = RescheduleTimer;
                return(timer.Fired(timerFiredEvent));
            }
            if (timerFiredEvent.TimerType == TimerType.SignalTimer)
            {
                var waitForSignalEvent = WaitForSignalsEvent(timerFiredEvent.SignalTriggerEventId);
                if (!waitForSignalEvent.IsExpectingSignals)
                {
                    return(WorkflowAction.Empty);
                }

                var signalTimedoutDecision = waitForSignalEvent.RecordTimedout(timerFiredEvent);
                return(WorkflowAction.Custom(signalTimedoutDecision) + WorkflowAction.ContinueWorkflow(this));
            }
            throw new InvalidOperationException("Timer fired should be called only for Reschedule and SignalTimer.");
        }
Beispiel #2
0
        WorkflowAction IWorkflow.OnTimerFired(TimerFiredEvent timerFiredEvent)
        {
            ITimer timer = _allWorkflowItems.TimerFor(timerFiredEvent);

            return(timer.Fired(timerFiredEvent));
        }
Beispiel #3
0
        WorkflowAction ITimer.Fired(TimerFiredEvent timerFiredEvent)
        {
            ITimer timer = _rescheduleTimer;

            return(timer.Fired(timerFiredEvent));
        }