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)
Setting extended attributes
parsan99
Hi
I have a workflow for DCR creation. In this process, I need to read certain values in the DCR and set them as extended attributes to the DCR. I have an external task to do this job. In the perl file (called by external task) I use iwextattr command line to set the EA's. I have about 12 fields to set as EA's. Do I have to call iwextattr so many times to set the EA one by one?. I tried using iwextattr -s EAName1=value1 -s EAName2=value2 //IWSERVER/file.. It sets only the last value EAName2=value2. Any suggestions here will be greatly appreciated.
Thanks in advance!!
Find more posts tagged with
Comments
Migrateduser
Sorry, iwextattr only supports one attribute setitng at a time. You might want to open a support case so that this can get filed as a feature request.
There _is_ a Java OpenAPI function that will do this in one call, but the overhead of starting up a JVM from an externaltask is high for such a small job.
I think simplest way would be to write a little Perl function that would take a vpath to a file and a hash of name-value pairs, and apply the tuples represented by the hashset to the named file by calling iwextattr in a foreach loop.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
parsan99
Thanks for the information..
Adam Stoller
Actually, iwextattr has a '-f' flag that allows you to put multiple settings for the '-s' flag into a file and have it read.
This is still on a per-file basis (i.e. iwextattr only processes one file per invokation)
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
How does the -f flag work, Fish (or anyone)? I tried it, but the docs say it takes the -s value (singular) from stdin/stdout (which?). I tried it by redirecting from stdout using echo, etc, but didn't see anything (ie, no error but no change to attributes.)
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
Adam Stoller
My apologies - I misread the help usage - and shame on me even more - *I* filed a bug report about this (for performance reasons): 25629.
Customers who have an interest in this should contact Support and ask to be added to the list of interested customers.
Sorry for the confusion.
--fish
(Interwoven Senior Technical Consultant)