Exemple #1
0
 public void Resume()
 {
     using (new WorkflowTraceTransfer(this.InstanceId))
     {
         while (true)
         {
             WorkflowExecutor executor = _runtime.Load(this);
             if (executor.IsInstanceValid)
             {
                 try
                 {
                     executor.Resume();
                     break;
                 }
                 catch (InvalidOperationException)
                 {
                     if (executor.IsInstanceValid)
                     {
                         throw;
                     }
                 }
             }
         }
     }
 }
 internal void ReloadProfiles(WorkflowExecutor exec)
 {
     using (new ServiceEnvironment(exec.RootActivity))
     {
         using (exec.ExecutorLock.Enter())
         {
             if (!exec.IsInstanceValid)
             {
                 throw new InvalidOperationException(ExecutionStringManager.WorkflowNotValid);
             }
             bool flag = exec.Suspend(ExecutionStringManager.TrackingProfileUpdate);
             try
             {
                 this.GetListenerFromWRCache(exec.InstanceId).ReloadProfiles(exec, exec.InstanceId);
             }
             finally
             {
                 if (flag)
                 {
                     exec.Resume();
                 }
             }
         }
     }
 }