Skip to content
Snippets Groups Projects
Commit 61715f38 authored by George Marchment's avatar George Marchment
Browse files

updated the link the emits of subworkflows and their uses outside -> basically...

updated the link the emits of subworkflows and their uses outside -> basically emits like 'ch = value' and sub.out.ch ere not linked correctly
parent 2c38cd8f
No related branches found
No related tags found
No related merge requests found
Pipeline #14475 failed with stage
in 2 minutes and 7 seconds
......@@ -88,25 +88,30 @@ class Operation(Executor):
if(name not in constant.ERROR_WORDS_ORIGINS):# and name.lower()!=f"workflow{self.get_name_file().lower()}"):
#channel = Channel(name=name, origin=self.origin)
if(self.origin.get_type()!="Subworkflow"):
#First check that the channel is not defined at the same level
channels = self.origin.get_channels_from_name_same_level(name)
#Then check that the channel is defined in the below level
if(channels==[]):
channels = self.origin.get_channels_from_name_inside_level(name)
#Finally check if the channels is defined above
if(channels==[]):
channels = self.origin.get_channels_from_name_above_level(name)
if(channels==[]):
channels = self.origin.get_channels_from_name_other_blocks_on_same_level(name)
#If it still doesn't exist -> we create it
if(channels==[]):
channel = Channel(name=name, origin=self.origin)
self.origin.add_channel(channel)
channels = [channel]
origin = self.origin
else:
channel = Channel(name=name, origin=self.origin)
self.origin.takes_channels.append(channel)
origin = self.origin.root
#First check that the channel is not defined at the same level
channels = origin.get_channels_from_name_same_level(name)
#Then check that the channel is defined in the below level
if(channels==[]):
channels = origin.get_channels_from_name_inside_level(name)
#Finally check if the channels is defined above
if(channels==[]):
channels = origin.get_channels_from_name_above_level(name)
if(channels==[]):
channels = origin.get_channels_from_name_other_blocks_on_same_level(name)
#If it still doesn't exist -> we create it
if(channels==[]):
channel = Channel(name=name, origin=origin)
origin.add_channel(channel)
channels = [channel]
#else:
# print(name)
# channel = Channel(name=name, origin=self.origin)
# self.origin.takes_channels.append(channel)
# channels = [channel]
for channel in channels:
self.origins.append(channel)
......
......@@ -307,6 +307,13 @@ class Subworkflow(Main):
self.initialise_emit()
def get_all_executors_in_subworkflow(self):
dico = {}
self.root.get_all_executors_in_subworkflow(calls = dico)
for operation in self.emit:
dico[operation] = ""
return list(dico.keys())
def get_structure(self, dico):
super().get_structure(dico)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment