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)
How to add ostream generated file in to workflow?
MikaV
Hi
TS5.52 and Solaris
I have presentation template where I use iw_ostream to generate another file.
<iw_pt name="foobar">
<html>...</html>
<iw_ostream file="{iw_value name='$file'/}.html"> # $file comes from the dcr
some html...
</iw_ostream>
</iw_pt>
Is it possible to add iw_ostream generated file in the workflow from the tpl? I tried something like this between </iw_ostream> and </iw_pt>, but didn't get it work. Something wrong in the code or am I trying to do something impossible?
<iw_perl><![CDATA[
use TeamSite::WFtask;
my $taskid = new TeamSite::WFtask($ARGV[1]);
my $task = Teamsite::WFtask->new($taskid); # this is the line where the error becomes
$task->AddFile("/default/main/.../$file.html", "comment"); # html file is generated using iw_ostream
]]></iw_perl>
I guess the other way to add file in to workflow could be external task, but how to pass file's name from the tpl to the external task?
Mika Vilkko
IT Optimo
Finland
Find more posts tagged with
Comments
Johnny
$task->AddFile
requires a filename that is relative to the workarea.
IE
$task->AddFile("/htdocs/file.html", "comment");
not
$task->AddFile("/default/main/.../$file.html", "comment");
Your workflow would have to be specific to the template so that you can hard wire these files into the workflow.
If you use an external task to generate these files, you can use the manifest option in iwpt_compile to retrieve which files were generated and then add them to your workflow. Ofcourse you will need to set the EA's if you use iwpt_compile.
(iwgen doesnt have the manifest option)
John Cuiuli
Consultant
Sydney, Australia