Master Data Services Team : Business Rules, MDShttp://sqlblog.com/blogs/mds_team/archive/tags/Business+Rules/MDS/default.aspxTags: Business Rules, MDSenCommunityServer 2.1 SP2 (Build: 61129.1)Hands On Labs for Master Data Serviceshttp://sqlblog.com/blogs/mds_team/archive/2016/02/18/hands-on-labs-for-master-data-services.aspxFri, 19 Feb 2016 03:12:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:60670MDS Team0http://sqlblog.com/blogs/mds_team/comments/60670.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=60670Have you been looking to develop a Master Data Services solution or try out the new features in SQL Server 2016? We have published couple of Hands On Labs for you to use. ...(<a href="http://sqlblog.com/blogs/mds_team/archive/2016/02/18/hands-on-labs-for-master-data-services.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=60670" width="1" height="1">MDSBusiness RulesSamplesMaster Data Servicesgetting startedSQL2016SQL server 2016Master Data Services Hands On labWhat's New in Master Data Services - SQL2016 CTP2.4 (Sep) Releasehttp://sqlblog.com/blogs/mds_team/archive/2015/10/15/what-s-new-in-master-data-services-sql2016-ctp2-4-september-release.aspxThu, 15 Oct 2015 21:57:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:59778MDS Team0http://sqlblog.com/blogs/mds_team/comments/59778.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=59778SQL Server 2016 Community Technology Preview 2.4 is publicly released and the latest SQL Server bits can be found at http://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016 . MDS Excel Add-in can be found at : https://www.microsoft.com/en-us/download/details.aspx?id=47343...(<a href="http://sqlblog.com/blogs/mds_team/archive/2015/10/15/what-s-new-in-master-data-services-sql2016-ctp2-4-september-release.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=59778" width="1" height="1">MDSBusiness RulesMaster Data ServicesSQL2016Creating a Bing Map URL with a Business Rulehttp://sqlblog.com/blogs/mds_team/archive/2010/02/19/creating-a-bing-map-url-with-a-business-rule.aspxFri, 19 Feb 2010 18:07:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:22475MDS Team2http://sqlblog.com/blogs/mds_team/comments/22475.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=22475(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS Team) While using Bing Maps last night to look for directions I thought of a way to use MDS business rules to create a Bing Map URL link attribute. This may sound like merely...(<a href="http://sqlblog.com/blogs/mds_team/archive/2010/02/19/creating-a-bing-map-url-with-a-business-rule.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=22475" width="1" height="1">MDSBusiness RulesEnabling Human Workflow – Part 4: Creating the Business Ruleshttp://sqlblog.com/blogs/mds_team/archive/2010/02/18/enabling-human-workflow-part-4-creating-the-business-rules.aspxThu, 18 Feb 2010 17:49:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:22431MDS Team12http://sqlblog.com/blogs/mds_team/comments/22431.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=22431(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS Team) Up until this point we have been laying the foundation for enabling the human workflow. Along the way ( Part 1 , Part 2 , and Part 3 ) you’ve been exposed to other...(<a href="http://sqlblog.com/blogs/mds_team/archive/2010/02/18/enabling-human-workflow-part-4-creating-the-business-rules.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=22431" width="1" height="1">MDSBusiness RulesEnabling Human Workflow – Part 3: Configuring Email Notificationhttp://sqlblog.com/blogs/mds_team/archive/2010/02/17/enabling-human-workflow-part-3-configuring-email-notification.aspxWed, 17 Feb 2010 17:18:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:22381MDS Team3http://sqlblog.com/blogs/mds_team/comments/22381.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=22381(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS Team) In Part 1 you made the necessary model changes. In Part 2 you made the security changes to give the new groups the required security access and permissions . In this...(<a href="http://sqlblog.com/blogs/mds_team/archive/2010/02/17/enabling-human-workflow-part-3-configuring-email-notification.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=22381" width="1" height="1">MDSsetupBusiness RulesEnabling Human Workflow – Part 2: Granting permission to your datahttp://sqlblog.com/blogs/mds_team/archive/2010/02/16/enabling-human-workflow-part-2-granting-permission-to-your-data.aspxTue, 16 Feb 2010 17:09:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:22342MDS Team4http://sqlblog.com/blogs/mds_team/comments/22342.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=22342(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS Team) In Part 1 you made the necessary model changes. In this post we will continue with Step 6, making the security changes necessary to meet the requirements of our workflow...(<a href="http://sqlblog.com/blogs/mds_team/archive/2010/02/16/enabling-human-workflow-part-2-granting-permission-to-your-data.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=22342" width="1" height="1">MDSBusiness RulesEnabling Human Workflow – Part 1: Changing your modelhttp://sqlblog.com/blogs/mds_team/archive/2010/02/15/enabling-human-workflow-part-1-changing-your-model.aspxMon, 15 Feb 2010 20:42:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:22311MDS Team19http://sqlblog.com/blogs/mds_team/comments/22311.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=22311(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS Team) In my last post , I showed how to create a simple validation business rule. In this post, we are going to look at more advanced capabilities by using business rules...(<a href="http://sqlblog.com/blogs/mds_team/archive/2010/02/15/enabling-human-workflow-part-1-changing-your-model.aspx">read more</a>)<img src="http://sqlblog.com/aggbug.aspx?PostID=22311" width="1" height="1">MDSBusiness RulesCreating a Simple Business Rulehttp://sqlblog.com/blogs/mds_team/archive/2010/02/03/creating-a-simple-business-rule.aspxWed, 03 Feb 2010 23:07:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:21795MDS Team8http://sqlblog.com/blogs/mds_team/comments/21795.aspxhttp://sqlblog.com/blogs/mds_team/commentrss.aspx?PostID=21795<P><FONT color=#adadad>(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS team)</FONT></P>
<P>This post is a first in a series that will explore what you can do with SQL Server 2008 R2 Master Data Services (MDS) business rules. It will introduce business rule creation and publishing. Here are some of the topics we will be covering in the future:</P>
<UL>
<LI>Using business rules to enable human workflow via email notifications</LI>
<LI>Creating and initiating a SharePoint workflow from MDS business rules </LI>
<LI>Using different types of conditions and actions </LI>
<LI>Using complex conditions </LI>
<LI>Using business rules to propagate attribute changes down a hierarchy </LI>
<LI>Getting creative with business rules. </LI>
<LI>What is happening under the covers when you publish and run business rules </LI></UL>
<P>If there are other business rule topics you are interested in please drop us a line at <A href="mailto:mdsblog@microsoft.com"><FONT color=#0000ff>mdsblog@microsoft.com</FONT></A>.</P>
<H3>What are Business Rules?</H3>
<P>The ability to validate master data against a variety of rules and conditions is a key component to any best-practice master data management strategy. In MDS, business rules are used to enforce data integrity and help ensure completeness and accuracy of the master data.</P>
<P>Business rules are If/Then statements that can be created in the Master Data Manager user interface (UI) or the WCF API. If an attribute value meets a specified condition, then an action is taken. Possible actions include setting a default value, changing a value, performing attribute validation, or initiating a SharePoint workflow.</P>
<P>To use business rules, you must first create and publish your rules, then validate your data against the published rules. An administrator can validate an entire version of a model at one time. Other users can validate subsets of data against business rules.</P>
<P>If an attribute value doesn’t pass business rule validation, the value can still be saved. Validation issues are displayed in the UI, and a version cannot be committed until all attributes pass business rule validation. </P>
<H3>Business Rule Designer</H3>
<P>In Master Data Manager, the Business Rule Designer is where you create and edit business rules. Drag and drop plays a key role in creation and editing of business rules, as shown below.</P>
<P><A href="http://sqlblog.com/blogs/mds_team/BusinessRuleDesigner_6C3205C8.jpg"><IMG title="Business Rule Designer" style="BORDER-TOP-WIDTH:0px;DISPLAY:inline;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height=470 alt="Business Rule Designer" src="http://sqlblog.com/blogs/mds_team/BusinessRuleDesigner_thumb_5594D8E3.jpg" width=521 border=0></A> </P>
<P>The screen has five main sections.</P>
<TABLE class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;" cellSpacing=0 cellPadding=2>
<TR>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;"><STRONG>Section</STRONG></TD>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;"><STRONG>Description</STRONG></TD></TR>
<TR>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>Components</P></TD>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>Contains the logical operator, condition, and action components.</P></TD></TR>
<TR>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>Entity-Specific Attributes</P></TD>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>Contains all the attributes for the specific entity/member type as well as any explicit hierarchy (consolidated) attributes.</P></TD></TR>
<TR>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">IF</TD>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>Contains the conditions for which the action clause of the rule should be performed. You drag logical operators and conditions to this section. You can use the logical operators “AND” and “OR” to create combinations of conditions. All rules must have at least one logical operator. If no logical operator exists when you drag a condition component, an “AND” logical operator will automatically be added.</P>
<P>A condition is a Boolean (true or false) expression that is applied to an entity attribute. If the condition is true, the actions for the rule are performed.</P>
<P>A business rule does not require a condition. If no condition is specified, the actions for the rule are applied to all members.</P></TD></TR>
<TR>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">THEN</TD>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>Contains the actions that should be performed when the IF conditions are satisfied. You drag actions to this section.</P>
<P>An action is the consequence of a condition evaluation. If a specific condition is true, the action is initiated. You can also create a rule that initiates an action without a condition. In this case, the rule is applied to all members.</P></TD></TR>
<TR>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">Edit</TD>
<TD class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;">
<P>When you select a condition component in the IF section or an action component in the THEN section, the Edit section will display the individual condition or action component for editing. You drag attributes to this section as well as select and enter values.</P></TD></TR></TABLE>
<H3>Simple Rule Example</H3>
<P>The following steps will show you how to create a simple validation business rule using the sample Product model. Let’s say your business manager has indicated that any product manufactured in-house must have a fabrication time of between 1 and 10 days. So, in MDS we will create this rule:</P>
<TABLE class="" style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;" cellSpacing=0 cellPadding=2>
<TR>
<TD class="">
<P>IF</P>
<P>&nbsp;&nbsp;&nbsp; InHouseManufacture is equal to Y</P>
<P>THEN</P>
<P>&nbsp;&nbsp;&nbsp; DaysToManufacture must be between 1 and 10</P></TD></TR></TABLE>
<OL>
<LI>In Master Data Manager, click <B>System Administration</B>. </LI>
<LI>From the menu bar, point to <B>Manage</B> and click <B>Business Rules</B>. </LI>
<LI>On the <B>Business Rule Maintenance</B> page, from the <B>Model</B> list, select the Product model. </LI>
<LI>From the <B>Entity</B> list, select the Product entity. </LI>
<LI>From the <B>Member Type</B> list, select the Leaf member type. </LI>
<LI>From the <B>Attribute</B> list, leave the default of <B>All</B>. </LI>
<LI><B>Click Add business rule</B>. </LI>
<LI>Click <B>Edit selected business rule</B> to open the <B>Business Rule Designer</B>. </LI>
<LI>In the <B>Components</B> pane, expand the <B>Conditions</B> node. </LI>
<LI>Click the “<B>is equal to</B>” condition and drag it to the <B>IF</B> pane's <B>Conditions</B> label. Notice that an “AND” logical operator is automatically added for you. If you need to start out with an “OR” then make sure you drag it over first. </LI>
<LI>In the <B>Entity-Specific Attributes</B> pane, click the “<B>InHouseManufacture</B>” attribute and drag it to the <B>Edit Condition</B> pane's <B>Select attribute</B> label. </LI>
<LI>In the <B>Edit Condition</B> pane, enter <B>Y</B> in the <B>Attribute value</B> field. </LI>
<LI>In the <B>Edit Condition</B> pane, click Save. The condition will be displayed. </LI>
<LI>In the <B>Components</B> pane, expand the <B>Actions</B> node. </LI>
<LI>Click the “<B>must be between</B>” condition and drag it to the <B>THEN</B> pane's <B>Action</B> label. </LI>
<LI>In the <B>Entity-Specific Attributes</B> pane, click the “<B>DaysToManufacture</B>” attribute and drag it to the <B>Edit Action</B> pane's <B>Select attribute</B> label. </LI>
<LI>In the <B>Edit Action</B> pane, enter <B>1</B> in the “must be between” <B>Attribute value</B> field and <B>10</B> in the “and” <B>Attribute value</B> (as shown above). </LI>
<LI>In the <B>Edit Action</B> pane, click Save. The action will be displayed. </LI>
<LI>Click <B>Back</B> to return to the <B>Business Rule Maintenance</B> page. </LI>
<LI>Optionally, on the <B>Business Rules Maintenance</B> page, for the row that contains your business rule, double-click a cell in the <B>Name </B>and <B>Description</B> columns to update the value. </LI>
<LI>Click <B>Publish Business Rules</B> </LI>
<LI>On the confirmation dialog box, click <B>OK</B>. The rule’s status will change to <B>Active</B>. </LI></OL>
<H3>Try it out</H3>
<P>Now that the rule is published you are ready to try it out.</P>
<OL>
<LI>Go back to the home page. </LI>
<LI>Select the Product model and a version. </LI>
<LI>Select <B>Explorer</B>. </LI>
<LI>On the <B>Explorer</B> page click the <B>Edit</B> button. </LI>
<LI>Select <B>Edit Member </B>from the popup menu to edit a member that has InhouseManufacture = Y. </LI>
<LI>Ensure the Supply Chain tab is active. </LI>
<LI>In the <B>Attributes</B> section click the <B>Edit</B> button. </LI>
<LI>Change the “<B>DaysToManufacture”</B> to <B>11</B>. </LI>
<LI>Click Save. </LI></OL>
<P>Because the updated value is outside the allowable <B>DaysToManufacture</B> range, a validation issue is created and displayed at the bottom of the screen showing the value violates the business rule we entered and published.</P>
<P><A href="http://sqlblog.com/blogs/mds_team/image_40A5E721.png"><IMG title=image style="BORDER-TOP-WIDTH:0px;DISPLAY:inline;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height=258 alt=image src="http://sqlblog.com/blogs/mds_team/image_thumb_1731A5E1.png" width=682 border=0></A> </P>
<P>This was a simple example to get you started but you can see where we could add several more rules with more complex conditions to ensure <B>DaysToManufacture</B> is valid for a wide variety of product lines.</P>
<P>In the next Business Rules post, we will look at more advanced business rule capabilities by using business rules to enable human workflow via email notifications.</P><img src="http://sqlblog.com/aggbug.aspx?PostID=21795" width="1" height="1">MDSBusiness Rules