Business Rules Extension (Master Data Services)
In Master Data Services, you can apply user-defined SQL scripts as an extension of pre-defined conditions and actions.
All scripts have to be defined under [usr] schema.
SQL functions that meet the following criteria can be used as a Business Rule condition.
The return value type must be BIT.
Only following types are supported for parameter types.
DECIMAL (precision, scale)
precision must be 38
scale must be a value from 0 through 7
SQL stored procedures that use the following syntax can be used as a Business Rule action
CREATE PROCEDURE [usr].[YourAction] ( @MemberIdList mdm.[MemberId] READONLY, @ModelName NVARCHAR(MAX), @VersionName NVARCHAR(MAX), @EntityName NVARCHAR(MAX), @BusinessRuleName NVARCHAR(MAX) ) AS BEGIN ... END
User-defined scripts will not be added to deployment packages. Make sure the target Master Data Services database contains all scripts that are used in the business rules before deploying a package.
Script actions will be executed as mds_br_user which has following permissions
|stg||SELECT, UPDATE, DELETE, EXECUTE, INSERT|
To perform this procedure:
You must have permission to access the System Administration functional area.
You must be a model administrator. For more information, see Administrators (Master Data Services)
User defined scripts had been added to the Master Data Services database.
Create a business rule to take a user-defined script as a condition or as an action
In Master Data Manager, click System Administration.
On the menu bar, point to Manage and click Business Rules.
On the Business Rules page, select a model from the Model drop-down list.
From the Entity drop-down list, select an entity.
From the Member Types drop-down list, select a type of member for the business rule to apply to.
Do the following to create a user-defined script as a condition.
Under the If block, click on Add button. A panel will be displayed.
From the Operator drop-down list, select the user-defined function under User defined script .
All parameters of the user defined function are displayed.
Assign a value to each parameter
Do the following to take a user-defined script as an action.
Under the Then block, click on Add button. A panel will be displayed.
From the Operator drop-down list, select user-defined function under User defined script .