Example #1
0
 private void Execute(Diagram diagram)
 {
     try
     {
         DelegateNotifyUI notifyUserInteraceMethod = notifyUserInterace;
         log.Info("Inicio Ejecutar");
         Node node = diagram.Execute(this.stageSimulation.GetVariables(), notifyUserInteraceMethod); this.Self.Tell(node);
         //log.Info("Fin Ejectuar");
     }
     catch (Exception exception)
     {
         log.Error("Error Ejecutar:" + exception.Message);
         this.//logger.Error(exception, exception.Message);
         stageSimulation.StopExecution(true);
         if (stageSimulation.DebugginMode())
         {
             stageSimulation.StopDebugExecution(true);
         }
         this.MainSimulationActor.Tell(this.stageSimulation);
         this.Self.Tell(PoisonPill.Instance);
         this.MainSimulationActor.Tell(PoisonPill.Instance);
     }
 }
Example #2
0
        private void Execute(Node node)
        {
            try
            {
                //log.Info("Inicio Ejecutar");
                if (node != null && this.stageSimulation.CanContinue())
                {
                    DelegateNotifyUI notifyUserInteraceMethod = notifyUserInterace;

                    node = node.Execute(this.stageSimulation.GetVariables(), notifyUserInteraceMethod);

                    if (node != null)
                    {
                        this.Self.Tell(node);
                    }
                    else
                    {
                        stageSimulation.StopExecution(true);
                    }
                }
                else
                {
                    stageSimulation.StopExecution(true);
                }

                if (this.stageSimulation.MustNotifyUI())
                {
                    this.MainSimulationActor.Tell(this.stageSimulation);
                }
                //log.Info("Fin Ejecutar");
            }
            catch (Exception ex)
            {
                logger.Error(ex.Source + " - " + ex.Message + ": " + ex.StackTrace);
                throw ex;
            }
        }