Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
external_task or cgi_task?
andrew_yeo
i wish to excute a Perl script after certain Task Transition within a workflow. Should i use CGI-Task or External Task?
I tried both, it just stalled at the task. I checked the iwjoberrors.log, it says
"Could not run c:\iw-home\local\bin\whatsnew_indexer\GenerateIndex.ipl for task 115356; aborting (requires admin attention)"
What does it mean??? I tried the cmd offline and it works fine...
Find more posts tagged with
Comments
Migrateduser
The answer to your first question, whether you should use an external task or a CGI task, depends upon whether the user needs to interact with the task while it is running. If he does, then you'll need a CGI task. If not, just use an external task.
As to your second question... Are you running TS on windows or unix? My guess is that you are running on windows, and it is not starting the script because it is nor properly associating it with the perl interpreter. Try changing the command line to something like this:
<command v='d:\iw-home\iw-perl\bin\iwperl.exe d:\iw-home\local\bin\myscript.ipl'/>
Naturally, you need to modify that to reflect the installation directory of TS on your system, and the path to and name of your external task.
Cheers
Rob Huffstedtler
rob@bagpipe.com
andrew_yeo
thanks.
this is the command I used:
<command v='d:\iw-home\iw-perl\bin\perl.exe d:\iw-home\local\bin\whatsnew_indexer\WhatsNew.pl'/>
BUT it's not working... I thought I came across something which says I need to have a "CallBack" or something???
Migrateduser
Your command looks fine.
You absolutely need a callback. However, that's not your problem. If you did not have a callback you simply wouldn't transition to the next task. In your case, your script doesn't seem to be executing at all.
Try running it through the debugger and you might be able to isolate the problem. If you are on the machine where you are running you can use the Tk debugger for a reasonably decent graphical debugging interface. To do so, run it as:
iwperl -d
tkdb whatsnew.pl <wfid> <taskid> <vpath>
Generally, I find typing vpaths to be a pain so I always include this line in my external tasks:
$areavpath ||= $task->GetArea();
That way, if $areavpath is not set, it will make a call to the GetArea method of the task object to set it.
andrew_yeo
You're Right! I've got the CMD and the Callback correct....
It's my Perl program...it runs fine on its own. But when "integrated" to TeamSite, I actually need to specify "fullpath" for whatever that I was referencing in my program (e.g. my program config file). So by putting everything in absolute path, my program runs.
Took me quite a while to figure out....
Migrateduser
Sorry. Didn't even think to ask that. You should always use full paths in your external tasks, because the current working directory for them is not what you would expect. If I recall correctly, the current working directory is whereever the instantiator cgi lives.
Cheers
Rob Huffstedtler
rob@bagpipe.com