I wonder if optional output is supported in cromwell already? I ran a test case locally and it passed. But when I run the same case in FIreCloud, I got an error reporting "failure to copy the empty file".
This may work for the local backend but optional outputs aren't fully supported for the Google cloud backend. One workaround I've heard discussed is that you could touch the file you were planning to optionally generate to ensure it's copied out as an empty file. This would mean evaluating downstream whether to run a dependent task by checking if the size of the file is greater than 0.