Esempio n. 1
0
 def load_or_create_workflow(self):
     """
     tries to load the workflow from session
     creates a new one if it can't find
     :return:
     """
     try:
         workflow_path = self.get_worfklow_path()
         serialized_wf = self.request.session.workflows[workflow_path]
         self.workflow = BpmnWorkflow.deserialize(DictionarySerializer(), serialized_wf)
     except Exception as e:
         print e
         wf_pkg_file = open(self.workflow_name)
         self.workflow_spec = BpmnSerializer().deserialize_workflow_spec(wf_pkg_file)
         self.workflow = BpmnWorkflow(self.workflow_spec)
Esempio n. 2
0
 def full_restore(self, state):
     return BpmnWorkflow.deserialize(DictionarySerializer(), state)
Esempio n. 3
0
 def deserialize_workflow(self, serialized_wf):
     return BpmnWorkflow.deserialize(DictionarySerializer(), serialized_wf)
Esempio n. 4
0
 def full_restore(self, state):
     return BpmnWorkflow.deserialize(DictionarySerializer(), state)