public void ConsoleClosed(ConsoleClosedEventArgs args) { DoInitialize(0); using (_resourceLocker.Locker) { List<Guid> workflowsToCancel = (from kp in _resourceLocker.Resources.FlowControllerServicesContainers where ConsoleIdEquals(kp.Value, args.ConsoleId) select kp.Key).ToList(); foreach (Guid instanceId in workflowsToCancel) { try { AbortWorkflow(instanceId); } catch(Exception ex) { Log.LogError(LogTitle, "Error aborting workflow " + instanceId); Log.LogError(LogTitle, ex); } } } }
private static void OnConsoleClosedEvent(ConsoleClosedEventArgs args) { _workflowFacade.ConsoleClosed(args); }