Ejemplo n.º 1
0
		public BookmarkResumptionRecord (Guid instanceId, long recordNumber, Guid bookmarkScope, string bookmarkName, ActivityInfo owner)
			: base (instanceId, recordNumber)
		{
			BookmarkName = bookmarkName;
			BookmarkScope = bookmarkScope;
			Owner = owner;
		}
Ejemplo n.º 2
0
		public FaultPropagationRecord (Guid instanceId, long recordNumber, ActivityInfo faultSource, ActivityInfo faultHandler, bool isFaultSource, Exception fault)
			: base (instanceId, recordNumber)
		{
			FaultSource = faultSource;
			FaultHandler = faultHandler;
			IsFaultSource = isFaultSource;
			Fault = fault;
		}
 public ActivityScheduledRecord(Guid instanceId, long recordNumber, ActivityInfo activity, ActivityInfo child) : base(instanceId, recordNumber)
 {
     if (child == null)
     {
         throw FxTrace.Exception.ArgumentNull("child");
     }
     this.Activity = activity;
     this.Child = child;
 }
 /// <summary>
 /// Constructs the activity message
 /// </summary>
 /// <param name="activityInfo"></param>
 public ActivityMessage(ActivityInfo activityInfo)
 {
     if (activityInfo != null) {
         Name = activityInfo.Name;
         ActivityId = activityInfo.Id;
         ActivityInstanceId = activityInfo.InstanceId;
         TypeName = activityInfo.TypeName;
     }
 }
 public BookmarkResumptionRecord(Guid instanceId, long recordNumber, Guid bookmarkScope, string bookmarkName, ActivityInfo owner) : base(instanceId, recordNumber)
 {
     if (owner == null)
     {
         throw FxTrace.Exception.ArgumentNull("owner");
     }
     this.BookmarkScope = bookmarkScope;
     this.BookmarkName = bookmarkName;
     this.Owner = owner;
 }
 internal ActivityScheduledRecord(Guid instanceId, ActivityInstance instance, ActivityInfo child)
     : base(instanceId)
 {
     Fx.Assert(child != null, "Child activity cannot be null.");
     if (instance != null)
     {
         this.Activity = new ActivityInfo(instance);
     }
     this.Child = child;
 }
 public FaultPropagationRecord(Guid instanceId, long recordNumber, ActivityInfo faultSource, ActivityInfo faultHandler, bool isFaultSource, Exception fault) : base(instanceId, recordNumber)
 {
     if (faultSource == null)
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("faultSource");
     }
     this.FaultSource = faultSource;
     this.FaultHandler = faultHandler;
     this.IsFaultSource = isFaultSource;
     this.Fault = fault;
     base.Level = TraceLevel.Warning;
 }
 public ActivityStateRecord(Guid instanceId, long recordNumber, ActivityInfo activity, string state) : base(instanceId, recordNumber)
 {
     if (activity == null)
     {
         throw FxTrace.Exception.ArgumentNull("activity");
     }
     if (string.IsNullOrEmpty(state))
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("state");
     }
     this.Activity = activity;
     this.State = state;
 }
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception) : base(instanceId, recordNumber, activityDefinitionId, "UnhandledException")
 {
     if (string.IsNullOrEmpty(activityDefinitionId))
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("activityDefinitionId");
     }
     if (exception == null)
     {
         throw FxTrace.Exception.ArgumentNull("exception");
     }
     if (faultSource == null)
     {
         throw FxTrace.Exception.ArgumentNull("faultSource");
     }
     this.FaultSource = faultSource;
     this.UnhandledException = exception;
     base.Level = TraceLevel.Error;
 }
        internal ActivityStateRecord(Guid instanceId, ActivityInfo activity, ActivityInstanceState state)
            : base(instanceId)
        {
            this.Activity = activity;

            switch (state)
            {
                case ActivityInstanceState.Executing:
                    this.State = ActivityStates.Executing;
                    break;
                case ActivityInstanceState.Closed:
                    this.State = ActivityStates.Closed;
                    break;
                case ActivityInstanceState.Canceled:
                    this.State = ActivityStates.Canceled;
                    break;
                case ActivityInstanceState.Faulted:
                    this.State = ActivityStates.Faulted;
                    break;
                default:
                    throw Fx.AssertAndThrow("Invalid state value");
            }
        }
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception, WorkflowIdentity workflowDefinitionIdentity)
     : this(instanceId, recordNumber, activityDefinitionId, faultSource, exception)
 {
     this.WorkflowDefinitionIdentity = workflowDefinitionIdentity;
 }
 private bool ShouldTrackActivity(ActivityInfo activityInfo, string queryName)
 {
     if ((activityInfo != null) && (queryName == "*"))
     {
         if (this.isRootNativeActivity)
         {
             if (activityInfo.Instance.Activity.MemberOf.ParentId != 0)
             {
                 return false;
             }
         }
         else if ((activityInfo.Instance.Activity.MemberOf.ParentId != 0) && (activityInfo.Instance.Activity.MemberOf.Parent.ParentId != 0))
         {
             return false;
         }
     }
     return true;
 }
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
     : this(instanceId, 0, activityDefinitionId, faultSource, exception)
 {
 }
 private void TrackState(ActivityExecutor executor, ActivityInstanceState state, ref ActivityInfo activityInfo)
 {
     if (executor.ShouldTrackActivity(this.expressionActivity.DisplayName))
     {
         this.EnsureActivityInfo(ref activityInfo);
         executor.AddTrackingRecord(new ActivityStateRecord(executor.WorkflowInstanceId, activityInfo, state));
     }
 }
