locked
How do I save the anchor attribute to my Connector Space when it is contributed by a Connected Directory for which I use an Extensible MA RRS feed

  • General discussion

  •   ILM Knowledge Bit

     The csentry anchor attribute is in fact writable in your Connected Data Source extension. So, when you commit your record to your connected directory using the CD's API calls, in general, your call will return the anchor attribute that the CD has generated.

    For ModificationType.Add in the export part of the ECMA code, commit the new entry to your connected directory using the API call for your connected directory, as you normally would. In the next line of code, write it's anchor value to the csentry as in the following example:

    If mt.Equals(ModificationType.Add) Then 
        thing = OtherApiThingFactory.Create() 
        thing.Save()
        csentry("someAnchorAttribute").Value = thing.ID 
    End If
    

    Now, special attention needs to be taken when creating your provisioning code: in normal circumstances, you would provide a value for the anchor attribute(s) when creating a new connector. In this case however, this anchor will be provided later on by your connected directory. ILM allows for this scenario. It is sufficient to provide a value for the DN of the new csentry object.

    In general, you will have code like the following in your provision method in your MV Extension:

    Dim csentry As CSEntry
    
    csentry = myMA.Connectors.StartNewConnector("object-type")
    
    ' The connected directory generates this value, so put a GUID here. After exporting and re-importing
    ' we will have our anchor
    Dim DN As ReferenceValue = myMA.EscapeDNComponent(System.Guid.NewGuid().ToString)
    
    Try
      csentry.DN = DN
      csentry.CommitNewConnector()
    
    Catch ex As Exception
      ' Log the error
    
    End Try
    

      

      Go to the ILM Knowledge Bit Collection

    Friday, June 11, 2010 8:47 PM