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)
using iwgen
Renata
we're trying to have a workflow generate HTML documents:
1. author selects DCRs which triggers a wf
2. first task in that wf is to set metadata
3. once this is done, we'd like the WF to generate HTML documents
4. then an editor would receive HTML doc's for review.
I think we could use iwgen action. Has anyone done this? Is this an out-of-the-box script by anychance?
thnx.
Find more posts tagged with
Comments
Adam Stoller
iwgen would probably be the right way to go.
There isn't an OOTB script for this because the parameters you need to pass (and how you want to pass them) tend to vary greatly - not only from site-to-site, but even within a site from branch-to-branch and even from instance of workflow to instance of workflow.
Run iwgen with the '-h' flag to get the usage, figure out where you are going to retrieve the values you need for those parameters, and you should be set.
--fish
(Interwoven, Curriculum Development)
Renata
Fish - thanks for the info. Would you by any chance happen to have an example of how this can be implemented in a workflow?
I have set up an <externaltask> and use the <command> with __INSERT__ to call iwgen. We can probably figure out passing of the parameters when there's one dcr to deal with. Our porblem is that the bosses want more than one dcr being passed, any sugestions on how to create this iterative gen cycle and passing of the variables?
thanks
Adam Stoller
Don't call iwgen directly from within the wft using the command directive - instead you need to call a script from the command directive and have that script call iwgen.
If you have not done so yet, I suggest taking a look at the workflow tutorial documentation available on this site (DevNet - search for "workflow tutorial") - if you still don't understand, I would suggest you look into taking one or both of the workflow traiining courses we offer, possibly with the Perl course as well.
When you say more than one DCR being passed - do you mean more than one DCR connected to a single Job? How are these DCRs being added to the Job? I can only assume that the DCRs are being created from within the context of a workflow and that you are not initiating the workflow by closing the Edit DCR window - yes?
--fish
(Interwoven, Curriculum Development)
Renata
the workflow is initiated when authors submits their work (saved DCRs). Sometimes they will select one and other times they may select many dcr's in their WA then pick File>Submit which triggers the workflow (set metadata > generate HTML > push the HTML files to editor's wa)
I think I know what you mean with calling a script -- will try that --- Thanks
Adam Stoller
Okay that makes a bit more sense now - unfortunately it also means your script is going to become a bit more complex in order to handle it.
You need to determine how many (if any) of the files attached to the job are DCRs, and then for each DCR you need to put together the iwgen command, with all of its parameters, to generate output files using some prgrammatically generated filename (based on DCR name? a field in the DCR?, the current user and/or date? etc.)
Happy coding.
--fish
(Interwoven, Curriculum Development)