Skip to content

Commit

Permalink
Fix embedded subworkflows to not require "id" field (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
tetron authored Sep 12, 2016
1 parent bff8a26 commit 17fcf8d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ def __init__(self, workflow, **kwargs):
self.workflow = workflow
self.tool = workflow.tool
self.steps = [WorkflowJobStep(s) for s in workflow.steps]
self.id = workflow.tool["id"]
self.state = None # type: Dict[Text, WorkflowStateItem]
self.processStatus = None # type: Text
if "outdir" in kwargs:
Expand All @@ -216,9 +215,9 @@ def __init__(self, workflow, **kwargs):
# tmp_outdir_prefix defaults to tmp, so this is unlikely to be used
self.outdir = tempfile.mkdtemp()

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

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

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

0 comments on commit 17fcf8d

Please sign in to comment.