Hi i am trying this just before the end of workflow. and i get so many comments for each task and repeated stuff.
#!D:\Interwoven\TeamSite/iw-perl/bin/iwperl -w
use TeamSite::Config;
use TeamSite::WFtask;
use TeamSite::WFworkflow;
my($jobid,$taskid,$waPath) = ($ARGV[0],$ARGV[1],$ARGV[2]);
my $iwmount = TeamSite::Config::iwgetmount();
my $iwhome = TeamSite::Config::iwgethome();
my $log_file="$iwhome/tmp/centraldesktop.log";
open(LOGF, ">$log_file") || die "Cannot open log file $?\n" ;
my $job = TeamSite::WFworkflow->new($jobid);
my $ctask = TeamSite::WFtask->new($taskid);
my $tasklist = $job->GetTasks();
foreach $task (
@$tasklist){ my $tID = $task->GetId();
$task->GetComments(\
@list) ;
print LOGF "$tID\n";
foreach my $entry (
@list) {
print LOGF $entry->{'body'}."\n";
# print LOGF $entry->{'date'}."\n";
}
print LOGF "---------------------------\n";
}
my $CentralDesktopID = $job->GetVariable("CentralDesktopID");
print LOGF "$CentralDesktopID\n";
close (LOGF);
$ctask->CallBack("0","success");
how to make it consistent