Ejemplo n.º 1
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     TaskSpec.test(self)
     if len(self.outputs) > 0:
         raise WorkflowException(self, "Cancel with an output.")
Ejemplo n.º 2
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     TaskSpec.test(self)
     if len(self.outputs) > 0:
         raise WorkflowException(self, 'Cancel with an output.')
Ejemplo n.º 3
0
    def test(self):
        """
        Checks whether all required attributes are set. Throws an exception
        if an error was detected.
        """
        #This has been overidden to allow a single default flow out (without a condition) - useful for
        #the converging type
        TaskSpec.test(self)
#        if len(self.cond_task_specs) < 1:
#            raise WorkflowException(self, 'At least one output required.')
        for condition, name in self.cond_task_specs:
            if name is None:
                raise WorkflowException(self, 'Condition with no task spec.')
            task_spec = self._parent.get_task_spec_from_name(name)
            if task_spec is None:
                msg = 'Condition leads to non-existent task ' + repr(name)
                raise WorkflowException(self, msg)
            if condition is None:
                continue
        if self.default_task_spec is None:
            raise WorkflowException(self, 'A default output is required.')
Ejemplo n.º 4
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     #This has been overidden to allow a single default flow out (without a condition) - useful for
     #the converging type
     TaskSpec.test(self)
     #        if len(self.cond_task_specs) < 1:
     #            raise WorkflowException(self, 'At least one output required.')
     for condition, name in self.cond_task_specs:
         if name is None:
             raise WorkflowException(self, 'Condition with no task spec.')
         task_spec = self._parent.get_task_spec_from_name(name)
         if task_spec is None:
             msg = 'Condition leads to non-existent task ' + repr(name)
             raise WorkflowException(self, msg)
         if condition is None:
             continue
     if self.default_task_spec is None:
         raise WorkflowException(self, 'A default output is required.')
Ejemplo n.º 5
0
 def test(self):
     TaskSpec.test(self)
     if self.file is not None and not os.path.exists(self.file):
         raise WorkflowException(self,
                                 'File does not exist: %s' % self.file)
Ejemplo n.º 6
0
 def test(self):
     TaskSpec.test(self)
     if self.file is not None and not os.path.exists(self.file):
         raise WorkflowException(self, 'File does not exist: %s' % self.file)
Ejemplo n.º 7
0
 def test(self):
     TaskSpec.test(self)