Commit 09b03bf7 authored by wenjie.zheng's avatar wenjie.zheng

InteractionWorkflow.py: _updateWorkflowHistory do nothing because interaction...

InteractionWorkflow.py: _updateWorkflowHistory do nothing because interaction workflow is stateless.
parent 55c50c73
...@@ -176,21 +176,9 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -176,21 +176,9 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
security.declarePrivate('_updateWorkflowHistory') security.declarePrivate('_updateWorkflowHistory')
def _updateWorkflowHistory(self, document, status_dict): def _updateWorkflowHistory(self, document, status_dict):
""" """
Change the state of the object. Stateless.
""" """
# Create history attributes if needed return
if getattr(aq_base(document), 'workflow_history', None) is None:
document.workflow_history = PersistentMapping()
# XXX this _p_changed is apparently not necessary
document._p_changed = 1
# Add an entry for the workflow in the history
workflow_key = self._generateHistoryKey()
if not document.workflow_history.has_key(workflow_key):
document.workflow_history[workflow_key] = ()
# Update history
document.workflow_history[workflow_key] += (status_dict,)
security.declarePrivate('getStateChangeInformation') security.declarePrivate('getStateChangeInformation')
def getStateChangeInformation(self, document, state, transition=None): def getStateChangeInformation(self, document, state, transition=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment