예제 #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
                    }
                }
            });
        }