Home
TeamSite
File->Rename also updating Record Name?
System
We are on TeamSite 5.5.2 and TeamSite Templating 5.5.2 (browser interface) running on Solaris 2.7. We have noticed that renaming a DCR does not change the 'record name' value in the XML file. Only after editing and saving a renamed DCR is the 'record name' updated to match the new filename. Is this the expected behavior? The user has no control over the 'record name' value, and generally expects that it matches the filename. This causes us problems, because we use the Interwoven XML directly with our ATG Dynamo application server, utilizing the 'record name' as our key value for Dynamo. Users have become accustomed to using what they think is the "filename" to reference an XML file, when in fact Dynamo is using the XML file's 'record name'. Since the two usually match, it's usually not a problem. However, in the case of renamed files, user's are confused when they must use the "old" filename because the 'record name' has not updated. And they don't always save after a rename, so we can't assure the filename and record name stay in sync.
Interwoven Support has indicated that this is functioning as designed, and indicated that we could:
1) create an iwat trigger for a rename event that
quickly determined the whether the context was likely to be for a DCR -
and if so, process the file to update the record name field.
2) do this processing in a submit workflow - prior to the
submittask with an externaltask.
Has anyone implemented something like this?
Find more posts tagged with
Comments
Migrateduser
I have not done this before, but I would suggest using DCRnode.pm in a script / externaltask.
If you have not used it before, I have included a snippet from some code I wrote for parsing XML:
undef $/;
open(FILE, "<$file") or die "Failed to open $file\n";
$file_str = <FILE>;
close(FILE);
$/ = "\n";
my $xmltree = TeamSite:
CRnode->new($file_str);
my $start_date = get_dcr_value($xmltree, 'start-date');
This isn't exactly what you need, but I hope it helps.
In your case, you would use the set attribute function to set the record name attribute to the file name. You can do a perldoc on DCRnode.pm for more information.