yuch7 / cwlexec

A new open source tool to run CWL workflows on LSF
Other
36 stars 8 forks source link

Empty JS array #39

Closed drjrm3 closed 5 years ago

drjrm3 commented 5 years ago

Following up on #38 I find that a new error is produced in my actual workflow which I have now duplicated here. Specifically, it looks like the JS interpreter is passing values as [] and so a java IndexOutOfBoundsException error is thrown when trying to evaluate the contents of the array. See lines 1739 and 1742 below (contained in cwlexec.out):

1739 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=output_file, type=string, value=[]) for process_reads
1740 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=threads, type=null, value=2) for process_reads
1741 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=K, type=null, value=NULL) for process_reads
1742 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=Y, type=null, value=[]) for process_reads
1743 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=k, type=null, value=NULL) for process_reads
1744 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=M, type=null, value=NULL) for process_reads
1745 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=R, type=null, value=NULL) for process_reads
1746 12:41:59.517 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=I, type=null, value=NULL) for process_reads
1747 12:41:59.518 default [pool-5-thread-1] DEBUG c.i.s.c.e.util.command.CommandUtil - Prepare input (id=fastq, type=File, value=File:/home/jmichael/cwl-workdir/b388f356-940f-4daf-9a99-c722488fc0d7/split_reads/scatter1/input1_R1.fastq.gz) for process_reads

UndefinedVariableError3.tar.gz

skeeey commented 5 years ago

Because the output_file does not have the inputBinding attribute, for scatter, we put off the evaluation process after command building process, but for command building process, it only handle the inputs that have the inputBinding attribute (these inputs will be used to build command), so we need handle the inputs that do not have inputBinding attribute after command building process