none
Getting missing-change-type Error during Delta Import on Call-based ECMA2 RRS feed

  • Question

  • I am developing a call-based ECMA2.  The connected system supports delta import, and has a change type column called "change_type".  It is unclear to me how to properly tell the MA what the change-type column is called.  I had thought all I would need to do is something along these lines:

    //Determine the ChangeType.
    switch (row["change_type"].ToString())
    {
        case "A":
            csentry.ObjectModificationType = ObjectModificationType.Add;
            break;
        case "C":
            csentry.ObjectModificationType = ObjectModificationType.Update;
            break;
        case "D":
            csentry.ObjectModificationType = ObjectModificationType.Delete;
            break;
    }

    ...however after I perform a Delta Import, the MA is processing two "update" records (as noted correctly under Staging statistics), but I get discovery errors for missing-change-type for both.

    Can someone please advise on how to properly reflect the change_type within a call-based ECMA2?

    Thanks!

    Jon 

    Wednesday, May 1, 2013 8:28 PM

Answers

  • Ok...I figured it out.  The problem is resolved (in my situation) by REMOVING the highlighted line below.  Not sure why exactly...but it fixes it.  Later on in the code, there is a loop that iterates through all the attributes (including the Anchor attribute...which was also set as anchor in Schema setup).  So I guess explicitly setting the DN in my scenario was causing the problem.  Anyway, this was a fun one.  Thanks everyone, for your assistance here!

    //Create the CSEntryChange object.

    CSEntryChange csentry = CSEntryChange.Create();

    //Set the DN.

    csentry.DN = row["ind_cst_key"].ToString();

    //Set the ObjectType.

    csentry.ObjectType = "Individual";

    //Determine and Set the ChangeType.

    switch (row["change_type"].ToString())

    {

          case "Add":

            csentry.ObjectModificationType = ObjectModificationType.Add;

            break;

          case "Modify":

            csentry.ObjectModificationType = ObjectModificationType.Update;

            break;

          case "Delete":

             csentry.ObjectModificationType = ObjectModificationType.Delete;

             break;

          default:

             throw new UnexpectedDataException("Invalid change_type returned.");

    }

    • Marked as answer by Jon Shea Tuesday, May 7, 2013 10:12 PM
    Tuesday, May 7, 2013 10:12 PM

All replies

  • Any thoughts from folks out there on this issue?
    Friday, May 3, 2013 3:44 PM
  • Any thoughts from folks out there on this issue?
    Monday, May 6, 2013 9:21 PM
  • have a look at this

    This error is returned during a delta import run by file-based and database management agents, as well as the management agent for Sun and Netscape directory servers, when the change type column value (add, modify, delete) is not present.

    from the following link

    http://technet.microsoft.com/en-us/library/jj590332(v=ws.10).aspx

    I think you need to set the Values add, modify, delete instead of A, B and D.

    Sounds strange but have a try with it :)


    Regards Furqan Asghar

    Tuesday, May 7, 2013 9:00 AM
  • Yes will do...will let you know the result.
    Tuesday, May 7, 2013 2:10 PM
  • Just to be safe, your switch statement should have a "default:" case that throws an exception.

    Steve Kradel, Zetetic LLC

    Tuesday, May 7, 2013 3:34 PM
  • No luck with having the column values show as add, modify,delete instead of AC and D.  Still getting missing-change-type error.  Is there some way (e.g., config parameter, code that sets up schema, etc.) that I should be "telling" the ECMA2 how to process deltas?
    Tuesday, May 7, 2013 6:44 PM
  • Bear in mind that order matters.  Are you trying to set any other properties before the modification type?  Your code should look something like this:

    var t = CSEntryChange.Create();
    t.ObjectModificationType = ObjectModificationType.Add;
    t.DN = "some-id";
    t.ObjectType = "thing";


    Steve Kradel, Zetetic LLC

    Tuesday, May 7, 2013 8:15 PM
  • I tried that as well, with no luck.  Thanks though.  Still get missing-change-type error.
    Tuesday, May 7, 2013 9:26 PM
  • IMHO the next step is to implement a "default" case in the switch statement as I suggested above, in case the data are not exactly as you suspect; I've written quite a few delta-capable ECMA2 MAs and they work reliably.

    Steve Kradel, Zetetic LLC

    Tuesday, May 7, 2013 9:32 PM
  • I've done that, as well.  Thanks!
    Tuesday, May 7, 2013 9:37 PM
  • Hmmm... mind posting the "IMAExtensible2GetCapabilities" method?  Could be some odd combination of flags there.

    Steve Kradel, Zetetic LLC

    Tuesday, May 7, 2013 9:39 PM
  • Ok...I figured it out.  The problem is resolved (in my situation) by REMOVING the highlighted line below.  Not sure why exactly...but it fixes it.  Later on in the code, there is a loop that iterates through all the attributes (including the Anchor attribute...which was also set as anchor in Schema setup).  So I guess explicitly setting the DN in my scenario was causing the problem.  Anyway, this was a fun one.  Thanks everyone, for your assistance here!

    //Create the CSEntryChange object.

    CSEntryChange csentry = CSEntryChange.Create();

    //Set the DN.

    csentry.DN = row["ind_cst_key"].ToString();

    //Set the ObjectType.

    csentry.ObjectType = "Individual";

    //Determine and Set the ChangeType.

    switch (row["change_type"].ToString())

    {

          case "Add":

            csentry.ObjectModificationType = ObjectModificationType.Add;

            break;

          case "Modify":

            csentry.ObjectModificationType = ObjectModificationType.Update;

            break;

          case "Delete":

             csentry.ObjectModificationType = ObjectModificationType.Delete;

             break;

          default:

             throw new UnexpectedDataException("Invalid change_type returned.");

    }

    • Marked as answer by Jon Shea Tuesday, May 7, 2013 10:12 PM
    Tuesday, May 7, 2013 10:12 PM