If you want to do this in your DCT logic, you're probably going to want to do this with an "onSaveDone" eventHandler and a callServer.But if your DCR creation is done as part of a workflow, your first external task after the DCR has been attached to the workflow can set the desired EA.And for future reference, this post probably should have been made in the TeamSite FormsPublisher (Templating) Forum.~Jeff
Below is my script:#!d:/Interwoven/iw-home/iw-perl/bin/iwperl...use strict;use warnings;...my ($wfid, $taskid, $workarea, @files) = @ARGV;my $task = new TeamSite::WFtask($taskid);my @files = $task->GetFiles();(my $area_vpath = $workarea)=~ tr/\\/\//;...$task->CallBack(0, "Completed Setting EAs");
#!d:/Interwoven/iw-home/iw-perl/bin/iwperl...use strict;use warnings;...my ($wfid, $taskid, $workarea, @files) = @ARGV;my $task = new TeamSite::WFtask($taskid);my @files = $task->GetFiles();(my $area_vpath = $workarea)=~ tr/\\/\//;...$task->CallBack(0, "Completed Setting EAs");
...my ($wfid, $taskid) = @ARGV;my $task = TeamSite::WFtask->new($taskid);if (!$task->IsValid()){ # error}(my $area_vpath = $task->GetArea()) =~ tr|\\|/|;my @files = $task->GetFiles();...
@files
Fish,You are correct, I went back and looked my code and discovered I copied from one of the versions I saved. The last known working version that I have has the following code: my ($wfid, $taskid, $workarea) = @ARGV;my $task = new TeamSite::WFtask($taskid);@files = $task->GetFiles();(my $area_vpath = $workarea)=~ tr/\\/\//;Based on my research, I find that every external task gets three variables pass in automatically by the system which are wfid, taskid and workarea.