Exemple #1
0
        private void StartPendingProcesses()
        {
            if (this.runningProcesses.Count == 0 && this.subProcesses.Count > 0)
            {
                SagaProcess process = null;
                do
                {
                    process = this.subProcesses.Dequeue();

                    this.runningProcesses.Add(process);
                } while (!process.IsSynchronous && this.subProcesses.Count > 0);
            }
        }
Exemple #2
0
 public void EnqueueSubProcess(SagaProcess process)
 {
     if (this.runningProcesses.Count == 0)
     {
         this.runningProcesses.Add(process);
     }
     else if (this.runningProcesses[0].IsSynchronous)
     {
         this.subProcesses.Enqueue(process);
     }
     else
     {
         this.runningProcesses.Add(process);
     }
 }