def check_actors(self, actors):
     """
     Performs checks on the actors that are to be used. Raises an exception if invalid setup.
     :param actors: the actors to check
     :type actors: list
     """
     super(Flow, self).check_actors(actors)
     actor = self.first_active
     if (actor is not None) and not base.is_source(actor):
         raise Exception("First active actor is not a source: " + actor.full_name)
Example #2
0
 def check_actors(self, actors):
     """
     Performs checks on the actors that are to be used. Raises an exception if invalid setup.
     :param actors: the actors to check
     :type actors: list
     """
     super(Flow, self).check_actors(actors)
     actor = self.first_active
     if (actor is not None) and not base.is_source(actor):
         raise Exception("First active actor is not a source: " +
                         actor.full_name)
 def check_actors(self):
     """
     Checks the actors of the owner. Raises an exception if invalid.
     """
     actors = []
     for actor in self.owner.actors:
         if actor.skip:
             continue
         actors.append(actor)
     if len(actors) == 0:
         return
     if not self.allow_source and base.is_source(actors[0]):
         raise Exception("Actor '" + actors[0].full_name + "' is a source, but no sources allowed!")
     for i in xrange(1, len(actors)):
         if not isinstance(actors[i], InputConsumer):
             raise Exception("Actor does not accept any input: " + actors[i].full_name)
Example #4
0
 def check_actors(self):
     """
     Checks the actors of the owner. Raises an exception if invalid.
     """
     actors = []
     for actor in self.owner.actors:
         if actor.skip:
             continue
         actors.append(actor)
     if len(actors) == 0:
         return
     if not self.allow_source and base.is_source(actors[0]):
         raise Exception("Actor '" + actors[0].full_name + "' is a source, but no sources allowed!")
     for i in xrange(1, len(actors)):
         if not isinstance(actors[i], InputConsumer):
             raise Exception("Actor does not accept any input: " + actors[i].full_name)