private WorkflowInstanceSuspendedRecord(WorkflowInstanceSuspendedRecord record) : base(record) { this.Reason = record.Reason; }
private void TrackWorkflowRecord(WorkflowInstanceRecord record) { if (record is WorkflowInstanceUnhandledExceptionRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceUnhandledExceptionRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceUnhandledExceptionRecord record2 = record as WorkflowInstanceUnhandledExceptionRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceUnhandledExceptionRecord(this.diagnosticTrace, record2.InstanceId, record2.RecordNumber, record2.EventTime.ToFileTime(), record2.ActivityDefinitionId, record2.FaultSource.Name, record2.FaultSource.Id, record2.FaultSource.InstanceId, record2.FaultSource.TypeName, (record2.UnhandledException == null) ? string.Empty : record2.UnhandledException.ToString(), record2.HasAnnotations ? PrepareAnnotations(record2.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceUnhandledExceptionRecord(this.diagnosticTrace, record2.InstanceId, record2.RecordNumber, record2.EventTime.ToFileTime(), record2.ActivityDefinitionId, record2.FaultSource.Name, record2.FaultSource.Id, record2.FaultSource.InstanceId, record2.FaultSource.TypeName, (record2.UnhandledException == null) ? string.Empty : record2.UnhandledException.ToString(), "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record2.RecordNumber); } else { this.TraceTrackingRecordDropped(record2.RecordNumber); } } } } else if (record is WorkflowInstanceAbortedRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceAbortedRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceAbortedRecord record3 = record as WorkflowInstanceAbortedRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceAbortedRecord(this.diagnosticTrace, record3.InstanceId, record3.RecordNumber, record3.EventTime.ToFileTime(), record3.ActivityDefinitionId, record3.Reason, record3.HasAnnotations ? PrepareAnnotations(record3.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceAbortedRecord(this.diagnosticTrace, record3.InstanceId, record3.RecordNumber, record3.EventTime.ToFileTime(), record3.ActivityDefinitionId, record3.Reason, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record3.RecordNumber); } else { this.TraceTrackingRecordDropped(record3.RecordNumber); } } } } else if (record is WorkflowInstanceSuspendedRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceSuspendedRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceSuspendedRecord record4 = record as WorkflowInstanceSuspendedRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceSuspendedRecord(this.diagnosticTrace, record4.InstanceId, record4.RecordNumber, record4.EventTime.ToFileTime(), record4.ActivityDefinitionId, record4.Reason, record4.HasAnnotations ? PrepareAnnotations(record4.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceSuspendedRecord(this.diagnosticTrace, record4.InstanceId, record4.RecordNumber, record4.EventTime.ToFileTime(), record4.ActivityDefinitionId, record4.Reason, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record4.RecordNumber); } else { this.TraceTrackingRecordDropped(record4.RecordNumber); } } } } else if (record is WorkflowInstanceTerminatedRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceTerminatedRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceTerminatedRecord record5 = record as WorkflowInstanceTerminatedRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceTerminatedRecord(this.diagnosticTrace, record5.InstanceId, record5.RecordNumber, record5.EventTime.ToFileTime(), record5.ActivityDefinitionId, record5.Reason, record5.HasAnnotations ? PrepareAnnotations(record5.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceTerminatedRecord(this.diagnosticTrace, record5.InstanceId, record5.RecordNumber, record5.EventTime.ToFileTime(), record5.ActivityDefinitionId, record5.Reason, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record5.RecordNumber); } else { this.TraceTrackingRecordDropped(record5.RecordNumber); } } } } else if (EtwTrackingParticipantTrackRecords.WorkflowInstanceRecordIsEnabled(this.diagnosticTrace) && !EtwTrackingParticipantTrackRecords.WorkflowInstanceRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.ActivityDefinitionId, record.State, record.HasAnnotations ? PrepareAnnotations(record.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.ActivityDefinitionId, record.State, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record.RecordNumber); } else { this.TraceTrackingRecordDropped(record.RecordNumber); } } }
protected override void OnWorkflowInstanceSuspended(WorkflowInstanceSuspendedRecord record, TimeSpan timeout) { Log.InfoWrite("Tracking::WorkflowInstanceSuspended - Id:{0}, InstanceId:{1}, EventTime:{2}, Record#:{3}, Level:{4}, State:{5}, Reason:{6}", record.ActivityDefinitionId, record.InstanceId, record.EventTime, record.RecordNumber, record.Level, record.State, record.Reason); }
WorkflowInstanceSuspendedRecord(WorkflowInstanceSuspendedRecord record) : base(record) { this.Reason = record.Reason; }
protected virtual void OnWorkflowInstanceSuspended(WorkflowInstanceSuspendedRecord record, TimeSpan timeout) { }
/// <summary> /// When implemented in a derived class, used to synchronously process the tracking record. /// </summary> /// <param name="record"> /// The generated tracking record. /// </param> /// <param name="timeout"> /// The time period after which the provider aborts the attempt. /// </param> protected virtual void Track(WorkflowInstanceSuspendedRecord record, TimeSpan timeout) { // Do nothing }