当前位置: 首页>>代码示例>>Python>>正文


Python Workflow.last_task方法代码示例

本文整理汇总了Python中SpiffWorkflow.Workflow.last_task方法的典型用法代码示例。如果您正苦于以下问题:Python Workflow.last_task方法的具体用法?Python Workflow.last_task怎么用?Python Workflow.last_task使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SpiffWorkflow.Workflow的用法示例。


在下文中一共展示了Workflow.last_task方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: deserialize_workflow

# 需要导入模块: from SpiffWorkflow import Workflow [as 别名]
# 或者: from SpiffWorkflow.Workflow import last_task [as 别名]
    def deserialize_workflow(self, s_state, **kwargs):
        wf_spec = self.deserialize_workflow_spec(s_state['wf_spec'], **kwargs)
        workflow = Workflow(wf_spec)

        # data
        workflow.data = s_state['data']

        # last_task
        workflow.last_task = s_state['last_task']

        # outer_workflow
        #workflow.outer_workflow =  find_workflow_by_id(remap_workflow_id(s_state['outer_workflow']))

        # success
        workflow.success = s_state['success']

        # workflow
        workflow.spec = wf_spec

        # task_tree
        workflow.task_tree = self._deserialize_task(workflow, s_state['task_tree'])

        # Re-connect parents
        for task in workflow.get_tasks():
            task.parent = workflow.get_task(task.parent)

        return workflow
开发者ID:dnnis,项目名称:SpiffWorkflow,代码行数:29,代码来源:DictionarySerializer.py

示例2: deserialize_workflow

# 需要导入模块: from SpiffWorkflow import Workflow [as 别名]
# 或者: from SpiffWorkflow.Workflow import last_task [as 别名]
    def deserialize_workflow(self, s_state, **kwargs):
        wf_spec = self.deserialize_workflow_spec(s_state['wf_spec'], **kwargs)
        original_root = wf_spec.task_specs['Root']
        workflow = Workflow(wf_spec, deserializing=True)
        new_root = wf_spec.task_specs['Root']
        assert original_root is new_root

        # attributes
        workflow.attributes = s_state['attributes']

        # last_task
        workflow.last_task = s_state['last_task']

        # outer_workflow
        #workflow.outer_workflow =  find_workflow_by_id(remap_workflow_id(s_state['outer_workflow']))

        # success
        workflow.success = s_state['success']

        # workflow
        workflow.spec = wf_spec

        # task_tree
        old_root_task = workflow.task_tree
        workflow.task_tree = self._deserialize_task(workflow, s_state['task_tree'])
        assert old_root_task is workflow.task_tree
        return workflow
开发者ID:ziadsawalha,项目名称:SpiffWorkflow,代码行数:29,代码来源:DictionarySerializer.py

示例3: deserialize_workflow

# 需要导入模块: from SpiffWorkflow import Workflow [as 别名]
# 或者: from SpiffWorkflow.Workflow import last_task [as 别名]
 def deserialize_workflow(self, s_state):
     wf_spec_class = get_class(s_state['workflow'])
     wf_spec = wf_spec_class()
     workflow = Workflow(wf_spec)
     workflow.attributes = s_state['attributes']
     workflow.last_task = s_state['last_task']
     workflow.success = s_state['success']
     tasks = [self.deserialize_task(workflow, serialized_task) for serialized_task in s_state['task_tree']]
     workflow.task_tree = [task for task in tasks if task.task_spec.name == 'Root'][0]
     workflow.spec = wf_spec
     return workflow
开发者ID:filipefigcorreia,项目名称:SpiffWorkflow,代码行数:13,代码来源:SerializationTest.py

示例4: deserialize_workflow

# 需要导入模块: from SpiffWorkflow import Workflow [as 别名]
# 或者: from SpiffWorkflow.Workflow import last_task [as 别名]
    def deserialize_workflow(self, s_state, **kwargs):
        wf_spec = self.deserialize_workflow_spec(s_state['wf_spec'], **kwargs)
        workflow = Workflow(wf_spec)

        # attributes
        workflow.attributes = s_state['attributes']

        # last_task
        workflow.last_task = s_state['last_task']

        # outer_workflow
        #workflow.outer_workflow =  find_workflow_by_id(remap_workflow_id(s_state['outer_workflow']))

        # success
        workflow.success = s_state['success']

        # workflow
        workflow.spec = wf_spec

        # task_tree
        workflow.task_tree = self._deserialize_task(workflow, s_state['task_tree'])

        return workflow
开发者ID:dave42,项目名称:SpiffWorkflow,代码行数:25,代码来源:DictionarySerializer.py


注:本文中的SpiffWorkflow.Workflow.last_task方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。