I have a workflow that produces two outputs: a Task List and an Exception List. Both are Excel files.
Both output datastreams are output to static Excel files via the "Overwrite (Drop)" functionality.
The intent is for users to generate the task list via the Gallery, and then review the exception list. If there are exceptions on the list, they need to adjust their input files and re-run the workflow. The goal is to generate 0 exceptions and then start assigning the tasks on the task list output file.
However if there are no records in the "Exception" datastream, the output doesn't overwrite. The Exception List will remain with whatever records existed in the file before the workflow was run. This seems consistent with other reported Community topics where a record count of 0 won't overwrite other file types such as .yxdb
So two questions:
- Is it possible to force an overwrite if there are 0 records sent to the Output tool for the Exception List?
- If not, is there a way to add a row of all 0 values if and only if the record count is 0 for exceptions? Right now I am using a Union tool to add the line of all 0s regardless as an 'end of file' marker and therefore forcing an overwrite but that doesn't seem elegant. I'm also interested in the 'if and only if' functionality for broader purposes.
Thank you!