public TryLoadRunnableWorkflowAsyncResult(InstancePersistenceContext context, InstancePersistenceCommand command, SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, Transaction currentTransaction, TimeSpan timeout, AsyncCallback callback, object state) : base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     if (base.Store.WorkflowHostType == Guid.Empty)
     {
         throw FxTrace.Exception.AsError(new InstancePersistenceCommandException(command.Name, System.Activities.DurableInstancing.SR.TryLoadRequiresWorkflowType, null));
     }
 }
 public SaveWorkflowAsyncResult(InstancePersistenceContext context, InstancePersistenceCommand command, SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, Transaction currentTransaction, TimeSpan timeout, AsyncCallback callback, object state) : base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     if (((SaveWorkflowCommand) command).InstanceKeyMetadataChanges.Count > 0)
     {
         throw FxTrace.Exception.AsError(new InstancePersistenceCommandException(System.Activities.DurableInstancing.SR.InstanceKeyMetadataChangesNotSupported));
     }
 }
 protected SqlWorkflowInstanceStoreAsyncResult(System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Runtime.DurableInstancing.InstancePersistenceCommand command, SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, Transaction currentTransaction, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state)
 {
     this.DependentTransaction = (currentTransaction != null) ? currentTransaction.DependentClone(DependentCloneOption.BlockCommitUntilComplete) : null;
     this.InstancePersistenceContext = context;
     this.InstancePersistenceCommand = command;
     this.Store = store;
     this.StoreLock = storeLock;
     this.TimeoutHelper = new System.Runtime.TimeoutHelper(timeout);
     base.OnCompleting = (Action<AsyncResult, Exception>) Delegate.Combine(base.OnCompleting, finallyCallback);
 }
コード例 #4
0
 public PersistenceTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, InstancePersistenceCommand instancePersistenceCommand, TimeSpan taskInterval, bool automaticallyResetTimer)
 {
     this.automaticallyResetTimer    = automaticallyResetTimer;
     this.commandCompletedCallback   = Fx.ThunkCallback(new AsyncCallback(this.CommandCompletedCallback));
     this.instancePersistenceCommand = instancePersistenceCommand;
     this.Store                = store;
     this.StoreLock            = storeLock;
     this.SurrogateLockOwnerId = this.StoreLock.SurrogateLockOwnerId;
     this.taskInterval         = taskInterval;
     this.thisLock             = new object();
 }
 public PersistenceTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, InstancePersistenceCommand instancePersistenceCommand, TimeSpan taskInterval, bool automaticallyResetTimer)
 {
     this.automaticallyResetTimer = automaticallyResetTimer;
     this.commandCompletedCallback = Fx.ThunkCallback(new AsyncCallback(this.CommandCompletedCallback));
     this.instancePersistenceCommand = instancePersistenceCommand;
     this.Store = store;
     this.StoreLock = storeLock;
     this.SurrogateLockOwnerId = this.StoreLock.SurrogateLockOwnerId;
     this.taskInterval = taskInterval;
     this.thisLock = new object();
 }
コード例 #6
0
 protected SqlWorkflowInstanceStoreAsyncResult
 (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
 )
     : this(context, command, store, storeLock, currentTransaction, timeout, store.MaxConnectionRetries, callback, state)
 {
 }
 public DetectActivatableWorkflowsAsyncResult
     (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
     ) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
 }
コード例 #8
0
 public ExtendLockAsyncResult
     (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout, 
     AsyncCallback callback, 
     object state
     ) :
     base(context, command, store, storeLock, currentTransaction, timeout, int.MaxValue, callback, state)
 {
 }
コード例 #9
0
 public LoadWorkflowByKeyAsyncResult
 (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
 ) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
 }
 protected SqlWorkflowInstanceStoreAsyncResult
     (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
     ) 
     : this(context, command, store, storeLock, currentTransaction, timeout, store.MaxConnectionRetries, callback, state)
 {
 }
