當前位置: 首頁>>代碼示例>>Python>>正文


Python BpmnWorkflow.get_dump方法代碼示例

本文整理匯總了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))
開發者ID:knipknap,項目名稱:SpiffWorkflow,代碼行數:36,代碼來源:ParallelTest.py


注:本文中的SpiffWorkflow.bpmn.workflow.BpmnWorkflow.get_dump方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。