Commit 741dc31b authored by Julien Muchembled's avatar Julien Muchembled

Update comments related to previous commit.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent db225b98
...@@ -194,12 +194,11 @@ class WorkflowMethod(Method): ...@@ -194,12 +194,11 @@ class WorkflowMethod(Method):
if not candidate_transition_item_list: if not candidate_transition_item_list:
return apply(self.__dict__['_m'], (instance,) + args, kw) return apply(self.__dict__['_m'], (instance,) + args, kw)
# Prepare a list of transitions which should be invoked # Prepare a list of transitions which should be invoked.
# this list is based on the results of isWorkflowMethodSupported # This list is based on the results of isWorkflowMethodSupported.
# XXX - the behaviour of isWorkflowMethodSupported should be extended # An interaction is ignored if the guard prevents execution.
# some day so that a workflow method raises an exception # Otherwise, an exception is raised if the workflow transition does not
# when it is invoked from a workflow state which does # exist from the current state, or if the guard rejects it.
# not support it or whenever guards reject it
valid_transition_item_list = [] valid_transition_item_list = []
for wf_id, transition_list in candidate_transition_item_list: for wf_id, transition_list in candidate_transition_item_list:
candidate_workflow = wf[wf_id] candidate_workflow = wf[wf_id]
...@@ -208,8 +207,8 @@ class WorkflowMethod(Method): ...@@ -208,8 +207,8 @@ class WorkflowMethod(Method):
if candidate_workflow.isWorkflowMethodSupported(instance, transition_id): if candidate_workflow.isWorkflowMethodSupported(instance, transition_id):
valid_list.append(transition_id) valid_list.append(transition_id)
elif candidate_workflow.__class__.__name__ == 'DCWorkflowDefinition': elif candidate_workflow.__class__.__name__ == 'DCWorkflowDefinition':
if 0: # disabled for the moment # XXX Do not raise for the moment as ERP5 is not ready.
raise UnsupportedWorkflowMethod(instance, wf_id, transition_id) #raise UnsupportedWorkflowMethod(instance, wf_id, transition_id)
LOG("WorkflowMethod.__call__", ERROR, LOG("WorkflowMethod.__call__", ERROR,
"Transition %s/%s on %r is ignored. Current state is %r." "Transition %s/%s on %r is ignored. Current state is %r."
% (wf_id, transition_id, instance, % (wf_id, transition_id, instance,
......
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