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