Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
workflow scripts
Ottawa_IWOV
Does anyone know how I push the files from a workflow to a script that needs to be run as part of the workflow?
Thanks.
Lucas Cochrane
lcochrane@dc.com
Find more posts tagged with
Comments
Migrateduser
Assuming you are talking about an externaltask script, there are 2 ways:
1) my ($jobid,$taskid,$area,
@files)
=
@_
;
The filelist is always automatically passed to externaltask scripts as the 4th standard parameter. Note if you pass additional parameters, they will be passed in front of the standard ones, so the index is relative.
2) my ($jobid,$taskid,$area) =
@_
;
my $task = WFtask->new($taskid);
my
@files
= $task->GetFiles();
Use the WFtask->GetFiles90 method. This way is most desirable if you have enormous filelists. It also works in cgitask scripts.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Ottawa_IWOV
I have a weired workflow issue. My script is running nicely from the command line with jobid, taskid and area vpath as the arguments. But it does not seem to run from the GUI driven interface..
What could the problem be here?
Thanks
Lucas Cochrane
lcochrane@dc.com
Migrateduser
Lucas,
Could you explain what you mean by running your script from the GUI driven interface? Are you trying to use the script in a CGI task?
Brinko Kobrin
Interwoven Staff Engineer
Ottawa_IWOV
when I run it by workflow (i.e. submit, pick a template, run job) the script doesn't execute. When I look at y:\ driv activity it shows iwgetmount.exe searching for a path, but doesn't find anything. The task complete (wuth no result), then goes to the next task (external task) that successfully run a script. I don't know what I could be missing.
But when I run the task from the command line, passing job id task id and area vpath it works like a charm
Lucas Cochrane
lcochrane@dc.com
Migrateduser
I'm sorry, but I am still not clear on how you are trying to execute your script. Is it being used as the command on an external task? If so, are you sure that it is not running? Unless an external task has a timeout, the task will not normally complete (i.e., transition) unless the system has executed the task.
Perhaps it would help if you could post your workflow and script (as attachments). That should give us a better idea of what you are doing.
Brinko Kobrin
Interwoven Staff Engineer
Ottawa_IWOV
Thanks
Lucas Cochrane
lcochrane@dc.com
Ottawa_IWOV
the first is my script, the secvond is my workflow. I think that it doesn't like my sub otherFile, when I throw print statement inside that sub I am getting empty variables
Lucas Cochrane
lcochrane@dc.com
Johnny
I only had a brief glimps at the external task script and couldnt see where the callback was.
You need to execute the $task->CallBack method for the task to transition.
#$task->CallBack(0, "Success building other MetaData");
#exit(0);
It looks to be commented out in your script.
Mind you that was all I was looking for. I have no idea if the rest of it works.
John
Sydney, Australia
Adam Stoller
I'm not sure why it's not running - but you really need to start using:
iwperl -w -c
scriptname
to verify the cleanliness of your code.
--fish
(Interwoven Senior Technical Consultant)