public void Terminate() { try { DataTransferObject.ExecutionToken.IsUserCanceled = true; } catch (Exception e) { Dev2Logger.Log.Error(e); _instance.Abort(); } ExecutableServiceRepository.Instance.Remove(this); AssociatedServices.ForEach(s => s.Terminate()); Dispose(); }
public void Terminate() { try { // signal user termination ;) _executionToken.IsUserCanceled = true; // This was cancel which left the activities resident in the background and caused chaos! _instance.Terminate(new Exception("User Termination"), new TimeSpan(0, 0, 0, 60, 0)); } catch (Exception e) { Dev2Logger.Log.Error(e); _instance.Abort(); } ExecutableServiceRepository.Instance.Remove(this); AssociatedServices.ForEach(s => s.Terminate()); Dispose(); }