none
ECMA 2 not giving me all attributes in PutExportEntries with capabilities set to MAExportType.ObjectReplace RRS feed

  • Question

  • Hi,

    I have a ECMA 2 MA and I'm trying to export complete objects to a target system when an object is updated.

    I have set the MACapabilities to MAExportType.ObjectReplace so that I can access all attributes on the user, not only the change one(s). But I can't seem to get it to work. When I run:

    foreach

    (CSEntryChangecsentryChange incsentries)

                {

    foreach

    (stringattribName incsentryChange.ChangedAttributeNames)

                        {

    The only attributes I can access is the changed ones. Does anyone have a clue on this? Is there a bug with the capabilities?

    Regards

    Patrik

    Wednesday, September 2, 2015 12:58 PM

All replies

  • Good morning Patrik,

    A quick question... Did you have a different MAExportType defined when you originally created the connector?  What I have seen is that once a connector is created with a defined MAExportType, changing the type afterwards and recompiling the assembly will have no effect on the existing connector.

    If that's the case, you'll need to create a new connector to make use of the MAExportType.ObjectReplace.

    Cheers,

    Marc


    Marc Mac Donell, VP Identity and Access Solutions, Avaleris Inc.
    http://www.avaleris.com

    Thursday, September 3, 2015 11:55 AM
  • Hi Marc,

    Thank's for the quick reply. I'm aware of that "feature" and just to be sure I tried adding in Delta Import support in the capabilities and recreated the MA from scratch. When I set up run profiles the Delta Import step shows up as expected so there is no doubt that the MA have actually been created with the capabilties in my code.

    But nevertheless, when I try exporting up a update the only attribut that shows up is the changed one, not the complete list with all attributes as one would expect running the MA with MAExportType.ObjectReplace

    Do I have to access these attributes in a different way than:

    foreach

    (CSEntryChangecsentryChange incsentries)

                {

    foreach

    (stringattribName incsentryChange.ChangedAttributeNames)

                        {

    All the best

    Patrik

    Thursday, September 3, 2015 3:34 PM
  • Hi Patrik,

    Setting the capabilities to MAExportType.ObjectReplace should give you the full object definitions during an export. I'm doing that in a custom MA and it works for me.

    However, if you loop over the ChangedAttributeNames collection, you should get only the changed attributes.

    Have you tried just accessing all the object properties?


    Paolo Tedesco - http://cern.ch/idm

    Friday, September 4, 2015 12:14 PM
  • Hi Paolo,

    Thanks for the reply. Could you elaborate on that? :) The PutExportEntries method is giving me a list of CSEntryChange objects. When I look at the properties on that object I cannot see how I should access the attributes. Could you show me an example on how you access the attributes on the object?

    All the best

    Patrik

    Friday, September 4, 2015 12:27 PM
  • In my code, I just iterate over AttributeChanges, instead of checking the ChangedAttributeNames:
    foreach (var attributeChange in entry.AttributeChanges) {  
      foreach (var valueChange in entry.AttributeChanges[attributeChange.Name].ValueChanges)
        object value = valueChange.Value;
        // do something with value...
      }
    }
    

    Hope this helps :)


    Paolo Tedesco - http://cern.ch/idm

    Friday, September 4, 2015 12:32 PM
  • Hi Paolo,

    Many thanks for the fast reply. I was just playing around with the AttributeChanges collection realizing that I must have missed something obvious :) Duhh. Sometimes you cannot see the forest for all the trees :)

    Thanks for the code :) It confirmed I was on the right track

    All the best

    Patrik

    Friday, September 4, 2015 12:41 PM