Ejemplo n.º 15
0
		public CancelRequestedRecord (Guid instanceId, long recordNumber, ActivityInfo activity, ActivityInfo child)
			: base (instanceId, recordNumber)
		{
			Activity = activity;
			Child = child;
		}
Ejemplo n.º 16
0
		public ActivityScheduledRecord (Guid instanceId, long recordNumber, ActivityInfo activity, ActivityInfo child)
			: base (instanceId, recordNumber)
		{
			Activity = activity;
			Child = child;
		}
 private void TrackFaulted(ActivityExecutor executor, ref ActivityInfo activityInfo)
 {
     if (executor.ShouldTrackActivityStateRecords)
     {
         this.TrackState(executor, ActivityInstanceState.Faulted, ref activityInfo);
     }
 }
 public CancelRequestedRecord(Guid instanceId, long recordNumber, ActivityInfo activity, ActivityInfo child) : base(instanceId, recordNumber)
 {
     if (child == null)
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("child");
     }
     this.Activity = activity;
     this.Child    = child;
 }
 private void EnsureActivityInfo(ref ActivityInfo activityInfo)
 {
     if (activityInfo == null)
     {
         activityInfo = new ActivityInfo(this.expressionActivity, this.instanceId);
     }
 }
Ejemplo n.º 20
0
 public BookmarkResumptionRecord(Guid instanceId, long recordNumber, Guid bookmarkScope, string bookmarkName, ActivityInfo owner)
     : base(instanceId, recordNumber)
 {
     this.BookmarkScope = bookmarkScope;
     this.BookmarkName  = bookmarkName;
     this.Owner         = owner ?? throw FxTrace.Exception.ArgumentNull(nameof(owner));
 }
Ejemplo n.º 21
0
 public BookmarkResumptionRecord(Guid instanceId, long recordNumber, Guid bookmarkScope, string bookmarkName, ActivityInfo owner)
     : base(instanceId, recordNumber)
 {
     BookmarkName  = bookmarkName;
     BookmarkScope = bookmarkScope;
     Owner         = owner;
 }
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception, WorkflowIdentity workflowDefinitionIdentity)
     : this(instanceId, recordNumber, activityDefinitionId, faultSource, exception)
 {
     this.WorkflowDefinitionIdentity = workflowDefinitionIdentity;
 }
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
     : base(instanceId, recordNumber, activityDefinitionId, WorkflowInstanceStates.UnhandledException)
 {
     if (string.IsNullOrEmpty(activityDefinitionId))
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("activityDefinitionId");
     }
     if (exception == null)
     {
         throw FxTrace.Exception.ArgumentNull("exception");
     }
     if (faultSource == null)
     {
         throw FxTrace.Exception.ArgumentNull("faultSource");
     }
     this.FaultSource        = faultSource;
     this.UnhandledException = exception;
     this.Level = TraceLevel.Error;
 }
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
     : this(instanceId, 0, activityDefinitionId, faultSource, exception)
 {
 }
Ejemplo n.º 25
0
        public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
            : base(instanceId, recordNumber, activityDefinitionId, WorkflowInstanceStates.UnhandledException)
        {
            if (string.IsNullOrEmpty(activityDefinitionId))
            {
                throw System.Activities.Internals.FxTrace.Exception.ArgumentNullOrEmpty(nameof(activityDefinitionId));
            }

            this.FaultSource        = faultSource ?? throw System.Activities.Internals.FxTrace.Exception.ArgumentNull(nameof(faultSource));
            this.UnhandledException = exception ?? throw System.Activities.Internals.FxTrace.Exception.ArgumentNull(nameof(exception));
            this.Level = EventLevel.Error;
        }
 private void TrackExecuting(ActivityExecutor executor, ref ActivityInfo activityInfo)
 {
     if (executor.ShouldTrackActivityStateRecordsExecutingState)
     {
         this.TrackState(executor, ActivityInstanceState.Executing, ref activityInfo);
     }
 }
		public WorkflowInstanceUnhandledExceptionRecord (Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
			: base (instanceId, recordNumber, activityDefinitionId, null)
		{
			FaultSource = faultSource;
			UnhandledException = exception;
		}
Ejemplo n.º 28
0
 public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
     : base(instanceId, recordNumber, activityDefinitionId, null)
 {
     FaultSource        = faultSource;
     UnhandledException = exception;
 }
 public FaultPropagationRecord(Guid instanceId, long recordNumber, ActivityInfo faultSource, ActivityInfo faultHandler, bool isFaultSource, Exception fault) : base(instanceId, recordNumber)
 {
     if (faultSource == null)
     {
         throw FxTrace.Exception.ArgumentNullOrEmpty("faultSource");
     }
     this.FaultSource   = faultSource;
     this.FaultHandler  = faultHandler;
     this.IsFaultSource = isFaultSource;
     this.Fault         = fault;
     base.Level         = TraceLevel.Warning;
 }
Ejemplo n.º 30
0
		public ActivityStateRecord (Guid instanceId, long recordNumber, ActivityInfo activity, string state)
			: base (instanceId, recordNumber)
		{
			Activity = activity;
			State = state;
		}