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)
URGENT: How to add a file during Workflow transit?
andrew_yeo
at some stage of the workflow, i would like to add a file automatically. i saw something on TeamSite::WFTask using AddFile($path, $comment). BUT i hav no idea how to where or how should i use it???...in external task, cgi-task, just where to put the code? what is $path and $comment (their syntax)???.... appreciate some help here.
thanks!
Find more posts tagged with
Comments
Jeremy
Hi,
You should use the $task->AddFile($file,$commentAdd); command inside of an external task. You'll be able to pull the JobID and the TaskID off of the external task - these arguments get passed to the External Task automatically within Teamsite.
use TeamSite::WFtask;
use TeamSite::WFworkflow;
my($wfid, $taskid, $area) = (
@ARGV[0
..2]);
my($task) = new TeamSite::WFtask($taskid);
my($job) = new TeamSite::WFworkflow($wfid);
$file = "filename"; $commentAdd = "comments";
$task->AddFile($file,$commentAdd);
That is something along the lines of what you are looking for. Have a play around and you should get it working.
Good luck!
Migrateduser
You can also do this from a cgitask script, but getting the JobID and TaskID are a little different.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
andrew_yeo
Thanks Jeremy...I'll give it a try.
you certainly gave more than what the IWOV docs can provide (i felt that they made it seemed like rocket science)...
Edited by andrew_yeo on 07/18/02 11:46 PM (server time).