MDS 2012 API ModelMembersBulkMerge and ValidationProcess orchestration issues... RRS feed

  • Question

  • Hi 

    I have integrated the MDS 2012 API into a data collection application that I have developed,

    The scenario

    I am calling the ModelMembersBulkMerge method to insert and update members, and in the same process i am calling the ValidationProcess method passing the memberidentifiers that i have just inserted. 

    the volume of data is around 100 members

    The Problem:

    when i run the process for new members and then open the MDS explorer, the members are marked as not validated.

    when i run the process again for the same members, the members are then validated.

    when i change the data for the same members, the members are marked as not validated.

    so, what i think is going on is, that the underlying ModelMembersBulkMerge processes have not completed on the server (even though its reporting it has) by the time the validationProcess method is run

    the question is are there any available methods that i can call to find out if the server is still processing the data, effectively creating a reliable "callback"

    Below is a slice of the code.


          public bool Process(object data, Type dalentity,Confirmed confirmed = Confirmed.No)

              EntityMembers emc = new EntityMembers();
              System.Collections.ObjectModel.Collection<Member> eml = new System.Collections.ObjectModel.Collection<Member>();

              bool validationresponse;

              IEnumerable<object> d = data as IEnumerable<object>;
              foreach (var item in d)

              emc.ModelId = Model;
              emc.EntityId = Entity;
              emc.Members = eml;
              emc.VersionId = Version;
              emc.MemberType = MemberType.Leaf;

              System.Collections.ObjectModel.Collection<EntityMembers> EntityMemberList = new System.Collections.ObjectModel.Collection<EntityMembers>();
              UpdateModelMembers(EntityMemberList); // insert / update entity members

              //Thread.Sleep(new TimeSpan(0, 0, 20)); // this is ridiculous 

              validationresponse = ValidateMembers(emc); //validation entity members

            return validationresponse;


     public void UpdateModelMembers(System.Collections.ObjectModel.Collection<EntityMembers> EntityMembers)
                  ModelMembersBulkMergeRequest mmbmr = new ModelMembersBulkMergeRequest(new International(), EntityMembers);
                  ModelMembersBulkMergeResponse mmbmresp = EntityBasedStaging.StagingTables.GetClientProxy().ModelMembersBulkMerge(mmbmr);

    • Edited by wombelite Wednesday, October 31, 2012 1:44 AM
    Wednesday, October 31, 2012 1:42 AM


  • So in reply to my own question and many thanks to Tyler Graham for writing his book on SQL 2012 master data services, it seems i was using  deprecated methods to submit and validate MDS data.

    The solution here is to submit data using the EntityMembersMergeRequest and EntityMembersMergeResponse methods.

    and run the Validationprocess method to validate the members. the thing i did notice is that return CreatedIdentifiers on the request method must be set to false, otherwise MDS wont update all the attributes correctly, i think this is a bug.

    The Webel

    • Marked as answer by wombelite Friday, November 2, 2012 3:09 AM
    Friday, November 2, 2012 3:09 AM