my($iw_selected_files) = iw_get_filelist();my @arr_sourcefiles;my @filenames;sub iw_get_filelist{ my($files) = ""; my($filesattached) = ""; 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'); $files = "\n"; countfile(); push(@flist,@arr_sourcefiles); for (my $i = 0; $i < @flist; ++$i) { $files .= "\t\n"; } $files .= "\n"; } return($files);}
Hi,What I can see here is that, you are appending the filelist in the form of an xml structure. Is it so required by your code ?If you could do this attaching work in an external task which could be your first task of workflow, as you are doing a lot of traversing into directories which may be time consuming at times and error prone too.Tracking the process in an external task through an .ipl would make life more comfortable.Thanks,Pawan
I am not supposed to add any extra tasks to the existing workflow.With the above code I am getting this error -No files in files variable.Please tell what could the reason be.
It seems that you are creating WF's File list as a union of two sources: assets that your Contributor checked into WF + what's coming as a result of processing @arr_submittedfiles Array (you did not provide any info of how that list gets populated).There is a twist though. If nothing has been selected by your user __ELEM__('iw_file') evaluates to false and you do notprocess your second source either. If that's what you want, fine. If *Submitted Files* is an independent source, you have a problem
Please tell y its null.