本文整理汇总了Python中SpiffWorkflow.specs.TaskSpec.TaskSpec.test方法的典型用法代码示例。如果您正苦于以下问题:Python TaskSpec.test方法的具体用法?Python TaskSpec.test怎么用?Python TaskSpec.test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpiffWorkflow.specs.TaskSpec.TaskSpec
的用法示例。
在下文中一共展示了TaskSpec.test方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test
# 需要导入模块: from SpiffWorkflow.specs.TaskSpec import TaskSpec [as 别名]
# 或者: from SpiffWorkflow.specs.TaskSpec.TaskSpec import test [as 别名]
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.")
示例2: test
# 需要导入模块: from SpiffWorkflow.specs.TaskSpec import TaskSpec [as 别名]
# 或者: from SpiffWorkflow.specs.TaskSpec.TaskSpec import test [as 别名]
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.')
示例3: test
# 需要导入模块: from SpiffWorkflow.specs.TaskSpec import TaskSpec [as 别名]
# 或者: from SpiffWorkflow.specs.TaskSpec.TaskSpec import test [as 别名]
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)
示例4: test
# 需要导入模块: from SpiffWorkflow.specs.TaskSpec import TaskSpec [as 别名]
# 或者: from SpiffWorkflow.specs.TaskSpec.TaskSpec import test [as 别名]
def test(self):
TaskSpec.test(self)