Beispiel #1
0
        public override IEnumerable <WorkflowDecision> CancelDecisions()
        {
            var lastEvent        = LastEvent(true);
            var latestTimerEvent = WorkflowHistoryEvents.LastTimerEvent(RescheduleTimer, true);

            if (latestTimerEvent != null && lastEvent == latestTimerEvent)
            {
                return(RescheduleTimer.CancelDecisions());
            }

            return(new[] { new CancelRequestWorkflowDecision(ScheduleId, (lastEvent as ChildWorkflowEvent)?.RunId), });
        }
Beispiel #2
0
        public override IEnumerable <WorkflowDecision> CancelDecisions()
        {
            var lastEvent        = LastEvent(true);
            var latestTimerEvent = WorkflowHistoryEvents.LastTimerEvent(RescheduleTimer, true);

            if (latestTimerEvent != null && lastEvent == latestTimerEvent)
            {
                return(RescheduleTimer.CancelDecisions());
            }

            return(new [] { new CancelActivityDecision(ScheduleId) });
        }
Beispiel #3
0
        public override WorkflowItemEvent LastEvent(bool includeRescheduleTimerEvents = false)
        {
            var lastEvent = WorkflowHistoryEvents.LastChildWorkflowEvent(this);
            WorkflowItemEvent timerEvent = null;

            if (includeRescheduleTimerEvents)
            {
                timerEvent = WorkflowHistoryEvents.LastTimerEvent(RescheduleTimer, true);
            }

            if (lastEvent > timerEvent)
            {
                return(lastEvent);
            }
            return(timerEvent);
        }
Beispiel #4
0
        public override WorkflowItemEvent LastEvent(bool includeRescheduleTimerEvents = false)
        {
            var latestActivityEvent            = WorkflowHistoryEvents.LastActivityEvent(this);
            WorkflowItemEvent latestTimerEvent = null;

            if (includeRescheduleTimerEvents)
            {
                latestTimerEvent = WorkflowHistoryEvents.LastTimerEvent(RescheduleTimer, true);
            }

            if (latestActivityEvent > latestTimerEvent)
            {
                return(latestActivityEvent);
            }

            return(latestTimerEvent);
        }
Beispiel #5
0
 public override WorkflowItemEvent LastEvent(bool includeRescheduleTimerEvents = false)
 => WorkflowHistoryEvents.LastTimerEvent(this, includeRescheduleTimerEvents);