Ignore:
Timestamp:
Jun 30, 2010, 1:22:53 PM (11 years ago)
Author:
kopal
Message:
  • some execution engine fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Model/PluginModel.cs

    r1711 r1713  
    4343        private IPlugin plugin;         
    4444        private int imageIndex = 0;
    45         private PluginModelState state = PluginModelState.Normal;
     45        private PluginModelState state = PluginModelState.Normal;       
    4646        #endregion privates
    4747
     
    5353            get { return state; }
    5454            set { state = value; }
    55         }
     55        }     
    5656
    5757        /// <summary>
     
    248248
    249249        /// <summary>
    250         /// Checks wether this PluginModel is executable or not and sets the isExecutable bool
    251         ///
    252         /// There are 3 ways in that a plugin can be executable:
    253         ///     1. All mandatory inputs are set + all outputs are "free"
    254         ///     2. There are no mandatory inputs and at least one non-mandatory input is set + all outputs are "free"
    255         ///     3. There are no inputs + all outputs are "free"
     250        /// Checks wether this PluginModel is executable and if yes it broadcasts a execution message
    256251        /// </summary>
    257252        public void checkExecutable(ProtocolBase protocolBase)
    258         {
    259             //We do not execute Plugins with Errors
    260             if (this.State == PluginModelState.Error)
    261             {
    262                 return;
    263             }
    264            
    265             //First test if every mandatory Connector has data
    266             //or one non-mandatory input has data
     253        {                     
     254            MessageExecution msg;           
    267255            foreach (ConnectorModel connectorModel in this.InputConnectors)
    268256            {
    269257                if ((connectorModel.IsMandatory || connectorModel.InputConnections.Count > 0) && !connectorModel.HasData)
    270258                {
     259                    foreach (ConnectionModel connectionModel in connectorModel.InputConnections)
     260                    {
     261                        if (connectionModel.From.PluginModel.Startable)
     262                        {                           
     263                            msg = new MessageExecution();
     264                            msg.PluginModel = connectionModel.From.PluginModel;
     265                            connectionModel.From.PluginModel.pluginProtocol.BroadcastMessageReliably(msg);
     266                        }
     267                    }
    271268                    return;
    272269                }               
    273270            }
    274271
    275             MessageExecution msg = new MessageExecution();
     272            msg = new MessageExecution();
    276273            msg.PluginModel = this;
    277274               
Note: See TracChangeset for help on using the changeset viewer.