path_some_unique_tag=area_relative_path_to_gen_file
###################################################################### The following adds a file to the task only if it doesn't exist# Parameters:# $task_file - file to add# $task_id - id of task#####################################################################sub set_task_file { my $task_file = shift; my $task_id = shift; my $file_exists = 0; my $task = new TeamSite::WFtask($task_id); my @files = $task->GetFiles(); # Iterate through task file list for (my $i = 0; $i < @files; $i++) { if($files[$i] eq $task_file) { $file_exists = 1; } } # Add if it doesn't exist if($file_exists == 0) { $task->AddFile($task_file, "Generated from workflow."); }}
# Add xml summary to workflow if a task ID is available$task_id = $iw_arg{task};if(defined $task_id) { $task = new TeamSite::WFtask($task_id); $full_path_xml_destination =~ /.*\\(templatedata.*)/; $task_file = $1; set_task_file($task_file);}