Friday, January 21, 2011

UCM 11g: Desktop Integration Suite Walkthrough - Adding custom metadata to Office properties



Here’s a quick post to show the added power of the DesktopTag component which comes bundled with the Desktop Integration Suite.

DIS 11g allows for much more dynamic and flexible handling of native content. One of the mechanisms used to do this is Outside In’s BitLocker SDK (acquired by Stellent in 2006). The containing jar can be located here:

../<middleware_home>/Oracle_ECM_prod/ucm/idc/components/OracleCleanContent/libs/java/CleanContent.jar

This SDK is typically used by UCM to clean content of hidden metadata, revisions, comments, etc; but, in this case, it is being used to embed metadata information into the content’s native format.

The metadata usually embedded by the DesktopTag component are:



  • DISidcName
  • DISdID
  • DIScgiUrl
  • DISProperties
  • DISTaskPaneUrl
  • DISdUser
  • DISdDocName



All of these are what you expect them to be, except the TaskPaneUrl, which is a url to the DESKTOP_DOC_INFO service for the specific document.

These variables work together to determine the validity of the current doc compared to the version currently within the content server. For more information on DIS and its new features, please see:

http://download.oracle.com/docs/cd/E14571_01/doc.1111/e10624/c01_introduction.htm#BABHAEHF
 






Now that we’ve had a quick peak under the covers of DIS, let’s see how we can leverage that for our own custom metadata.




The DesktopTag component sets a number of environmental variables. One of the variables is DesktopTagFieldsCustom, but it’s currently commented out. So let’s create our own component to set this variable.

You can get a look at my sample component here.

This component overrides all values to allow testing, but specifically, focus on the following:


DesktopTagFieldsCustom=xComments,xkeywords(Keywords)

This test implements two different syntax options: standard & special syntax, as defined in the original cfg:
# Special syntax: binderName(propertyName)
# Example: dID(DISMyId) will create a custom property named DISMyID with
# the value of dID.


For our customization, we’re adding xComments and xkeywords to the list of embedded metadata. We want to leverage this metadata, which is managed within the content server, within our native content. I will be demonstrating using Microsoft Word, but this technique should work with any compatible application.




  • To start, let’s create a new blank Word document




  • Now, let’s add some static text.


I have added some static text to the header & body


  • At this time, we'll add a quick part for the keywords. This is a standard Word property.
    • Place the cursor after the "Keywords:" text
    • Click on the Insert Word Ribbon (i.e., the menu tab)
    • Click on  Quick Parts à field










      • Could also shortcut buy using Quick Parts à Document Property à Keywords
    • Click on “DocProperty” in the Field Names list
    • Click on “Keywords” in the Property list
    • Click Ok


  • Note: Nothing appears immediately in the document as there are no keywords assigned

  • Commit doc as new to UCM, applying metadata as it is checked in. specifically the comments and keywords.



  • Open the document from UCM


  •  Note: Nothing appears in the document, but this time it’s specifically due to Microsoft Word not auto-updating Quick Parts
    • Out of the box, Word would require right-clicking and manually updating each field.

  • Now that we have opened the document via DIS, our custom UCM metadata have been applied as Word properties


    • Notice the value of “under review” for the DISCxCo… property
    • Also notice that because we targeted our custom UCM metadata at a standard Word property, it appears in the standard field


  • Let’s add our custom property now:
    • Place the cursor after the “Status:” text in the header
    • Click on the Insert Word Ribbon (i.e., the menu tab)
    • Click on  Quick Parts --> field
    • Click on “DocProperty” in the Field Names list
    • Click on “DISCxCommets” in the Property list
    • Click Ok 



  • Now both of our values are showing in the document 



  • To show the lack of auto update, let’s save the document and update the metadata
    • On the Oracle UCM ribbon, click Check In With Metadata
    • Alter the Comments & keywords 


    • Click Ok
  • Re-open the document from UCM
    • On the Oracle UCM ribbon, click Open
    • Search for your document
    • Select it to be opened

  • Notice that the metadata values did not update automatically.
  • It appears that this is a often encountered issue as Microsoft has put out a support article addressing it.
    • http://support.microsoft.com/kb/832897/en-us
    • We will use the Method 2 workaround, Creating a macro to automatically update the field
    • The step-by-step procedure is listed on Microsoft’s site, so I’ll skip that for now 



  • Save & reopen from UCM

  • Notice that the metadata is applied automatically. 




Thanks it, now we have a word document that receives updates from UCM during each re-open. This ensures that any metadata applied to a document is current during each edit session.


Get a copy of the SenaDIS component here.


Thanks again for reading & I hope you've found some part of this useful and perhaps even reusable.


Disclaimer: The code, opinions, and other content on this page are my own and are not necessarily representative of my employer. There is no expressed support for any code contained herein. Most code supplied within these pages has been created to proof out a specific concept or to show a specific case. No code should be considered production-ready without your own testing and validation.

5 comments:

  1. Wardha IT Park provide space for rent for offices, if you are interested then visit Wardha IT park. Thanks!!

    ReplyDelete
  2. Thanks for sharing the post.Commercial space available for rent at Wardha IT Park at affordable prices.

    ReplyDelete
  3. From this site you will get all the information you need to write good compare and contrast essay. I think that it could be really helpful

    ReplyDelete
  4. which makes the owner of the house in a state of constant anxiety and tension, should suffer from this problem quickly contact one of the pest control companies to resolve them permanently
    شركة رش مبيدات بالمدينة المنورة
    كيفية صنع مبيد للنمل بالمنزل
    المبيدات الحشرية الكيميائية

    ReplyDelete
  5. Just that type in the elevate by myself with the lady pictured in the place lobby,Your ex pictured at the health club was being in simple terms one of the several who accidently required signed items pictures,Specific extensive journey is a sme and my peersar to protect on.

    LoginThis is needed to sign in the HubPages internet New Jordan Shoes solution. The interceded for some serious one that helped me to. Darker skinned african american celebrities are presumed a great deal private while compared to light in weight air force 1 in store skinned are viewed have a great who splendor to crossover..

    We right made a touch of money along with man or women defined, "This business Sobell, They take advantage bouzouki internationally, I believe, Back then, That Cheap Ray Ban Sunglasses it had become a handsome profit. N't any information is replied should you don't engage this show.

    Your ex boyfriend preferred it dan with his residence form a gospel quartet and participate in unique troubles(That craig often times sings in the bottom ture over your concerts).. I'm absorbing 25K IU necessary nourishment in q, According to details i've come across from the brazilian during 2 numerous. Coach Outlet Store

    That it's considered unfortunate realism of contemporary western record which often manipulates Cheap Yeezys For Sale the Michael Kors Outlet Sale truth as well as noise level currently important to Republican national nation-wide state policies, Principally the end the particular harsh showdown..

    For that third amount of in time five months, Goaltender Pekka Rinne is Jordan Shoes For Sale known as a finalist with regard to Vezina prize correct suitable immediately tying or braiding for second into the NHL in is victorious(41), Score third in wishes up trying to fight mediocre(2.18) And even seventh at aid ratio(.923).

    Energy trailers capped who has solid lumber are protected to will protect you from the weather and furthermore markedly offer lifespan of a clip. Those leading tasks were originally indeed split up, By using Tykwer taking on i would say some sort of exotic fable of an taking once life gay and lesbian composer in 1936, An exciting adventure created by predicament atomic conspiracy in 1973(Motive for getting the best) And todays witty melodrama in regards to Cheap Yeezy Shoes broken greater manchester founder jailed on the inside a intellectual healthcare, While Wachowskis treated both a time long ago and more distant success..

    ReplyDelete