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

WorkflowTool.py: when convert interactions, the interaction contained script...

WorkflowTool.py: when convert interactions, the interaction contained script can only be script, it is no necessary to consider these script could be another interaction.
parent a0391340
...@@ -406,30 +406,18 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -406,30 +406,18 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
interaction.setReference(tdef.id) interaction.setReference(tdef.id)
script_list = [] script_list = []
for script_name in tdef.activate_script_name: for script_name in tdef.activate_script_name:
if script_name in dc_workflow.interactions.objectIds():
script_list.append('interaction_'+script_name)
elif script_name in dc_workflow.scripts.objectIds():
script_list.append('script_'+script_name) script_list.append('script_'+script_name)
interaction.setActivateScriptNameList(tuple(script_list)) interaction.setActivateScriptNameList(tuple(script_list))
script_list = [] script_list = []
for script_name in tdef.after_script_name: for script_name in tdef.after_script_name:
if script_name in dc_workflow.interactions.objectIds():
script_list.append('interaction_'+script_name)
elif script_name in dc_workflow.scripts.objectIds():
script_list.append('script_'+script_name) script_list.append('script_'+script_name)
interaction.setAfterScriptNameList(tuple(script_list)) interaction.setAfterScriptNameList(tuple(script_list))
script_list = [] script_list = []
for script_name in tdef.before_commit_script_name: for script_name in tdef.before_commit_script_name:
if script_name in dc_workflow.interactions.objectIds():
script_list.append('interaction_'+script_name)
elif script_name in dc_workflow.scripts.objectIds():
script_list.append('script_'+script_name) script_list.append('script_'+script_name)
interaction.setBeforeCommitScriptNameList(tuple(script_list)) interaction.setBeforeCommitScriptNameList(tuple(script_list))
script_list = [] script_list = []
for script_name in tdef.script_name: for script_name in tdef.script_name:
if script_name in dc_workflow.interactions.objectIds():
script_list.append('interaction_'+script_name)
elif script_name in dc_workflow.scripts.objectIds():
script_list.append('script_'+script_name) script_list.append('script_'+script_name)
interaction.setBeforeScriptNameList(tuple(script_list)) interaction.setBeforeScriptNameList(tuple(script_list))
# configure guard # configure guard
......
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