Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2012-11-28T20:24:11Z by SystemAdmin
NateD
NateD
4 Posts
ACCEPTED ANSWER

Pinned topic FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

‏2012-09-18T14:42:04Z |
ICI Version: 8.6
IDM WebServices; 4.0.3 fp1
FileNet CS

To whom it may concern,

Attempting to integrate Java application with Content Services using the ICI and encountering an issue while updating Document class attributes. I am able to:
a) Set and update custom attributes (like idmDocCustom4, idmDocCustom5)
b) set idmName using the com.venetica.vbr.client.Content.setName() method

What I'm not able to do is to set the idmComment attribute.


com.venetica.vbr.client.Content content = connectionModel.getRepository().getContent( 
"001234567", 

null );   
//--------------------------------------------------- 
//  Following comments RETRIEVES and displays the values with no issue logger.info( 
"    idmComment: " + content.getPropertyByName( 
"idmComment" ).getValue() ); logger.info( 
"    idmDocCustom5: " + content.getPropertyByName( 
"idmDocCustom5" ).getValue() );   
//--------------------------------------------------- 
// Following code will SET idmDocCustom5, but will NOT 
// set idmComment content.getPropertyByName( 
"idmComment" ).setValue(
"Value A"); content.getPropertyByName( 
"idmDocCustom5" ).setValue(
"Value B"); content.update();


A couple of items to note:
1) The appropriate attributes are mapped in CS Explorer to the custom document class
2) As shown above, the attributes are programmatically retrievable.
3) The user account performing this update can log into IDM Find and modify the Comment section with no issue. (so it's not an attribute permission issue.)
If there is some setting that prevents generic document class properties from being set using ICI, please advise. Thanks in advance.
Updated on 2012-11-28T20:24:11Z at 2012-11-28T20:24:11Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    254 Posts
    ACCEPTED ANSWER

    Re: FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

    ‏2012-09-18T17:58:48Z  in response to NateD
    Hi,
    As a general practice, you should call content.getCanUpdate() before updating.

    In addition to that, some properties are read-only even if the user has permissions on the documents. Could you verify that the property is writeable?

    You can do this by checking the property description of the property -> content.getPropertyDescriptionByName(propName).

    Thanks.
    • NateD
      NateD
      4 Posts
      ACCEPTED ANSWER

      Re: FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

      ‏2012-09-18T19:20:07Z  in response to SystemAdmin
      Keke,

      Thanks for the insight. I actually started heading down that path and saw that for some reason, it was marked as read only.

      
      content.getCanUpdate()
      

      returned true

      
      content.getPropertyDescriptionByName( 
      "idmComment" ).toString()
      

      returned:
      
      name=idmComment label=Comment description=
      
      null type=STRING multivalue=
      
      false extendedType=NONE editor=2 availableValues=
      
      null inputRequired=
      
      false readOnly=
      
      true queryable=
      
      true selectable=
      
      true systemProperty=
      
      true minimum size/value=not set maximum size/value= 2000 supportedOperators=[Like] displayOrder=-1 defaultValue=
      
      null
      


      What perplexes me is that I don't know where that is set.

      1) I can open the object properties using IDM Find with the same user and the attribute is not read only. I can set it and save it at will.
      2) If it was the Read only that was causing the issue, I think i should expect the COEN2328E: Cannot update FileNet read-only or custom-defined property: {0}. error
      3) I tried various ways to programmatically turn it off, but it doesn't appear to work.

      
      content.getPropertyDescriptionByName( 
      "idmComment" ).setIsReadOnly( 
      
      false ); content.getPropertyDescriptionByName( 
      "idmComment" ).setValue( 
      "Try it again" ); content.update();
      


      If you have any ideas within the ICI connector or CS to make this system property "Writable" it would be greatly appreciated.
      • NateD
        NateD
        4 Posts
        ACCEPTED ANSWER

        Re: FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

        ‏2012-09-18T20:30:11Z  in response to NateD
        One other thing of note:

        In the ICI Administrative Tool, I was able to bump up the logging level and was able to capture additional information:
        
        com.venetica.vbr.ejb.bridge.panagon.PanagonBridge --> update(IContent)-Begin com.venetica.vbr.ejb.bridge.panagon.PanagonBridge --> updateDocumentFromContent()- Begin with _tyUpdateException = 
        
        true com.venetica.vbr.ejb.bridge.panagon.PanagonBridge --> updateDocumentFromContent() - Skipping property since it is read only or a system property. com.venetica.vbr.ejb.bridge.panagon.PanagonBridge --> updateDocumentFromContent() - Skipping property since it is read only or a system property. com.venetica.vbr.ejb.bridge.panagon.PanagonBridge --> update(IContent)-End 
        
        return with ID = 003790134
        

        Again, programmatic setting of PropertyDescription.setIsReadOnly(false) and PropertyDescription.setIsSystemProperty(false) has no effect. I don't have a custom Data Map set up, but even with the ones I tried, it still failed.
        • SystemAdmin
          SystemAdmin
          254 Posts
          ACCEPTED ANSWER

          Re: FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

          ‏2012-09-18T23:21:20Z  in response to NateD
          Hi Nate,
          The reason we don't throw an exception is so that other properties/changes can be updated even if one property fails to update. However, we have the logging so that users know what properties didn't update, and why.

          The only properties we allow to update via ICI are custom (user-defined) properties. It seems idmComment is a system property (!fnpd.getState(idmPropDescState.idmPropCustom)). Could you confirm that? I'm not sure how you can see system properties in IDM Find because I only see custom properties using both IDM Find and Viewer.

          Thanks.
          • NateD
            NateD
            4 Posts
            ACCEPTED ANSWER

            Re: FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

            ‏2012-09-19T12:11:31Z  in response to SystemAdmin
            Kechy,

            Thanks once again for your response. To confirm idmComment is a system properyt, the dump of the ICI PropertyDefinition class shows both systemProperty and readOnly flags to true. To help put into context, I've attached a JPG with 2 screenshots from the system (blocked out some system specific information).

            The first is from CS Explorer. To the left, you can see I've circled 2 custom attributes checkedOutUser and GUID) which i've selected to view in the CS Explorer Document Class editor. The Document Class editor also allows me to specify what fields are visible and in what order they are visible in editors like IDM Find.

            The second screenshot is from IDM Find. Here you can see that most of the system attributes are "Read Only" since they are populated by system processes. However, the Comment field and Version Comment fields are editable just like the custom attributes since they are not system populated. You can see I was able to populate the comment fields manually through the IDM editor, but not through ICI.

            This leads to the dillemma that system properties like idmName, idmComment, and idmVerComment are not system populated, but need to be populated by a user. Is there a way to override the restrictions on system properties?
            • SystemAdmin
              SystemAdmin
              254 Posts
              ACCEPTED ANSWER

              Re: FileNet CS : ICI - Unable to update generic Doc Class atts like idmComment

              ‏2012-11-28T20:24:11Z  in response to NateD
              Hi Nate,
              Sorry for the slow response.

              Unfortunately our CS and IS connectors are designed to treat all system properties as read only. If you want us to investigate further we would need you to open a PMR for this to determine if a fix or feature request is needed.