示例#1
0
        public HistoryEvent WorkflowCancellationFailedEvent(string cause)
        {
            var eventIds = EventIds.GenericEventIds(ref _currentEventId);

            return(new HistoryEvent
            {
                EventId = eventIds.EventId(EventIds.Generic),
                EventType = EventType.CancelWorkflowExecutionFailed,
                CancelWorkflowExecutionFailedEventAttributes = new CancelWorkflowExecutionFailedEventAttributes()
                {
                    Cause = cause,
                }
            });
        }
示例#2
0
        public HistoryEvent RecordMarkerFailedEvent(string markerName, string cause)
        {
            var eventIds = EventIds.GenericEventIds(ref _currentEventId);

            return(new HistoryEvent
            {
                EventId = eventIds.EventId(EventIds.Generic),
                EventType = EventType.RecordMarkerFailed,
                RecordMarkerFailedEventAttributes = new RecordMarkerFailedEventAttributes()
                {
                    MarkerName = markerName,
                    Cause = cause
                }
            });
        }
示例#3
0
        public HistoryEvent MarkerRecordedEvent(string markerName, string detail1)
        {
            var eventIds = EventIds.GenericEventIds(ref _currentEventId);

            return(new HistoryEvent
            {
                EventId = eventIds.EventId(EventIds.Generic),
                EventType = EventType.MarkerRecorded,
                MarkerRecordedEventAttributes = new MarkerRecordedEventAttributes()
                {
                    MarkerName = markerName,
                    Details = detail1
                }
            });
        }
示例#4
0
        public HistoryEvent WorkflowSignaledEvent(string signalName, string input)
        {
            var eventIds = EventIds.GenericEventIds(ref _currentEventId);

            return(new HistoryEvent
            {
                EventId = eventIds.EventId(EventIds.Generic),
                EventType = EventType.WorkflowExecutionSignaled,
                WorkflowExecutionSignaledEventAttributes = new WorkflowExecutionSignaledEventAttributes()
                {
                    SignalName = signalName,
                    Input = input,
                }
            });
        }
示例#5
0
        public HistoryEvent WorkflowSignalFailedEvent(string cause, string workflowId, string runId)
        {
            var eventIds = EventIds.GenericEventIds(ref _currentEventId);

            return(new HistoryEvent
            {
                EventId = eventIds.EventId(EventIds.Generic),
                EventType = EventType.SignalExternalWorkflowExecutionFailed,
                SignalExternalWorkflowExecutionFailedEventAttributes = new SignalExternalWorkflowExecutionFailedEventAttributes()
                {
                    Cause = cause,
                    WorkflowId = workflowId,
                    RunId = runId
                }
            });
        }
示例#6
0
        public HistoryEvent WorkflowCancellationRequestedEvent(string cause, string externalWorkflowRunid, string externalWorkflowId)
        {
            var eventIds = EventIds.GenericEventIds(ref _currentEventId);

            return(new HistoryEvent
            {
                EventId = eventIds.EventId(EventIds.Generic),
                EventType = EventType.WorkflowExecutionCancelRequested,
                WorkflowExecutionCancelRequestedEventAttributes = new WorkflowExecutionCancelRequestedEventAttributes()
                {
                    Cause = cause,
                    ExternalWorkflowExecution = new WorkflowExecution()
                    {
                        RunId = externalWorkflowRunid,
                        WorkflowId = externalWorkflowId
                    }
                }
            });
        }