Hi there, I would like some assistance with devleoping an external task that is intended to be run as part of our Teamsite workflow.
The task itself is used to replace some commonly misspelt words with the correct spelling. I have managed to get the script working fine however I have across an bit of an issue.
I am reading the filename supplied by the workflow however when I make changes to it these changes are being made in the workarea and are not being attached to the workflow task.
I have tried the following code to no avail. The files are being sucsessfully altered, and the task is being reported as completing sucsessfully however the version in the workarea is v+.
TeamSite::WFtask::RemoveFile($dcrfile, "\"File contained illegal wording\"");
TeamSite::WFtask::Refresh();
Here is a few more lines to help understand the context of my problem.
foreach $dcrfile (@files){
my $vpathfile = $dcrfile;
$dcrfile = "Y:$workarea\\$dcrfile";
## Run through each version of the find / replace options agianst current file
while (($find, $replace) = each(%match)){
## (rc) holds the number of substutions made
my $rc = FindReplace($find, $replace, $dcrfile);
if($rc > 0){
push(@comments, "\"Replaced: \'$replace\' with \'$find\' in file \'$dcrfile\'\"");
TeamSite::WFtask::RemoveFile($dcrfile, "\"File contained illegal wording\"");
TeamSite::WFtask::Refresh();
}
}
}
Any assistance you can offer would be greatly appreicated.
Thanks in advance

Tim