internal void LoadWorkflowInstancesFromStore()
        {
            if (_fullyLoaded)
            {
                return;
            }
            lock (_syncObject)
            {
                if (_fullyLoaded)
                {
                    return;
                }

                foreach (PSWorkflowId storedInstanceId in PSWorkflowFileInstanceStore.GetAllWorkflowInstanceIds())
                {
                    try
                    {
                        GetJobManager().LoadJobWithIdentifier(storedInstanceId);
                    }
                    catch (Exception e)
                    {
                        // Auto loading failing so logging into the message trace

                        _tracer.WriteMessage("Getting an exception while loading the previously persisted workflows...");
                        _tracer.TraceException(e);
                        // Intentionally continuing on with exception
                    }
                }

                _fullyLoaded = true;
            }

            GetJobManager().CleanUpWorkflowJobTable();
        }
Beispiel #2
0
 internal void LoadWorkflowInstancesFromStore()
 {
     if (!this._fullyLoaded)
     {
         lock (this._syncObject)
         {
             if (!this._fullyLoaded)
             {
                 foreach (PSWorkflowId allWorkflowInstanceId in PSWorkflowFileInstanceStore.GetAllWorkflowInstanceIds())
                 {
                     try
                     {
                         this.GetJobManager().LoadJobWithIdentifier(allWorkflowInstanceId);
                     }
                     catch (Exception exception1)
                     {
                         Exception exception = exception1;
                         this._tracer.WriteMessage("Getting an exception while loading the previously persisted workflows...");
                         this._tracer.TraceException(exception);
                     }
                 }
                 this._fullyLoaded = true;
             }
             else
             {
                 return;
             }
         }
         this.GetJobManager().CleanUpWorkflowJobTable();
         return;
     }
     else
     {
         return;
     }
 }
Beispiel #3
0
 internal FileInstanceStore(PSWorkflowFileInstanceStore stores)
 {
     _stores = stores;
 }