@@ -903,8 +903,9 @@ def _get_predecessors(workflow, node):
903
903
# let's just keep one, let's give it preference to the one with the
904
904
# most total_conditions_satisfied
905
905
_ , wk = sorted (workflows , key = lambda x : x [0 ], reverse = True )[0 ]
906
+ GH = wk .graph
906
907
missing_artifacts = dict ()
907
- for node , degree in wk . graph .out_degree ():
908
+ for node , degree in GH .out_degree ():
908
909
if degree != 0 :
909
910
continue
910
911
mscheme = _get_node_info (wk , node )
@@ -982,7 +983,18 @@ def _get_predecessors(workflow, node):
982
983
raise ValueError (msg )
983
984
req_params [iname ] = init_artifacts [dname ]
984
985
if len (dp .command .required_parameters ) > 1 :
985
- raise ValueError ('Not implemented' )
986
+ for pn in GH .predecessors (node ):
987
+ info = _get_node_info (wk , pn )
988
+ n , cnx , _ = GH .get_edge_data (
989
+ pn , node )['connections' ].connections [0 ]
990
+ if info not in merging_schemes or \
991
+ n not in merging_schemes [info ]:
992
+ msg = ('This workflow contains a step with '
993
+ 'multiple inputs so it cannot be '
994
+ 'completed automatically, please add '
995
+ 'the commands by hand.' )
996
+ raise ValueError (msg )
997
+ req_params [cnx ] = merging_schemes [info ][n ]
986
998
else :
987
999
if len (dp .command .required_parameters ) == 1 :
988
1000
cxns = dict ()
@@ -991,7 +1003,6 @@ def _get_predecessors(workflow, node):
991
1003
cxns [dname ] = iname
992
1004
connections = {previous_job : cxns }
993
1005
else :
994
- GH = wk .graph
995
1006
connections = dict ()
996
1007
for pn in GH .predecessors (node ):
997
1008
pndp = pn .default_parameter
0 commit comments