コード例 #11
0
 public TestDatabaseVersionAndRunAsyncResult(
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     Version targetVersion,
     AsyncCallback callback,
     object state) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     this.currentTransaction = currentTransaction;
     this.targetVersion = targetVersion;
 }
 public TestDatabaseVersionAndRunAsyncResult(
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     Version targetVersion,
     AsyncCallback callback,
     object state) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     this.currentTransaction = currentTransaction;
     this.targetVersion      = targetVersion;
 }
コード例 #13
0
 public LoadWorkflowAsyncResult
     (
     InstancePersistenceContext context, 
     InstancePersistenceCommand command, 
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout, 
     AsyncCallback callback, 
     object state
     ) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     this.associatedInstanceKeys = new Dictionary<Guid, IDictionary<XName, InstanceValue>>();
     this.completedInstanceKeys = new Dictionary<Guid, IDictionary<XName, InstanceValue>>();
     this.objectSerializer = ObjectSerializerFactory.GetDefaultObjectSerializer();
 }
コード例 #14
0
 public SqlWorkflowInstanceStore(string connectionString)
 {
     this.InstanceEncodingOption           = System.Activities.DurableInstancing.InstanceEncodingOption.GZip;
     this.InstanceCompletionAction         = System.Activities.DurableInstancing.InstanceCompletionAction.DeleteAll;
     this.InstanceLockedExceptionAction    = System.Activities.DurableInstancing.InstanceLockedExceptionAction.NoRetry;
     this.HostLockRenewalPeriod            = defaultLockRenewalPeriod;
     this.RunnableInstancesDetectionPeriod = defaultInstancePersistenceEventDetectionPeriod;
     this.EnqueueRunCommands            = false;
     this.LoadRetryHandler              = new System.Activities.DurableInstancing.LoadRetryHandler();
     this.ConnectionString              = connectionString;
     this.definedPromotions             = new Dictionary <string, Tuple <List <XName>, List <XName> > >();
     this.bufferedHostLockRenewalPeriod = TimeSpan.Zero;
     this.unlockInstanceCallback        = Fx.ThunkCallback(new AsyncCallback(this.UnlockInstanceCallback));
     this.scheduledUnlockInstance       = new Action <object>(this.ScheduledUnlockInstance);
     this.storeLock            = new SqlWorkflowInstanceStoreLock(this);
     this.MaxConnectionRetries = 4;
 }
 public SqlWorkflowInstanceStore(string connectionString)
 {
     this.InstanceEncodingOption = System.Activities.DurableInstancing.InstanceEncodingOption.GZip;
     this.InstanceCompletionAction = System.Activities.DurableInstancing.InstanceCompletionAction.DeleteAll;
     this.InstanceLockedExceptionAction = System.Activities.DurableInstancing.InstanceLockedExceptionAction.NoRetry;
     this.HostLockRenewalPeriod = defaultLockRenewalPeriod;
     this.RunnableInstancesDetectionPeriod = defaultInstancePersistenceEventDetectionPeriod;
     this.EnqueueRunCommands = false;
     this.LoadRetryHandler = new System.Activities.DurableInstancing.LoadRetryHandler();
     this.ConnectionString = connectionString;
     this.definedPromotions = new Dictionary<string, Tuple<List<XName>, List<XName>>>();
     this.bufferedHostLockRenewalPeriod = TimeSpan.Zero;
     this.unlockInstanceCallback = Fx.ThunkCallback(new AsyncCallback(this.UnlockInstanceCallback));
     this.scheduledUnlockInstance = new Action<object>(this.ScheduledUnlockInstance);
     this.storeLock = new SqlWorkflowInstanceStoreLock(this);
     this.MaxConnectionRetries = 4;
 }
コード例 #16
0
 public LoadWorkflowAsyncResult
 (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
 ) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     this.associatedInstanceKeys = new Dictionary <Guid, IDictionary <XName, InstanceValue> >();
     this.completedInstanceKeys  = new Dictionary <Guid, IDictionary <XName, InstanceValue> >();
     this.objectSerializer       = ObjectSerializerFactory.GetDefaultObjectSerializer();
 }
コード例 #17
0
 public SqlWorkflowInstanceStore(string connectionString)
 {
     this.InstanceEncodingOption           = SqlWorkflowInstanceStoreConstants.DefaultInstanceEncodingOption;
     this.InstanceCompletionAction         = SqlWorkflowInstanceStoreConstants.DefaultInstanceCompletionAction;
     this.InstanceLockedExceptionAction    = SqlWorkflowInstanceStoreConstants.DefaultInstanceLockedExceptionAction;
     this.HostLockRenewalPeriod            = SqlWorkflowInstanceStore.defaultLockRenewalPeriod;
     this.RunnableInstancesDetectionPeriod = SqlWorkflowInstanceStore.defaultInstancePersistenceEventDetectionPeriod;
     this.EnqueueRunCommands            = false;
     this.LoadRetryHandler              = new LoadRetryHandler();
     this.ConnectionString              = connectionString;
     this.definedPromotions             = new Dictionary <string, Tuple <List <XName>, List <XName> > >();
     this.bufferedHostLockRenewalPeriod = TimeSpan.Zero;
     this.unlockInstanceCallback        = Fx.ThunkCallback(UnlockInstanceCallback);
     this.scheduledUnlockInstance       = new Action <object>(ScheduledUnlockInstance);
     this.storeLock            = new SqlWorkflowInstanceStoreLock(this);
     this.MaxConnectionRetries = DefaultMaximumRetries;
 }
コード例 #18
0
 public SqlWorkflowInstanceStore(string connectionString)
 {
     this.InstanceEncodingOption = SqlWorkflowInstanceStoreConstants.DefaultInstanceEncodingOption;
     this.InstanceCompletionAction = SqlWorkflowInstanceStoreConstants.DefaultInstanceCompletionAction;
     this.InstanceLockedExceptionAction = SqlWorkflowInstanceStoreConstants.DefaultInstanceLockedExceptionAction;
     this.HostLockRenewalPeriod = SqlWorkflowInstanceStore.defaultLockRenewalPeriod;
     this.RunnableInstancesDetectionPeriod = SqlWorkflowInstanceStore.defaultInstancePersistenceEventDetectionPeriod;
     this.EnqueueRunCommands = false;
     this.LoadRetryHandler = new LoadRetryHandler();
     this.ConnectionString = connectionString;
     this.definedPromotions = new Dictionary<string, Tuple<List<XName>, List<XName>>>();
     this.bufferedHostLockRenewalPeriod = TimeSpan.Zero;
     this.unlockInstanceCallback = Fx.ThunkCallback(UnlockInstanceCallback);
     this.scheduledUnlockInstance = new Action<object>(ScheduledUnlockInstance);
     this.storeLock = new SqlWorkflowInstanceStoreLock(this);
     this.MaxConnectionRetries = DefaultMaximumRetries;
 }
コード例 #19
0
 public SaveWorkflowAsyncResult
 (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
 ) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     if (((SaveWorkflowCommand)command).InstanceKeyMetadataChanges.Count > 0)
     {
         throw FxTrace.Exception.AsError(new InstancePersistenceCommandException(SR.InstanceKeyMetadataChangesNotSupported));
     }
 }
 public TryLoadRunnableWorkflowAsyncResult
 (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     AsyncCallback callback,
     object state
 ) :
     base(context, command, store, storeLock, currentTransaction, timeout, callback, state)
 {
     if (base.Store.WorkflowHostType == Guid.Empty)
     {
         throw FxTrace.Exception.AsError(new InstancePersistenceCommandException(command.Name, SR.TryLoadRequiresWorkflowType, null));
     }
 }
 // ExtendLockAsyncResult and RecoverInstanceLocksAsyncResult directly call this ctor
 protected SqlWorkflowInstanceStoreAsyncResult
     (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     int maximumRetries,
     AsyncCallback callback,
     object state
     ) :
     base(callback, state)
 {
     this.DependentTransaction = (currentTransaction != null) ? currentTransaction.DependentClone(DependentCloneOption.BlockCommitUntilComplete) : null;
     this.InstancePersistenceContext = context;
     this.InstancePersistenceCommand = command;
     this.Store = store;
     this.StoreLock = storeLock;
     this.TimeoutHelper = new TimeoutHelper(timeout);
     this.OnCompleting += SqlWorkflowInstanceStoreAsyncResult.finallyCallback;
     this.maximumRetries = maximumRetries;
 }
