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