本文整理汇总了Python中SpiffWorkflow.bpmn.workflow.BpmnWorkflow.get_dump方法的典型用法代码示例。如果您正苦于以下问题:Python BpmnWorkflow.get_dump方法的具体用法?Python BpmnWorkflow.get_dump怎么用?Python BpmnWorkflow.get_dump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpiffWorkflow.bpmn.workflow.BpmnWorkflow
的用法示例。
在下文中一共展示了BpmnWorkflow.get_dump方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AbstractParallelTest
# 需要导入模块: from SpiffWorkflow.bpmn.workflow import BpmnWorkflow [as 别名]
# 或者: from SpiffWorkflow.bpmn.workflow.BpmnWorkflow import get_dump [as 别名]
class AbstractParallelTest(BpmnWorkflowTestCase):
def _do_test(self, order, only_one_instance=True, save_restore=False):
self.workflow = BpmnWorkflow(self.spec)
self.workflow.do_engine_steps()
for s in order:
choice = None
if isinstance(s, tuple):
s, choice = s
if s.startswith('!'):
logging.info("Checking that we cannot do '%s'", s[1:])
self.assertRaises(
AssertionError, self.do_next_named_step, s[1:], choice=choice)
else:
if choice is not None:
logging.info(
"Doing step '%s' (with choice='%s')", s, choice)
else:
logging.info("Doing step '%s'", s)
# logging.debug(self.workflow.get_dump())
self.do_next_named_step(
s, choice=choice, only_one_instance=only_one_instance)
self.workflow.do_engine_steps()
if save_restore:
# logging.debug("Before SaveRestore: \n%s" %
# self.workflow.get_dump())
self.save_restore()
self.workflow.do_engine_steps()
unfinished = self.workflow.get_tasks(Task.READY | Task.WAITING)
if unfinished:
logging.debug("Unfinished tasks: %s", unfinished)
logging.debug(self.workflow.get_dump())
self.assertEqual(0, len(unfinished))