{"action":"created","issue":{"url":"https://api.github.com/repos/broadinstitute/cromwell/issues/2756","repository_url":"https://api.github.com/repos/broadinstitute/cromwell","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/2756/labels{/name}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/2756/comments","events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/2756/events","html_url":"https://github.com/broadinstitute/cromwell/issues/2756","id":266129512,"node_id":"MDU6SXNzdWUyNjYxMjk1MTI=","number":2756,"title":"Task/Call resolution in subworkflows is failing","user":{"login":"kottmast","id":2412878,"node_id":"MDQ6VXNlcjI0MTI4Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2412878?v=4","gravatar_id":"","url":"https://api.github.com/users/kottmast","html_url":"https://github.com/kottmast","followers_url":"https://api.github.com/users/kottmast/followers","following_url":"https://api.github.com/users/kottmast/following{/other_user}","gists_url":"https://api.github.com/users/kottmast/gists{/gist_id}","starred_url":"https://api.github.com/users/kottmast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kottmast/subscriptions","organizations_url":"https://api.github.com/users/kottmast/orgs","repos_url":"https://api.github.com/users/kottmast/repos","events_url":"https://api.github.com/users/kottmast/events{/privacy}","received_events_url":"https://api.github.com/users/kottmast/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-17T13:42:27Z","updated_at":"2018-11-01T11:02:16Z","closed_at":null,"author_association":"NONE","body":"In certain cases, cromwell/wdltool is unable to resolve call statements in subworkflows (cromwell v29, wdltool v0.14). This may be related to #2753\r\n\r\nA simple case to demonstrate this:\r\n\r\nmain.wdl:\r\n```\r\nimport \"sub.wdl\" as sub\r\nworkflow main {\r\n    call sub.wf\r\n}\r\n```\r\n\r\nsub.wdl:\r\n```\r\nworkflow wf {\r\n    call a\r\n    String b = a.out\r\n}\r\n\r\ntask a {\r\n    command {\r\n        echo \"hello\"\r\n    }\r\n    output {\r\n        String out = read_string(stdout())\r\n    }\r\n}\r\n```\r\nRunning the validate command against sub.wdl returns no error messages. Running validate against main.wdl returns:\r\n```\r\nERROR: Missing value or call: Couldn't find value or call with name 'a' in workflow (line 4):\r\n\r\n    String b = a.out\r\n               ^\r\n```\r\nInterestingly, if I add to sub.wdl:\r\n```\r\ntask b {\r\n    String msg\r\n    command {\r\n        echo ${msg}\r\n    }\r\n    output {\r\n        String out = read_string(stdout())\r\n    }\r\n}\r\n```\r\nand replace String b=a.out with:\r\n```\r\ncall b { input: msg=a.out }\r\n```\r\nit validates ok. Am I doing something wrong with the WDL? Or is there a workaround for this?\r\n\r\nMy actual use case is a bit more complex - I have a series of mutually exclusive optional cases, so I want to put the File? output from each into an Array, and then use the select_first. But when I try to create the array from the outputs:\r\n```\r\nif (a_condition) {\r\n    call task_a\r\n}\r\nif (b_condition) {\r\n    call task_b\r\n}\r\n...\r\nArray[File?] files = [task_a.out, task_b.out ...]\r\nFile file = select_first(files)\r\n```\r\nI see the above manifestation/error message."},"comment":{"url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments/435006736","html_url":"https://github.com/broadinstitute/cromwell/issues/2756#issuecomment-435006736","issue_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/2756","id":435006736,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTAwNjczNg==","user":{"login":"duartemolha","id":722005,"node_id":"MDQ6VXNlcjcyMjAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/722005?v=4","gravatar_id":"","url":"https://api.github.com/users/duartemolha","html_url":"https://github.com/duartemolha","followers_url":"https://api.github.com/users/duartemolha/followers","following_url":"https://api.github.com/users/duartemolha/following{/other_user}","gists_url":"https://api.github.com/users/duartemolha/gists{/gist_id}","starred_url":"https://api.github.com/users/duartemolha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duartemolha/subscriptions","organizations_url":"https://api.github.com/users/duartemolha/orgs","repos_url":"https://api.github.com/users/duartemolha/repos","events_url":"https://api.github.com/users/duartemolha/events{/privacy}","received_events_url":"https://api.github.com/users/duartemolha/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T11:02:16Z","updated_at":"2018-11-01T11:02:16Z","author_association":"NONE","body":"I am also having this issue. \r\n\r\nI don't understand what I am going wrong because it seems to be I am following the basic use case explained in the cromwell manual\r\n\r\nI have basicaly took the published paired-fastq-to-unmapped-bam.wdl\r\n\r\ncan have added inputs and parsing to that each umapped bam file created get processed first by \r\nprocessing-for-variant-discovery-local-gatk4.wdl\r\nand then the processed bam file gets processed by \r\nhaplotypecaller-gvcf-gatk4.wdl\r\n\r\nSo I import the 2 workflows on the top\r\n\r\n```\r\nimport \"processing-for-variant-discovery-local-gatk4.wdl\" as process_bam\r\nimport \"haplotypecaller-gvcf-gatk4_no_docker.wdl\"         as haplotype_caller\r\n```\r\n\r\nand then use them on the ubam outputs\r\n\r\nWhen I run it through validate I get the same error\r\n\r\n```\r\njava -jar ~/src/cromwell-36/womtool-36.jar validate my_pipeline.wdl\r\n\r\nERROR: Missing value or call: Couldn't find value or call with name 'haplotype_caller' in workflow (line 131):\r\n\r\n    Array[File] HaplotypeCalls_output_vcfs = haplotype_caller.HaplotypeCallerGvcf_GATK4.output_vcf\r\n                                             ^\r\n\r\njava -jar ~/src/cromwell-36/womtool-36.jar validate my_pipeline.wdl\r\n\r\nERROR: Missing value or call: Couldn't find value or call with name 'haplotype_caller' in workflow (line 131):\r\n\r\n    Array[File] HaplotypeCalls_output_vcfs = haplotype_caller.output_vcf\r\n                                             ^\r\n```\r\n\r\nI thought it might be that 2 subworkflows was not supported so I took out the last one and the error become about the first:\r\n\r\n```\r\njava -jar ~/src/cromwell-36/womtool-36.jar validate my_pipeline_no_variant_calling.wdl\r\n\r\nERROR: Missing value or call: Couldn't find value or call with name 'sub' in workflow (line 110):\r\n\r\n    Array[File] ProcessedBams_duplication_metrics = sub.duplication_metrics\r\n                                                    ^\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"duartemolha"}}