< iw_perl> < ![CDATA[ my $outputName = iwpt_get_ofile_name(); my $dcrName = iwpt_get_dcr_name(); my $param = iwpt_get_flag_param('-oprefix'); if($param eq ''){ updateDCR($outputName,$dcrName); } sub updateDCR { my $htmlname = shift; my $dcrname = shift; my $cmd; $cmd = "iwextattr -s HtmlLocation=$htmlname $dcrname"; `$cmd`; } ]]> < /iw_perl>
< externaltask name = "AttachHTML" lock = "f" owner="__TAG__('iw_user');" start = "t" description = "Attach Daily News Page"> < areavpath v = "__INSERT__($iw_area_vpath);"/> < successors> < successorset description = "Go to Submittask"> < succ v = "Submittask"/> "); for (my $i=0; $i < @submit_file; ++$i) { __INSERT__(" "); } __INSERT__("\n\t"); } ]]>< /template_script> < /externaltask>
#!/teamsite/iw-home/iw-perl/bin/iwperluse TeamSite::WFtask;use TeamSite::WFworkflow;use Mail::Mailer;use Getopt:td;use TeamSite::Config;my $VERSION = "4.5.1 Build 2065 SYM Interwoven 20001027";my $iwhome = TeamSite::Config::iwgethome();my $iwmount = TeamSite::Config::iwgetmount();my $hostname = TeamSite::Config::hostname();my $debug_output = `$iwhome/bin/iwconfig iwsend_mail debug_output`;$debug_output =~ s/\n$//;####################################################################################### Read in site specific configuration information######################################################################################getopts("hv");die("$0 v. $VERSION\n") if ($opt_v);die("Usage: $0 [(-h|-v)][-H] userid wfid taskid arevpath\n") if ($opt_h);my $wfid = $ARGV[0];my $taskid = $ARGV[1];my $area = $ARGV[2];my $task = new TeamSite::WFtask($taskid);my $job = new TeamSite::WFworkflow($wfid);debug("hostname = $hostname\n");$fullarea = "$iwmount" . "$area/";my(@iw_files, $iw_files);map { push(@iw_files, "$fullarea$_"); } $task->GetFiles();$iw_files = join("\n", @iw_files);print "$iw_files is the list of files \n";debug("iwhome = $iwhome\n");debug("iwmount = $iwmount\n");debug("taskid = $taskid\n");debug("wfid = $wfid\n");debug("area = $area\n");debug("files = $iw_files\n");$location = `/$iwhome/bin/iwextattr -g HtmlLocation $iw_files 2>&1`;$location =~ s/\n$//;debug("HtmlLocation = $location\n");my $htmfile = "";my $comment = "HTML_file_from_DCR";#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$location =~ /^(\/.iwmnt)($area)\/(.*)$/;my $htmfile = $3;$task->AddFile($htmfile,$comment);#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$debug("htmlfile = $htmfile\n");$task->CallBack(0, "Completed");sub debug{ if ($debug_output) { print STDERR @_; # Just return if it fails to open debug file open (OUT, ">>$debug_output") || return; print OUT @_; close OUT; }}
< !-- ========================== Attach HTML ========================== --> < externaltask name = "AttachHTML" lock = "f" owner="__TAG__('iw_user');" start = "t" description = "Attach Daily News Page"> < areavpath v = "__INSERT__($iw_area_vpath);"/> < successors> < successorset description = "Go to Submittask"> < succ v = "Submittask"/> < /successorset> < /successors> < command v = "__INSERT__($hf_scripts);/attach_html.ipl"/> < template_script> # insert file list if we have it if (__ELEM__('iw_file')) { __INSERT__("< files>"); for (my $i=0; $i < @submit_file; ++$i) { __INSERT__(" < file path='$submit_file[$i]' comment='task file'/>"); } __INSERT__("\n\t< /files>"); } < /template_script> < /externaltask> < !-- ================================================================= -->