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)
template script - include type functionality
kellyrmilligan
I am wanting to "componentize" my workflows so that the things that do not change between all of them are just included into the template. I figure I should put something inside of a templatescript block that would print out the code I need. any suggestions on this? I thought I would just make various ipl's that have print statements in them, and then execute them, sort of like an inline command on templating.
Thanks,
Kelly
Find more posts tagged with
Comments
gzevin
you are mixing 2 things I believe. In WFTs it is done by writing code to a variable and the ising __INSERT__ tags to put it in a right place.
some OOTB workflows have such fgunctionality I believe
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
kellyrmilligan
Yes, I have that, but what I want to do is put my generic tasks that I use everywhere into separate files, and call the contents in, sort of like how an SSI works on a website. so far all I have is reading in the file and looping through. But I would like to do this for all those crazy functions at the top of the workflow as well, just so the main part of the .wft file is what pertains to the workflow.
QR Test.pdf
gzevin
well, in workflow you have perl script, right? so use perl methods to get the functions, e.g.
use
require
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Migrateduser
Here is how I would go about it.
1. create your own perl module which will have methods like
get_approval_task(), get_my_mail_task() etc.
IMP: don't include any print statements as those will never go to the job spec file that gets created in the end.
2. From each of your wft file import the perl module and use the methods in this format:
__INSERT(get_approval_task());
Bill Klish
To take your recommendation one step further, I would create placeholders within your perl methods that can be replaced with the actual values, like owner, areavpath, etc. Just use simple perl regex manipulations. You will want to do this for your predecessors and successors as well.
gzevin
Don't we have something called 'variables' in perl instead of placeholders?
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Bill Klish
sorry for the poor word choice, that is what I meant.