Skip to content

Commit 17fcf8d

Browse files
authored
Fix embedded subworkflows to not require "id" field (#185)
1 parent bff8a26 commit 17fcf8d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cwltool/workflow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ def __init__(self, workflow, **kwargs):
205205
self.workflow = workflow
206206
self.tool = workflow.tool
207207
self.steps = [WorkflowJobStep(s) for s in workflow.steps]
208-
self.id = workflow.tool["id"]
209208
self.state = None # type: Dict[Text, WorkflowStateItem]
210209
self.processStatus = None # type: Text
211210
if "outdir" in kwargs:
@@ -216,9 +215,9 @@ def __init__(self, workflow, **kwargs):
216215
# tmp_outdir_prefix defaults to tmp, so this is unlikely to be used
217216
self.outdir = tempfile.mkdtemp()
218217

219-
self.name = uniquename(u"workflow %s" % kwargs.get("name", shortname(self.workflow.tool["id"])))
218+
self.name = uniquename(u"workflow %s" % kwargs.get("name", shortname(self.workflow.tool.get("id", "embedded"))))
220219

221-
_logger.debug(u"[%s] initialized step from %s", self.name, self.tool["id"])
220+
_logger.debug(u"[%s] initialized from %s", self.name, self.tool.get("id", "workflow embedded in %s" % kwargs.get("part_of")))
222221

223222
def receive_output(self, step, outputparms, jobout, processStatus):
224223
# type: (WorkflowJobStep, List[Dict[Text,Text]], Dict[Text,Text], Text) -> None

0 commit comments

Comments
 (0)