Home
TeamSite
Problem in running the script through external tas
sanjeevappa
Hi,
When i run iwsend_mail.ipl through exteranal script iam getting mail, for this syntax used by me is:
C:\iw-home\iw-perl\bin\perl C:\iw-home\WFScripts\iwsend_mail.ipl x@y.z
This is the line i have given in command of external task.
But my problem is when i run same iwsend_mail.ipl through some other file i am not getting the mail : The code of file is :
#!/iw-home/iw-perl/bin/iwperl -w
my $fh="C:/iw-home/file.txt";
open OUT, ">>$fh" or die "Cannot open $fh for write :$!";
$notify='x@y.com';
print OUT "TWO";
`C:/iw-home/iw-perl/bin/iwperl C:/iw-home/bin/iwsend_mail.ipl "$notify"`;
#print OUT "$test";
print OUT "TWO";
Here the file file.txt is created with two and one but iam not getting mail .
The version of team site is 6.0 on windows 2000.
Any help will be appreciated.
San
Find more posts tagged with
Comments
Adam Stoller
You need to read up on how externaltask scripts are executed - either in the manual or the
workflow tutorial
Although I should probably just stop there - and let you do your own homework - someone else will surely chime in with the answer so I might as well say it here.
All externaltask scripts are passed certain command line arguments by the workflow engine - which include, in order:
the jobid
the taskid
the areavpath associated with the task
[optionally, but by default] a list of area-relative paths to files associated with the task.
All
other
command line arguments (specified in the
<command v="...">
string)
precede
the above command line arguments.
If you are trying to call the script yourself, then depending on how the script is written - you must
at least
provide the jobid and taskid -- if you look at the code of the script you are calling you should be able to determine whether that is sufficient or if you need to pass the areavpath as well, and/or if you need to pass the area-relative paths to files associated with the task.
If you are trying to use the script for sending email
without
a workflow association -- it will
not
work -- you would need to create your own email script for that purpose.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
Adam... a good samaritan.... IMO, RTFM would just suffice
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU