Hi,
I need to write an ipl file from a perl file. I have a pl file which simply writes arguments to a text file.
I need to call this from a WF, so I am trying to convert the pl file to an ipl, looking at the send mail ipl file as an example. It doesnt work though. It looks something like..
use TeamSite::WFtask;
use TeamSite::WFworkflow;
use Getopt::Long;
use TeamSite::Config;
#use TeamSite::WFnotify;
use strict;
my $VERSION = "5.5.2 Build 9275 REL Interwoven 20020617";
(my $iwhome = TeamSite::Config::iwgethome()) =~ tr|\\|/|;
(my $iwmount = TeamSite::Config::iwgetmount()) =~ tr|\\|/|;
my(%opts) = (
'a' => undef, # attachement(s) [not-implemented]
);
my(%hash) = (
);
my($wfid, $taskid, $area) = (
@ARGV[0..2]);
@hash{"wfid", "taskid", "area", "job", "task"} =
(
@ARGV[0..2],
new TeamSite::WFworkflow($ARGV[0]),
new TeamSite::WFtask($ARGV[1]));
$hash{area} = $hash{task}->GetArea();
$hash{area} =~ tr|\\|/|;
usage() if (!defined($opts{t})); # || !defined($opts{N})); #=# required?
$hash{url} = get_url();
open (FILEOUT, ">>/opt/teamsite/iw-home/local/config/wft/test/test.dat") or die "Cannot open file: !";
print FILEOUT "$ARGV[3]"."/"."$ARGV[4]\n";
close (FILEOUT);
$task->CallBack(0, "Completed file writing");
When I execute this frm the command line, it gives error for that the task needs a package.
While if I just execute the pl file from a WF, the external task doesnt close.
Pls suggest where I am going wrong.
Thanks,
Abhi