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