public virtual void AddSteps(IEnumerable <string> messagingStepActivityIdCollection) { messagingStepActivityIdCollection.Each( messagingStepActivityId => { var step = new ProcessMessagingStep(Tracking.ActivityId.NewActivityId(), EventStream); step.BeginProcessMessagingStepActivity(); step.MessagingStepActivityID = messagingStepActivityId; step.ProcessActivityID = ActivityId; step.CommitProcessMessagingStepActivity(); step.EndProcessMessagingStepActivity(); }); }
public virtual void AddStep(MessagingStep messagingStep) { if (messagingStep == null) { throw new ArgumentNullException("messagingStep"); } var processMessagingStep = new ProcessMessagingStep(Tracking.ActivityId.NewActivityId(), _eventStream); processMessagingStep.BeginProcessMessagingStepActivity(); processMessagingStep.MessagingStepActivityID = messagingStep.ActivityId; // A MessagingStepReference denotes the initiating message of a messaging-only flow. Adding this step to a // process will only occur when we are tracking the outbound message of this messaging-only flow; it's // therefore too late to capture the initiating message status since the only message context at hand is the // one of the outgoing message. if (!(messagingStep is MessagingStepReference)) { // don't bother to duplicate status other than failure processMessagingStep.MessagingStepStatus = messagingStep.Message.GetProperty(ErrorReportProperties.ErrorType); } processMessagingStep.ProcessActivityID = ActivityId; processMessagingStep.CommitProcessMessagingStepActivity(); processMessagingStep.EndProcessMessagingStepActivity(); }