public void Start() { EnsureNotStopping(); Jhu.Graywulf.Logging.Logger.Instance.Writers.Add(new Jhu.Graywulf.Logging.StreamLogWriter(Console.Out)); graywulfLogger = new Jhu.Graywulf.Activities.GraywulfTrackingParticipant(); }
/// <summary> /// Drain-stops the workflow host by waiting for the /// workflows complete /// </summary> public void Stop(TimeSpan timeout) { lock (syncRoot) { if (stopRequested) { throw new InvalidOperationException(); } stopRequested = true; } // Wait until all workflows complete while (true) { lock (syncRoot) { if (workflows.Count == 0) { break; } } Thread.Sleep(100); // TODO: use constant } graywulfLogger = null; workflowInstanceStore = null; stopRequested = false; }
private void InitializeMembers() { this.syncRoot = new object(); this.stopRequested = false; this.workflows = new Dictionary <Guid, WorkflowDetails>(); this.graywulfLogger = null; }
private void InitializeMembers() { this.syncRoot = new object(); this.stopRequested = false; this.contextGuid = Guid.Empty; this.workflows = new Dictionary <Guid, WorkflowDetails>(); this.graywulfLogger = null; this.workflowInstanceStore = null; }
/// <summary> /// Starts a new Workflowhost /// </summary> public void Start(Scheduler scheduler, bool interactive) { EnsureNotStopping(); // Store a reference to the proxy to the scheduler this.scheduler = scheduler; // Initialize logging participant // Have to add console logger because it's a new AppDomain if (interactive) { Jhu.Graywulf.Logging.Logger.Instance.Writers.Add(new Jhu.Graywulf.Logging.StreamLogWriter(Console.Out)); } graywulfLogger = new Jhu.Graywulf.Activities.GraywulfTrackingParticipant(); // Initialize persistence participant workflowInstanceStore = new SqlWorkflowInstanceStore(AppSettings.PersistenceConnectionString); }
private void InitializeMembers() { this.syncRoot = new object(); this.stopRequested = false; this.contextGuid = Guid.Empty; this.workflows = new Dictionary<Guid, WorkflowDetails>(); this.graywulfLogger = null; this.workflowInstanceStore = null; }
/// <summary> /// Drain-stops the workflow host by waiting for the /// workflows complete /// </summary> public void Stop(TimeSpan timeout) { lock (syncRoot) { if (stopRequested) { throw new InvalidOperationException(); } stopRequested = true; } // Wait until all workflows complete while (true) { lock (syncRoot) { if (workflows.Count == 0) { break; } } Thread.Sleep(100); // TODO: use constant } graywulfLogger = null; workflowInstanceStore = null; stopRequested = false; }
/// <summary> /// Starts a new Workflowhost /// </summary> public void Start(Scheduler scheduler, bool interactive) { EnsureNotStopping(); // Store a reference to the proxy to the scheduler this.scheduler = scheduler; // Initialize logging participant // Have to add console logger because it's a new AppDomain if (interactive) { Jhu.Graywulf.Logging.Logger.Instance.Writers.Add(new Jhu.Graywulf.Logging.StreamLogWriter(Console.Out)); } graywulfLogger = new Jhu.Graywulf.Activities.GraywulfTrackingParticipant(); // Initialize persistence participant workflowInstanceStore = new SqlWorkflowInstanceStore(AppSettings.PersistenceConnectionString); }