Commit cc186026 authored by wenjie.zheng's avatar wenjie.zheng

InteractionWorkflow.py: change the way to get after script to not calling it.

parent 9a9342aa
...@@ -133,6 +133,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -133,6 +133,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
Allows the user to request information provided by the Allows the user to request information provided by the
workflow. This method must perform its own security checks. workflow. This method must perform its own security checks.
''' '''
vdef = getattr(self, name, _MARKER)
for x in self.objectValues(portal_type='Variable'): for x in self.objectValues(portal_type='Variable'):
if x.getReference() == name: if x.getReference() == name:
vdef = x vdef = x
...@@ -339,7 +340,8 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -339,7 +340,8 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
after_script_list.append(tdef.getAfterScriptName()) after_script_list.append(tdef.getAfterScriptName())
if after_script_list != [] and tdef.getAfterScriptName() is not None: if after_script_list != [] and tdef.getAfterScriptName() is not None:
for script_name in after_script_list: for script_name in after_script_list:
script = self ._getOb(script_name) # try to get the script without calling it.
script = self.getScriptValueList()[script_name]
# Pass lots of info to the script in a single parameter. # Pass lots of info to the script in a single parameter.
script.execute(sci) # May throw an exception script.execute(sci) # May throw an exception
......
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