MDS validation with externalAction RRS feed

  • Question

  • Hi!

    I am trying to validate entity members with custom business rule (IWorkflowTypeExtender).

    When I try to change attribute ValidationStaus for my members to ValidationStatus.ValidationSucceeded and update members with EntityMembersUpdate operation, i have ValidationStaus.AwaitingRevalidation in MDS as result.
    How can I change ValidationStatus via API?



    Tuesday, December 20, 2011 11:31 AM


  • In MDS, the stored procedure "udpMembersValidationStatusUpdate" is responsible for updating the validation status.

    Unfortunately, the service API does not  make this as public function. ( it is accessible only at the data access level)

    Looking at the codes of udpBusinessRule_AttributeMemberController,

    --The success status is 3 according the the SP of udpBusinessRule_AttributeMemberController
    DECLARE @ValidationStatus_Succeeded INT = 3;  
       --No rules exists.  Update members validation status to 3 - succeeded  
    exec mdm.udpMembersValidationStatusUpdate @Entity_ID, @MemberType_ID, @ValidationStatus_Succeeded, @Version_ID, @MemberIdList;  

    Basically you can not set the status without validation.

    And I do not suggest you setting the status directly without validation as when no rule is defined on the entity, the validation process itself is just to make the member as ValidationSucceed, the same as what you expect. And also you can do validation for a single member.


    But here are some thoughts if you really want to do so 

    1) Call the SP "udpMembersValidationStatusUpdate" directly with ADO.net  by providing entityId, and MemeberType_id ( 1), and validation status 3.

    2) To locate entityId, use another SP of "udpMemberTypeIDAndIDGetByCode" by providing the Code of the member.


    • Edited by Hu yiqian Saturday, December 31, 2011 2:05 AM
    • Marked as answer by Challen Fu Monday, January 2, 2012 2:08 AM
    Saturday, December 31, 2011 1:57 AM