|
19 | 19 |
|
20 | 20 | _logger = logging.getLogger("cwltool") |
21 | 21 |
|
22 | | -WorkflowStateItem = namedtuple('WorkflowStateItem', ['parameter', 'value']) |
| 22 | +WorkflowStateItem = namedtuple('WorkflowStateItem', ['parameter', 'value', 'success']) |
23 | 23 |
|
24 | 24 |
|
25 | 25 | def defaultMakeTool(toolpath_object, # type: Dict[Text, Any] |
@@ -161,7 +161,7 @@ def object_from_state(state, parms, frag_only, supportsMultipleInput, sourceFiel |
161 | 161 | "declared.") |
162 | 162 | connections = aslist(inp[sourceField]) |
163 | 163 | for src in connections: |
164 | | - if src in state and state[src] is not None: |
| 164 | + if src in state and state[src] is not None and (state[src].success == "success" or incomplete): |
165 | 165 | if not match_types( |
166 | 166 | inp["type"], state[src], iid, inputobj, |
167 | 167 | inp.get("linkMerge", ("merge_nested" |
@@ -232,7 +232,7 @@ def receive_output(self, step, outputparms, jobout, processStatus): |
232 | 232 | for i in outputparms: |
233 | 233 | if "id" in i: |
234 | 234 | if i["id"] in jobout: |
235 | | - self.state[i["id"]] = WorkflowStateItem(i, jobout[i["id"]]) |
| 235 | + self.state[i["id"]] = WorkflowStateItem(i, jobout[i["id"]], processStatus) |
236 | 236 | else: |
237 | 237 | _logger.error(u"[%s] Output is missing expected field %s", step.name, i["id"]) |
238 | 238 | processStatus = "permanentFail" |
@@ -359,9 +359,9 @@ def job(self, joborder, output_callback, **kwargs): |
359 | 359 | with SourceLine(self.tool["inputs"], e, WorkflowException): |
360 | 360 | iid = shortname(i["id"]) |
361 | 361 | if iid in joborder: |
362 | | - self.state[i["id"]] = WorkflowStateItem(i, copy.deepcopy(joborder[iid])) |
| 362 | + self.state[i["id"]] = WorkflowStateItem(i, copy.deepcopy(joborder[iid]), "success") |
363 | 363 | elif "default" in i: |
364 | | - self.state[i["id"]] = WorkflowStateItem(i, copy.deepcopy(i["default"])) |
| 364 | + self.state[i["id"]] = WorkflowStateItem(i, copy.deepcopy(i["default"]), "success") |
365 | 365 | else: |
366 | 366 | raise WorkflowException( |
367 | 367 | u"Input '%s' not in input object and does not have a default value." % (i["id"])) |
|
0 commit comments