How do I pass a parameter to template file
Options
Hi,
I am using TeamSite 5.5.2 SP3 and Some patches on Solaris.
I am using Workflow external task to generate .mail file from DCR. I would like to pass one parameter (File path) to a .tpl file. In the .tpl file I would like to read that file.
Any help is appreciated .
I am using TeamSite 5.5.2 SP3 and Some patches on Solaris.
I am using Workflow external task to generate .mail file from DCR. I would like to pass one parameter (File path) to a .tpl file. In the .tpl file I would like to read that file.
Any help is appreciated .
0
Comments
-
What file path are you talking about? The DCR, PT, and/or output file are accessible within the PT using iw_perl directives (iwpt_get_dcr_name(), etc.)
If it's an arbitrary file - and you're using iwpt_compile.ipl - you might be able to use the -iw_pt-arg flag to pass in a file path (haven't used it myself, but I assume it allows you to do this kind of thing), however you'll also be responsible for setting TST EAs on the generated file yourself since iwpt_compile.ipl won't do that for you.
If you're using iwgen, you get the EAs for free, but you don't get to pass in a parameter. In that case you could have the externaltask set a specific EA on the DCR and have the PT extract it, or create a temporary file in the same directory as the DCR with a name like <dcr>.fname and have the PT slurp the information in from there or something along those lines.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com0 -
To receive an argument use the $iw_arg hash like so:
$filename = $iw_arg{"file"};
Where "file" is the parameter passed from the iwpt_compile.ipl script:
.... -iw_pt-arg file \"fullpathhere\"0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.