ssismaster-data-services

MDS business rule


I am new with MDS, and I have a question about one to many relation mapping in MDS

I have a product, contains descriptions in multiple languages. I have created two entities with derived hierarchy structure: product (P_ID, P_name)and Addtional description(P_ID, P_Name_in_German, P_name_in_English).

Additonal description is a drop down from product table from MDS UI, but I only want to populate info that releated with its same P_ID. How can I achieve that? Can I use business rules here and how it should look like?

(2012 Master data service' web interface)


Solution

  • I have also faced a similar problem. I have decided to add multiple fields for languages and apply business rules for them. Let's see how it would work for your entity:

    Product entity
    {
      Code
      Name
      Name_in_English (text)
      Name_in_German (text)
      Default_language (domain based, points to Languages entity)
    }
    Languages entity
    {
      Code
      Name
    }
    

    Add values to the Languages entity:

    Code = "EN", Mane = "EN"
    Code = "DE", name = "DE"
    

    Now we need to add the following business rules to the Product entity:

    BR1:
    {
      IF Condition - Equals: Default_language equals "EN"
      THEN Action - Change value: Name = Name_in_English
    }
    BR2:
    {
      IF Condition - Equals: Default_language equals "DE"
      THEN Action - Change value: Name = Name_in_German
    }
    

    After that You will see the product names in your product entity only in proper language which is chosen by drop-down field Default_language.

    The second option: If You want user to see only the Name field and don't want him to see additional fields, You can hide those fields (Name_in_English and Name_in_German) by setting their width to zero. Moreover, You can use attribute groups to separate two modes of view:

    first mode (for the regular user) - You see only Code and Name
    second mode (for the administrator) - You see fields: Name_in_English, Name_in_German, Default_language.
    

    For it to work You need to create two attribute groups:

    1) attribute group "EN" (add attributes Name and Code to the group)
    2) attribute group "DE" (add attributes Name_in_English, Name_in_German, Default_language to the group)
    

    Hope something of that is helpful!