Esempio n. 1
0
        public IEnumerable <HistoryEvent> ActivitySchedulingFailedGraph(Identity activityIdentity, string cause)
        {
            var historyEvents = new List <HistoryEvent>();
            var eventIds      = EventIds.SchedulingFailedIds(ref _currentEventId);

            historyEvents.Add(new HistoryEvent()
            {
                EventType = EventType.ScheduleActivityTaskFailed,
                EventId   = eventIds.EventId(EventIds.Failed),
                ScheduleActivityTaskFailedEventAttributes = new ScheduleActivityTaskFailedEventAttributes()
                {
                    ActivityId   = activityIdentity.Id,
                    ActivityType = new ActivityType()
                    {
                        Name = activityIdentity.Name, Version = activityIdentity.Version
                    },
                    Cause = cause
                }
            });

            return(historyEvents);
        }