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)
question
raghavsrinath
Hi,
Can any one help me with this, I am as an editor sending a DCR as a task file to one of my author to update some content , The author updates the file and saves it and sends it back to editor , but the html page is not yet updated , do we have to explicitly go to the html page and regenrate it for every update , how do we corellate which DCR has generated which html page , can any one help me out with this
Thank in advance
Raghav
Find more posts tagged with
Comments
iwovGraduate
If you are using one of the default workflows, yes, you will have to explicitly regenerate the html page. You can set up an external task in your workflow to generate the page automatically. Send details of your workflow and we can give you suggestions. BTW, what version are you using ? Is the html file in the submitlist of your workflow or just the DCR ?
Another suggestion that might work, send the html file instead of the DCR to your author. When the author clicks the html file to edit, it willl open up the DCR. Instruct your author to generate the page after saving changes to DCR.
Migrateduser
Well.. normally what you would want to do is instead of attaching the dcr, you would instead attach the generated file to the workflow. Have the author edit the generated file (which will bring up the dcr editor and the dcr associated with the generated file).
Makes more sense than trying to trace down what file was generated from one dcr (dcr's could be used to generate multiple files there is nothing tying the dcr to a specific generated file, but rather the other way around).
now you could add something custom say like build a static file that catalogs all files generated from a dcr or set your own EA's on the dcrs that will point to all of the generated files. The problem then becomes in managing this index. There is nothing built into templating that will keep track of this for you.
Personally building an index manifest for each dcr seems much easier to use. If that is the case then you would just need to customize your workflow to look to see if the file being edited is a dcr (iwextattr -l) then you can store the manifest file for the dcr in some convenient known place. After your author edits the dcr then just read the dcr in an external task and regenerate all generated files based on that dcr (and of course do things like attache them to the workflow so they can later be submitted, etc).
Bowker
We have automated the attachment of the DCRs to workflow from attached documents.
The generated .HTML file is attached by the Author/Editor
The next step in the workflow is to look through all the attached files' extented attributes. If there is a DCR associated with the document, then attach the DCR and continue. That same process could say "attach DCR and regenerate .HTML"
Our bigest problem was people who submitted the HTML without the DCR, things would get out of sync. This process eliminated the issue.
mogoo
bowker-
How does one "look through all the attached files' extended attributes"? Would you mind posting a code snippet of what this script looks like? Also, I'm trying to find meta info that was entered through Meta Tagger... looking through the extended attributes would probably find it, too. Have you ever done that?
Thanks,
maureen
Variables.png
iwovGraduate
You can use something like this:
-------SNIPPET------------------------------
#!../../iw-perl/bin/iwperl
##-------------------------
## Required includes
##-------------------------
use TeamSite::WFtask;
use TeamSite::WFworkflow;
use TeamSite::Config;
##----------------------------------------------------------
## Set some environment variables
##----------------------------------------------------------
my($jobid, $taskid, $area) = (
@ARGV[0
..2]);
my $iwhome = TeamSite::Config::iwgethome();
my $task = new TeamSite::WFtask($taskid);
(my($iwmount) = TeamSite::Config::iwgetmount()) =~ tr|\\|/|;
my
@files
;
if ($task->IsValid())
{
@files=$task->
;GetFiles(); # get the files in submitlist
foreach $f(
@files){
# iterate through all the files
my $extattrCMD = "$iwhome/bin/iwextattr -g TeamSite/Templating/PrimaryDCR $area/$f";
# Note: $area/$f should be valid full path to the file.
# See "iwextattr -h" for help of iwextattr command.
my $result = `$extattrCMD`;
# Insert code to check $result
# If ext attr is valid, Insert code to add file to submit list
# Also it would be a good idea to check if the DCR file exists.
}
}
-------END SNIPPET--------------------------
Note: This is an example of an external task located at <iw-home>/local/bin
Disclaimer: Treat the above snippet as pseudocode. Syntax not checked.
Hope that helps.