spiff-arena/SpiffWorkflow/doc/non-bpmn/tutorial/deserialize-wf.py

8 lines
246 B
Python
Raw Normal View History

from SpiffWorkflow import Workflow
from SpiffWorkflow.serializer.json import JSONSerializer
serializer = JSONSerializer()
with open('workflow.json') as fp:
workflow_json = fp.read()
workflow = Workflow.deserialize(serializer, workflow_json)