knipknap/SpiffWorkflow — pull request #37 by leifker (2014-02-13 13:12:56+00:00)
Title: Add missing _deserialize_operator method

This is still an issue even with the latest version. Here is my approach, I have a spiffworkflow instance constructed from bpmn xml. I then want to serialize it to json like this.

instance = JSONSerializer().serialize_workflow(spiffworkflow, include_spec=True)

So the serialize works for me, but the reverse thows this stack
.spiffworkflow = JSONSerializer().deserialize_workflow(instance)
...
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/storage/DictionarySerializer.py", line 470, in deserialize_workflow
wf_spec = self.deserialize_workflow_spec(s_state['wf_spec'], **kwargs)
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/storage/DictionarySerializer.py", line 435, in deserialize_workflow_spec
task_spec = task_spec_cls.deserialize(self, spec, task_spec_state)
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/specs/ExclusiveChoice.py", line 92, in deserialize
return serializer._deserialize_exclusive_choice(wf_spec, s_state)
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/storage/DictionarySerializer.py", line 230, in _deserialize_exclusive_choice
self._deserialize_multi_choice(wf_spec, s_state, spec=spec)
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/storage/DictionarySerializer.py", line 291, in _deserialize_multi_choice
condition = self._deserialize_arg(cond)
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/storage/DictionarySerializer.py", line 110, in _deserialize_arg
return arg_cls.deserialize(self, arg)
File "/home/davidl/.python/src/spiffworkflow/SpiffWorkflow/operators.py", line 204, in deserialize
return serializer._deserialize_operator(s_state)
AttributeError: 'DictionarySerializer' object has no attribute '_deserialize_operator'

Adding the function seems to fix the issue for me.