Commit e478cc93 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Only transitions in valid_transition_item_list should be considered.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15975 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e523e6ac
......@@ -175,14 +175,14 @@ class WorkflowMethod(Method):
#LOG('valid_transition_item_list %s' % self._id, 0, str(valid_transition_item_list))
# Call whatever must be called before changing states
for wf_id, transition_list in candidate_transition_item_list:
for wf_id, transition_list in valid_transition_item_list:
wf[wf_id].notifyBefore(instance, self._id, args=args, kw=kw, transition_list=transition_list)
# Compute expected result
result = apply(self.__dict__['_m'], (instance,) + args, kw)
# Change the state of statefull workflows
for wf_id, transition_list in candidate_transition_item_list:
for wf_id, transition_list in valid_transition_item_list:
try:
wf[wf_id].notifyWorkflowMethod(instance, self._id, args=args, kw=kw, transition_list=transition_list)
except ObjectDeleted:
......@@ -196,7 +196,7 @@ class WorkflowMethod(Method):
instance.reindexObject()
# Call whatever must be called after changing states
for wf_id, transition_list in candidate_transition_item_list:
for wf_id, transition_list in valid_transition_item_list:
wf[wf_id].notifySuccess(instance, self._id, result, args=args, kw=kw, transition_list=transition_list)
# Return result finally
......
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