How can a saved dcr be migrated to new DCT formats?Can it be automated?Teamsite ver. 6.7.2Guidance needed.
Your question is not very clear.As stated - the answer is "programmatically" - i.e. you write some code (perl, java, etc.) that somehow restructures the fields within the DCR to match some new DCT format - but this will only really work when you're talking about apples (Golden Delicious) and apples (Granny Smith) -- not too likely to work very well when you're talking apples and oranges.Perhaps you need to provide a [much] more detailed explanation of you are trying to do, and what issues you have doing it.
Initially I had a dct from which I created many dcrs.Afterwards I modified the dct.Now I want to createa perl script which will create new dcrs taking the values from previous dcrs and mapping it to the new dct format.
As has been mentioned you can do this - however I question the phrase "create new dcrs" - isn't it a case of "modifying existing dcrs" - or is the new DCT in a different branch and you're converting DCRs from one branch's DCTs to another branch's DCTs?Regardless - you should be able to do what you want with Perl using either XML parsing modules or possibly regex's (though you have to be more careful with the latter)
Thanks.I am using perl scripts to create new dcrs at the different branch as shown below :my $newdcr = "Y:\\default\\main\\One\\WORKAREA\\1_MTD\\templatedata\\bgc\\Draft\\newdcr";open NEWFILE, ">$newdcr" or print LOG "\nUnable to create new dcr \n";print NEWFILE $dcr_xml_code;close NEWFILE;But I am not able to create new dcr file at y: from the perl script.Though I have all the permissions on it.
Thank you.
Now I am able create dcr by setting the external attributes.I also want to set the Users, Roles and Groups access on the newly created dcr.Is it feasible through perl script?
Access to an "area" is controlled by user/group role assignments (which can be done through the GUI, through CSSDK [Java], or via CLTs [Perl, etc.])Access to a file is generally controlled at the file system level (which can be done through the GUI, through Java (not sure if CSSDK applies) or via CLTs)Access to a DCT-type is controlled via templating.cfgIs it feasible? - sure
For setting the EA, I am hardcoding the category Testing/Draft as shown below.Can I get it dynamically at runtime?my $command = IWHOME."/bin/iwextattr.exe";`\"$command\" -s TeamSite/Templating/DCR/Type=Testing/Draft \"$newDcrLocation\"`;
(my $dtype = $path) =~ s|^.*/templatedata/([^/]*/[^/]*)/data/.*$|$1|;
Well, assuming you've placed the dcr-to-be in the appropriate directory (e.g.: templatedata/Testing/Draft/data/...) then you could extract the data-type from the path itself - e.g.:(my $dtype = $path) =~ s|^.*/templatedata/([^/]*/[^/]*)/data/.*$|$1|;
Is it feasible to generate the HTML formatted code from plain text to be put in the visual editor item tags.So that when the dcr is opened it will show the formatted text in that particular item.
It is certainly possible. Please note though that if you do that two things will become your responsibility:a) Make sure that you generate correct UTF-8 Encoding b) "HTML Escape" VE Content's Tags so that overall DCR XML stays well-formed
Are there any APIs provided, that can be used to do New form entry from Perl script?
If you mean to launch a window with the desired DCT for creating a new DCR - there are CCI URLs that you can use (look in the TeamSite User Interface Customization Guide for details) - but this presupposes that the perl script in question is being run as a CGI.If you are talking about a command-line script to create a new DCR from a DCT - no, there's no API. You can create a shell of a DCR and programatically populate it, but you still have to set the proper EAs on it and such.