title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | ||
---|---|---|---|---|---|---|---|---|---|---|
Business Rules |
Learn about business rules in Master Data Services, which can update data, send email, or start a business process or workflow. |
CordeliaGrey |
jiwang6 |
03/18/2017 |
sql |
master-data-services |
conceptual |
|
[!INCLUDE SQL Server - Windows only ASDBMI]
In [!INCLUDEssMDSshort], a business rule is a rule that you use to ensure the quality and accuracy of your master data. You can use a business rule to automatically update data, to send email, or to start a business process or workflow.
To view examples of business rules, see Business Rule Examples (Master Data Services).
Business rules are If/Then/Else statements that you create in [!INCLUDEssMDSmdm]. If an attribute value meets a specified condition, then an action is taken, otherwise a Else action is taken. Possible actions include setting a default value or changing a value. These actions can be combined with sending an email notification.
Business rules can be based on specific attribute values (for example, take action if Color=Blue), or when attribute values change (for example, take action if the value of the Color attribute changes). For more information about tracking non-specific changes, see Change Tracking (Master Data Services).
To use business rules you must first create and publish your rules, then apply the published rules to data. You can apply rules to subsets of data or to all data for a version by validating the version. A version cannot be committed until all attributes pass business rule validation.
If a user attempts to add an attribute value that doesn't pass business rule validation, the value can still be saved. You can review and correct validation issues, which are displayed in [!INCLUDEssMDSmdm].
When you create a model deployment package, if you want to include business rules you must include data from the version in the package.
If you create a business rule that uses the OR operator, you should create a separate rule for each conditional statement that can be evaluated independently. You can then exclude rules as needed, providing more flexibility and easier troubleshooting.
You can set priority order for rules to run in by moving business rules up and down. However, before priority is taken into account, business rules are applied based on the type of action the rule takes. The order is as follows:
-
Default Value
-
Change Value
-
Validation
-
External Action
-
User Defined Action Script
Within these groups, actions are applied in priority order, from lowest to highest. So for example, four separate rules might have Default Value actions. The Default Value action that occurs first depends on the priority order specified in the web UI.
Other important notes about applying rules:
-
If a business rule is excluded or is not published with a status of Active, the rule is still available but is not included when business rules are applied.
-
Business rules apply to the attribute values for all leaf or all consolidated members, not both.
-
Business rules can be applied to any version of a model that is Open or Locked.
-
Changes made to data when business rules are applied are not logged as transactions.
-
A business rule cannot contain more than one start workflow action.
There are two settings in [!INCLUDEssMDScfgmgr] that affect business rules. You can adjust these settings in [!INCLUDEssMDScfgmgr] or directly in the System Settings table. For more information, see System Settings (Master Data Services).
Task Description | Topic |
---|---|
Create and publish a new business rule. | Create and Publish a Business Rule (Master Data Services) |
Add multiple conditions to a business rule. | Add Multiple Conditions to a Business Rule (Master Data Services) |
Create a business rule to require that attributes have values. | Require Attribute Values (Master Data Services) |
Create a business rule to take an action based on changes to attribute values. | Initiate Actions Based on Attribute Value Changes (Master Data Services) |
Create a business rule to take user-defined script as a condition | Business Rules Extension (Master Data Services) |
Create a business rule to take a user-defined script as an action | Business Rules Extension (Master Data Services) |
Change the name of an existing business rule. | Change a Business Rule Name (Master Data Services) |
Configure [!INCLUDEssMDSmdm] to send notifications when business rules are applied. | Configure Business Rules to Send Notifications (Master Data Services) |
Apply business rules to specific members. | Validate Specific Members against Business Rules (Master Data Services) |
Exclude a business rule so it is not used. | Exclude a Business Rule (Master Data Services) |
Delete an existing business rule. | Delete a Business Rule (Master Data Services) |