示例#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), });
        }
示例#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) });
        }
示例#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);
        }
示例#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);
        }
示例#5
0
 public override WorkflowItemEvent LastEvent(bool includeRescheduleTimerEvents = false)
 => WorkflowHistoryEvents.LastTimerEvent(this, includeRescheduleTimerEvents);