167 references to Controller
System.Activities (88)
System\Activities\Hosting\WorkflowInstance.cs (7)
320
if (this.
Controller
.TrackingEnabled)
322
this.
Controller
.Track(new WorkflowInstanceUpdatedRecord(this.Id, this.WorkflowDefinition.DisplayName, originalDefinitionIdentity, this.executor.WorkflowIdentity));
525
return this.
Controller
.BeginFlushTrackingRecords(ActivityDefaults.TrackingTimeout, callback, state);
530
this.
Controller
.EndFlushTrackingRecords(result);
651
if (!this.
Controller
.IsPersistable)
676
if (this.
Controller
.IsPersistable)
724
if (this.
Controller
.TrackingEnabled)
System\Activities\WorkflowApplication.cs (81)
419
this.
Controller
.RequestPause();
643
localInstanceState = this.
Controller
.State;
750
this.
Controller
.Run();
761
ActivityInstanceState completionState = this.
Controller
.GetCompletionState(out dummyOutputs, out terminationException);
821
this.
Controller
.Abort(reason);
843
this.
Controller
.Abort(reason);
882
this.
Controller
.Abort(reason);
900
if (this.
Controller
.HasPendingTrackingRecords || this.Aborted != null)
918
if (this.
Controller
.HasPendingTrackingRecords)
922
IAsyncResult result = this.
Controller
.BeginFlushTrackingRecords(ActivityDefaults.TrackingTimeout, Fx.ThunkCallback(new AsyncCallback(OnAbortTrackingComplete)), reason);
926
this.
Controller
.EndFlushTrackingRecords(result);
959
this.
Controller
.EndFlushTrackingRecords(result);
1051
this.
Controller
.FlushTrackingRecords(timeoutHelper.RemainingTime());
1061
this.
Controller
.Terminate(reason);
1110
this.
Controller
.ScheduleCancel();
1146
this.
Controller
.FlushTrackingRecords(timeoutHelper.RemainingTime());
1235
instance.
Controller
.Run();
1272
if (instance.
Controller
.State == WorkflowInstanceState.Aborted)
1274
completionException = new WorkflowApplicationAbortedException(SR.DefaultAbortReason, instance.
Controller
.GetAbortReason());
1278
Fx.Assert(instance.
Controller
.State == WorkflowInstanceState.Complete, "We should only get here when we are completed.");
1280
instance.
Controller
.GetCompletionState(out outputs, out completionException);
1340
this.
Controller
.FlushTrackingRecords(timeoutHelper.RemainingTime());
2267
if (this.
Controller
.TrackingEnabled)
2271
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Deleted, this.DefinitionIdentity));
2275
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Unloaded, this.DefinitionIdentity));
2279
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Persisted, this.DefinitionIdentity));
2301
this.
Controller
.FlushTrackingRecords(timeoutHelper.RemainingTime());
2463
return this.
Controller
.GetBookmarks();
2485
return this.
Controller
.GetBookmarks();
2613
this.
Controller
.FlushTrackingRecords(timeoutHelper.RemainingTime());
2695
BookmarkResumptionResult result = this.
Controller
.ScheduleBookmarkResumption(bookmark, value);
2755
if (this.
Controller
.State != WorkflowInstanceState.Complete)
2757
this.
Controller
.Abort();
2826
if (this.
Controller
.State == WorkflowInstanceState.Complete)
2914
this.
Controller
.GetCompletionState(out completionException);
3004
if (this.
Controller
.State != WorkflowInstanceState.Complete)
3159
if (this.instance.
Controller
.State == WorkflowInstanceState.Aborted)
3161
this.completionException = new WorkflowApplicationAbortedException(SR.DefaultAbortReason, this.instance.
Controller
.GetAbortReason());
3165
Fx.Assert(this.instance.
Controller
.State == WorkflowInstanceState.Complete, "We should only get here when we are completed.");
3167
this.instance.
Controller
.GetCompletionState(out this.outputs, out this.completionException);
3390
if (this.instance.
Controller
.HasPendingTrackingRecords)
3392
IAsyncResult result = this.instance.
Controller
.BeginFlushTrackingRecords(this.timeoutHelper.RemainingTime(), PrepareAsyncCompletion(trackingCompleteCallback), this);
3417
thisPtr.instance.
Controller
.EndFlushTrackingRecords(result);
3476
Fx.Assert(this.instance.
Controller
.IsPersistable, "The runtime won't schedule this work item unless we've passed the guard");
3586
if (this.operation == PersistenceOperation.Unload && this.instance.
Controller
.State == WorkflowInstanceState.Complete)
3655
if (this.instance.
Controller
.HasPendingTrackingRecords)
3671
IAsyncResult result = this.instance.
Controller
.BeginFlushTrackingRecords(flushTrackingRecordsTimeout, PrepareAsyncCompletion(trackingCompleteCallback), this);
3681
thisPtr.instance.
Controller
.EndFlushTrackingRecords(result);
3991
if (this.instance.
Controller
.HasPendingTrackingRecords)
3993
IAsyncResult trackingResult = this.instance.
Controller
.BeginFlushTrackingRecords(this.timeoutHelper.RemainingTime(), trackingCompleteCallback, this);
3997
this.instance.
Controller
.EndFlushTrackingRecords(trackingResult);
4064
thisPtr.instance.
Controller
.EndFlushTrackingRecords(result);
4964
if (instance.
Controller
.TrackingEnabled)
4966
instance.
Controller
.Track(new WorkflowInstanceRecord(instance.Id, instance.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Idle, instance.DefinitionIdentity));
4969
result = instance.
Controller
.BeginFlushTrackingRecords(ActivityDefaults.TrackingTimeout, EventFrameCallback, instance.EventData);
4984
application.
Controller
.EndFlushTrackingRecords(lastResult);
4991
if (application.
Controller
.IsPersistable && application.persistenceManager != null)
5101
if (instance.
Controller
.HasPendingTrackingRecords)
5104
result = instance.
Controller
.BeginFlushTrackingRecords(ActivityDefaults.TrackingTimeout, EventFrameCallback, instance.EventData);
5119
instance.
Controller
.EndFlushTrackingRecords(lastResult);
5124
ActivityInstanceState completionState = instance.
Controller
.GetCompletionState(out outputs, out completionException);
5169
Fx.Assert(instance.
Controller
.IsPersistable, "Should not be in a No Persist Zone once the instance is complete.");
5229
if (instance.
Controller
.HasPendingTrackingRecords)
5235
result = instance.
Controller
.BeginFlushTrackingRecords(ActivityDefaults.TrackingTimeout, EventFrameCallback, instance.EventData);
5255
instance.
Controller
.EndFlushTrackingRecords(lastResult);
5293
instance.
Controller
.ScheduleCancel();
5464
return instance.
Controller
.State == WorkflowInstanceState.Idle || instance.
Controller
.State == WorkflowInstanceState.Complete;
5477
return (this.ActionId != instance.actionCount && instance.
Controller
.State == WorkflowInstanceState.Idle) || instance.
Controller
.State == WorkflowInstanceState.Complete;
5485
if (!instance.
Controller
.IsPersistable && instance.
Controller
.State != WorkflowInstanceState.Complete)
5487
instance.
Controller
.PauseWhenPersistable();
5842
data[WorkflowNamespace.Bookmarks] = new InstanceValue(instance.
Controller
.GetBookmarks(), InstanceValueOptions.WriteOnly | InstanceValueOptions.Optional);
5845
foreach (KeyValuePair<string, LocationInfo> mappedVariable in instance.
Controller
.GetMappedVariables())
5850
Fx.AssertAndThrow(instance.
Controller
.State != WorkflowInstanceState.Aborted, "Cannot generate data for an aborted instance.");
5851
if (instance.
Controller
.State != WorkflowInstanceState.Complete)
5853
data[WorkflowNamespace.Workflow] = new InstanceValue(instance.
Controller
.PrepareForSerialization());
5854
data[WorkflowNamespace.Status] = new InstanceValue(instance.
Controller
.State == WorkflowInstanceState.Idle ? "Idle" : "Executing", InstanceValueOptions.WriteOnly);
5858
data[WorkflowNamespace.Workflow] = new InstanceValue(instance.
Controller
.PrepareForSerialization(), InstanceValueOptions.Optional);
5862
ActivityInstanceState completionState = instance.
Controller
.GetCompletionState(out outputs, out completionException);
System.ServiceModel.Activities (79)
System\ServiceModel\Activities\Dispatcher\WorkflowServiceInstance.cs (79)
255
return this.
Controller
.State == WorkflowInstanceState.Idle;
263
return this.
Controller
.State == WorkflowInstanceState.Complete && !this.hasRaisedCompleted;
524
this.
Controller
.RequestPause();
591
this.
Controller
.RequestPause();
835
if (this.
Controller
.State == WorkflowInstanceState.Complete)
841
this.
Controller
.Run();
910
this.
Controller
.Abort(reason);
916
this.
Controller
.Abort();
940
this.
Controller
.Abort(reason);
946
this.
Controller
.Abort();
1034
this.
Controller
.Abort(abortInstanceState.Reason);
1040
this.
Controller
.Abort();
1078
if (isUpdateFailure || this.
Controller
.HasPendingTrackingRecords)
1086
this.
Controller
.EndFlushTrackingRecords(result);
1230
if (this.
Controller
.HasPendingTrackingRecords)
1232
IAsyncResult result = this.
Controller
.BeginFlushTrackingRecords(this.trackTimeout, TrackCompleteDoneCallback, this);
1236
this.
Controller
.EndFlushTrackingRecords(result);
1272
else if (this.
Controller
.State == WorkflowInstanceState.Aborted)
1274
Exception abortReason = this.
Controller
.GetAbortReason();
1283
if (this.
Controller
.TrackingEnabled)
1285
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Idle, this.DefinitionIdentity));
1286
IAsyncResult result = this.
Controller
.BeginFlushTrackingRecords(this.trackTimeout, TrackIdleDoneCallback, this);
1290
this.
Controller
.EndFlushTrackingRecords(result);
1343
thisPtr.
Controller
.EndFlushTrackingRecords(result);
1375
thisPtr.
Controller
.EndFlushTrackingRecords(result);
1404
if (this.
Controller
.HasPendingTrackingRecords)
1406
IAsyncResult result = this.
Controller
.BeginFlushTrackingRecords(this.trackTimeout, TrackUnhandledExceptionDoneCallback, data);
1410
this.
Controller
.EndFlushTrackingRecords(result);
1454
thisPtr.
Controller
.EndFlushTrackingRecords(result);
1496
this.completionState = this.
Controller
.GetCompletionState(out this.workflowOutputs, out this.terminationException);
1501
if (this.
Controller
.TrackingEnabled)
1505
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Deleted, this.DefinitionIdentity));
1510
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Unloaded, this.DefinitionIdentity));
1515
this.
Controller
.Track(new WorkflowInstanceRecord(this.Id, this.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Persisted, this.DefinitionIdentity));
1523
data[WorkflowNamespace.Bookmarks] = new InstanceValue(
Controller
.GetBookmarks(), InstanceValueOptions.WriteOnly | InstanceValueOptions.Optional);
1526
foreach (KeyValuePair<string, LocationInfo> mappedVariable in
Controller
.GetMappedVariables())
1531
Fx.AssertAndThrow(
Controller
.State != WorkflowInstanceState.Aborted, "Cannot generate data for an aborted service instance.");
1532
if (
Controller
.State != WorkflowInstanceState.Complete)
1534
data[WorkflowNamespace.Workflow] = new InstanceValue(
Controller
.PrepareForSerialization());
1541
data[WorkflowNamespace.Status] = new InstanceValue(
Controller
.State == WorkflowInstanceState.Idle ? "Idle" : "Executing", InstanceValueOptions.WriteOnly);
1545
data[WorkflowNamespace.Workflow] = new InstanceValue(
Controller
.PrepareForSerialization(), InstanceValueOptions.Optional);
1581
return new UnloadOrPersistAsyncResult(this, this.
Controller
.State == WorkflowInstanceState.Complete ? PersistenceOperation.Delete : PersistenceOperation.Save, false, isTry,
1592
return this.
Controller
.BeginFlushTrackingRecords(this.trackTimeout, callback, state);
1597
this.
Controller
.EndFlushTrackingRecords(result);
1649
result = this.
Controller
.ScheduleBookmarkResumption(bookmark, value);
1653
result = this.
Controller
.ScheduleBookmarkResumption(bookmark, value, bookmarkScope);
1730
if (this.
Controller
.State != WorkflowInstanceState.Complete)
1732
this.
Controller
.Abort();
1754
if (this.checkCanPersistWaiters != null && this.checkCanPersistWaiters.Count > 0 && this.
Controller
.IsPersistable)
1949
if (this.
Controller
.State != WorkflowInstanceState.Complete)
2168
this.persistenceContext.Bookmarks = this.
Controller
.GetBookmarks();
3233
if (this.instance.
Controller
.HasPendingTrackingRecords)
3237
IAsyncResult result = this.instance.
Controller
.BeginFlushTrackingRecords(this.instance.trackTimeout, PrepareAsyncCompletion(handleEndTrack), this);
3247
thisPtr.instance.
Controller
.EndFlushTrackingRecords(result);
3381
this.isCompletionTransactionRequired = this.isUnloaded && instance.
Controller
.State == WorkflowInstanceState.Complete &&
3417
Fx.Assert(this.instance.
Controller
.IsPersistable, "The runtime won't schedule this work item unless we've passed the guard");
3495
if (this.instance.
Controller
.IsPersistable)
3609
if (this.operation == PersistenceOperation.Unload && this.instance.
Controller
.State == WorkflowInstanceState.Complete)
3733
if (this.instance.
Controller
.HasPendingTrackingRecords)
3735
IAsyncResult result = this.instance.
Controller
.BeginFlushTrackingRecords(this.instance.trackTimeout, PrepareInnerAsyncCompletion(trackingCompleteCallback), this);
3748
thisPtr.instance.
Controller
.EndFlushTrackingRecords(result);
3926
if (this.isUnloaded && this.instance.
Controller
.State == WorkflowInstanceState.Complete && this.instance.creationContext != null)
4198
if (this.instance.state != State.Aborted && this.instance.
Controller
.HasPendingTrackingRecords)
4205
IAsyncResult result = this.instance.
Controller
.BeginFlushTrackingRecords(this.instance.trackTimeout, PrepareAsyncCompletion(handleEndTrack), this);
4224
thisPtr.instance.
Controller
.EndFlushTrackingRecords(result);
4290
this.Instance.
Controller
.Terminate(reason);
4401
if (!this.shouldTrackAbort && this.Instance.
Controller
.TrackingEnabled)
4403
this.Instance.
Controller
.Track(new WorkflowInstanceRecord(this.Instance.Id, this.Instance.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Unloaded, this.Instance.DefinitionIdentity));
4494
if (this.Instance.
Controller
.TrackingEnabled)
4496
this.Instance.
Controller
.Track(new WorkflowInstanceSuspendedRecord(this.Instance.Id, this.Instance.WorkflowDefinition.DisplayName, data.reason.Message, this.Instance.DefinitionIdentity));
4542
this.Instance.
Controller
.ScheduleCancel();
4700
if (thisPtr.parent.Instance.
Controller
.TrackingEnabled)
4702
thisPtr.parent.Instance.
Controller
.Track(new WorkflowInstanceSuspendedRecord(thisPtr.parent.Instance.Id, thisPtr.parent.Instance.WorkflowDefinition.DisplayName, thisPtr.parent.reason, thisPtr.parent.Instance.DefinitionIdentity));
4720
thisPtr.parent.Instance.
Controller
.RequestPause();
4761
if (this.Instance.
Controller
.TrackingEnabled)
4763
this.Instance.
Controller
.Track(new WorkflowInstanceRecord(this.Instance.Id, this.Instance.WorkflowDefinition.DisplayName, WorkflowInstanceStates.Unsuspended, this.Instance.DefinitionIdentity));
4912
if (this.instance.state == State.Active && this.instance.
Controller
.State == WorkflowInstanceState.Runnable)
5009
if (this.instance.
Controller
.IsPersistable)
5014
this.instance.
Controller
.PauseWhenPersistable();