Skip to content

Commit

Permalink
Update to fix #1330
Browse files Browse the repository at this point in the history
  • Loading branch information
manabuishii committed Mar 29, 2022
1 parent 2414df9 commit 1862895
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ def job(
for inp in job_order:
field = shortname(inp)
step_input[field] = job_order[inp]
# if not inp.get("not_connected"):
# step_input[field] = job_order[field]

if hasattr(inp, "get"):
if not inp.get("not_connected"):
step_input[field] = job_order[field]
try:
yield from self.embedded_tool.job(
step_input,
Expand Down
20 changes: 19 additions & 1 deletion cwltool/workflow_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def object_from_state(
) -> Optional[CWLObjectType]:
inputobj = {} # type: CWLObjectType
for s in state.keys():
inputobj[s] = state[s].value
if hasattr(state[s], "value"):
inputobj[s] = state[s].value
for inp in parms:
iid = original_id = cast(str, inp["id"])
if frag_only:
Expand Down Expand Up @@ -553,6 +554,23 @@ def do_output_callback(self, final_output_callback: OutputCallbackType) -> None:
_logger.debug("[%s] outputs %s", self.name, json_dumps(wo, indent=4))

self.did_callback = True
paramskey=[]
paramskeys=[]

if self.tool["outputs"] is not None:
for inp in self.tool["outputs"]:
for k,v in inp.items():
if k == 'id':
paramskey.append(v)
paramskeys.append(shortname(v))

newwo={}
for k,v in wo.items():
if k in paramskey:
newwo[k]=v
elif k in paramskeys:
newwo[k]=v
wo = newwo

final_output_callback(wo, self.processStatus)

Expand Down

0 comments on commit 1862895

Please sign in to comment.