I am running into problems with the following script and was hoping some new eyes could see what is wrong.
In my workflow, I have the followinng sub-routine defined :
sub dom_return_filelist{
my($files) = "";
if (__ELEM__('iw_file')){
my(
@flist) = map {
TeamSite::CGI_lite::escape_html_data($_);
} sort map {
tr|\\|/|;
s|^\Q$iw_area_vpath\E||;
$_;
} __VALUE__('iw_file');
for (my $i = 0; $i <
@flist; ++$i) {
$files .= "$flist[$i]\n";
}
}
return($files);
}
This returns a list of files with relative paths defined that were submitted into the Workflow. I assign this to a variable ($dom_db_files) and then pass this to a script which writes it to a flat file :
### Grab all submitted files and Put In Filelist ###
open(TSFILE, '> /usr/iw-home/local/config/test/file_name.txt');
print TSFILE "$wf_id\n";
print TSFILE "$dom_db_files";
close TSFILE;
When I simply output the $dom_db_files (printing it to one of my prompts in the workflow to check it), the variable holds the correct data. When I test the second script above with a variable like $area_vpath (which is defined elsewhere) it works fine. But, when I try to use my file list as the variable to write out, it hangs (the workflow hangs at that task).
If anyone has a suggestion, I would love to hear it.
Thanks,
jones