コード例 #22
0
 // ExtendLockAsyncResult and RecoverInstanceLocksAsyncResult directly call this ctor
 protected SqlWorkflowInstanceStoreAsyncResult
 (
     InstancePersistenceContext context,
     InstancePersistenceCommand command,
     SqlWorkflowInstanceStore store,
     SqlWorkflowInstanceStoreLock storeLock,
     Transaction currentTransaction,
     TimeSpan timeout,
     int maximumRetries,
     AsyncCallback callback,
     object state
 ) :
     base(callback, state)
 {
     this.DependentTransaction       = (currentTransaction != null) ? currentTransaction.DependentClone(DependentCloneOption.BlockCommitUntilComplete) : null;
     this.InstancePersistenceContext = context;
     this.InstancePersistenceCommand = command;
     this.Store          = store;
     this.StoreLock      = storeLock;
     this.TimeoutHelper  = new TimeoutHelper(timeout);
     this.OnCompleting  += SqlWorkflowInstanceStoreAsyncResult.finallyCallback;
     this.maximumRetries = maximumRetries;
 }
 public DetectRunnableInstancesTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval) : base(store, storeLock, new DetectRunnableInstancesCommand(), taskInterval, false)
 {
 }
コード例 #24
0
 public DetectActivatableWorkflowsTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval)
     : base(store, storeLock, new DetectActivatableWorkflowsCommand(), taskInterval, SqlWorkflowInstanceStoreConstants.DefaultTaskTimeout, false)
 {
 }
コード例 #25
0
ファイル: LockRenewalTask.cs プロジェクト: dox0/DotNet471RS3
 public LockRenewalTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval, TimeSpan taskTimeout)
     : base(store, storeLock, new ExtendLockCommand(), taskInterval, taskTimeout, true)
 {
 }
コード例 #26
0
 public DetectRunnableInstancesTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval)
     : base(store, storeLock, new DetectRunnableInstancesCommand(), taskInterval, SqlWorkflowInstanceStoreConstants.DefaultTaskTimeout, false)
 {
 }
 protected SqlWorkflowInstanceStoreAsyncResult(System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Runtime.DurableInstancing.InstancePersistenceCommand command, SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, Transaction currentTransaction, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state)
 {
     this.DependentTransaction       = (currentTransaction != null) ? currentTransaction.DependentClone(DependentCloneOption.BlockCommitUntilComplete) : null;
     this.InstancePersistenceContext = context;
     this.InstancePersistenceCommand = command;
     this.Store         = store;
     this.StoreLock     = storeLock;
     this.TimeoutHelper = new System.Runtime.TimeoutHelper(timeout);
     base.OnCompleting  = (Action <AsyncResult, Exception>)Delegate.Combine(base.OnCompleting, finallyCallback);
 }
コード例 #28
0
ファイル: LockRecoveryTask.cs プロジェクト: dox0/DotNet471RS3
 public LockRecoveryTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval, TimeSpan taskTimeout)
     : base(store, storeLock, new RecoverInstanceLocksCommand(), taskInterval, taskTimeout, true)
 {
 }
 public DetectActivatableWorkflowsTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval) : base(store, storeLock, new DetectActivatableWorkflowsCommand(), taskInterval, false)
 {
 }
コード例 #30
0
 public LockRecoveryTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval, TimeSpan taskTimeout)
     : base(store, storeLock, new RecoverInstanceLocksCommand(), taskInterval, taskTimeout, true)
 {
 }