Example #1
0
        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);
                    }
                }
            }
        }
Example #2
0
 private static void OnConsoleClosedEvent(ConsoleClosedEventArgs args)
 {
     _workflowFacade.ConsoleClosed(args);
 }