Prior to my 6.1 SP1 upgrade, the following workflow code worked in 6.0 (yes it may not be the most efficient and there are spelling errors but I inheritated it). The workflow is a slightly modified custom version of the solutions/configurable_author_submit.wft
<---Start original code --->
# Take the list of files in 'iw_file' and sort them in unencoded form.
my
@submit_file = (__ELEM__('iw_file') ? sort __VALUE__('iw_file') : ());
my $include_metadata_task = 0;
my $metadata_extentions = 'html|htm|asp|cfm|doc|dot|xls|ppt|pps|mpp|pub|vsd|pdf|rtf|txt' ;
for (my $i=0; $i < __ELEM__('iw_file'); ++$i)
{
my $file_name = __VALUE__("iw_file[$i]");
my $tempvar = $file_name;
$file_name =~ /\.([^\.]+)$/;
my $extention = $1;
$include_metadata_task = 1
if ( $extention =~ /$metadata_extentions/ );
<---End original code --->
Now in 6.1 SP1, it provides an error on the workflow instantiation screen stating that I have an "Invalid Workflow Template - utf8 version 2 required..." if I have more than two files attached to the workflow. It doesn't throw an error with one or two files but also doesn't have any value for $file_name either when I write out the values to a log file.
I have a workaround that does the following, basically replacing all instances of iw_file with my submit_file array and values:
<---Start workaround code --->
my $include_metadata_task = 0;
my $metadata_extentions = 'html|htm|asp|cfm|doc|dot|xls|ppt|pps|mpp|pub|vsd|pdf|rtf|txt' ;
for (my $i=0; $i <
@submit_file; ++$i)
{
my $file_name = $submit_file[$i];
my $tempvar = $file_name;
$file_name =~ /\.([^\.]+)$/;
my $extention = $1;
$include_metadata_task = 1
if ( $extention =~ /$metadata_extentions/ );
<---End workaround code --->
My question is why did my original code stop working in 6.1 SP1. What am I missing?
This was originally posted
hereLuke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov