for this you need to write a function and assing it a variable and that variable need to be passed to the first task of workflow .Try this ..it may help you .
Example File List Insert (WFT):
# Insert File List If Available# ==================================================if (__ELEM__('iw_file')){ __INSERT__("<files>"); for (my $i=0; $i < @submit_file; ++$i) { my $fullpath = $assignment_vpath . "/" . $submit_file[$i]; $priv = `$iw-home/bin/iwprv -g $fullpath`; chomp $priv; next if ($priv); __INSERT__(" <file path='$submit_file[$i]' " . "comment='Attached Files'/>"); } __INSERT__("</files>");}