Skip to content

Commit

Permalink
Feature/configuratie_features_pivotetc (#33)
Browse files Browse the repository at this point in the history
* Added CanCreate Event Handler on all business rules which can be configured via the model properties.
* Disabled fullshortcutmodel for ExampleDWH.
* Disabled business rule features on Reference and ExampleSource.
* Updated MDDE Model Configuration page and updated reference from README.
---------

Co-authored-by: Harmen Wessels <harmen@x-breeze.com>
  • Loading branch information
RichaneCrossbreeze and harmen-xb authored Oct 15, 2024
1 parent 2163c7f commit e652408
Show file tree
Hide file tree
Showing 53 changed files with 322 additions and 1,526 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<o:EventHandlerTargetItem Id="7768AB67-15D8-4C68-8754-5697D2960D23">
<a:ObjectID>7768AB67-15D8-4C68-8754-5697D2960D23</a:ObjectID>
<a:Name>CanCreate</a:Name>
<a:CreationDate>1726842611</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:HandlerScript>Function %CanCreate%(parent)
&#39;the parent represents the AggregateBusinessRule which communicaties with the model object&#39;
&#39;the default value for the attribute is set to TRUE in the form&#39;

%CanCreate% = False
&#39; If the parent is known return the value of the MDDE configuration extended attribute.
If Not (parent Is Nothing) Then
%CanCreate% = parent.Model.GetExtendedAttribute(&quot;mdde_Feature_BusinessRule_Aggregate&quot;)
End If
End Function</a:HandlerScript>
</o:EventHandlerTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<o:TypedCategoryTargetItem Id="F33A5029-A1F3-436E-8518-193C6C15D18A">
<a:TypePublicName>EventHandlerTargetItem</a:TypePublicName>
<a:ObjectID>F33A5029-A1F3-436E-8518-193C6C15D18A</a:ObjectID>
<a:Name>Event Handlers</a:Name>
<a:CreationDate>1726842611</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<c:Categories>
<xi:include href="CanCreate.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,6 @@ A6A5A4FFA19F9FFF9B9A9AFF8E8E8EFF777878FF646363FF494949FF86EEFFFF
</c:ParentSttp>
<c:Categories>
<xi:include href="Custom_Symbol.xml" />
<xi:include href="Event_Handlers/Event_Handlers.xml" />
</c:Categories>
</o:StereotypeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<o:EventHandlerTargetItem Id="D1DB87F4-7902-45D2-83EA-E01AFD8ABD62">
<a:ObjectID>D1DB87F4-7902-45D2-83EA-E01AFD8ABD62</a:ObjectID>
<a:Name>CanCreate</a:Name>
<a:CreationDate>1726841992</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:HandlerScript>Function %CanCreate%(parent)
&#39;the parent represents the CustomBusinessRule which communicaties with the model object&#39;
&#39;the default value for the attribute is set to TRUE in the form&#39;

%CanCreate% = False
&#39; If the parent is known return the value of the MDDE configuration extended attribute.
If Not (parent Is Nothing) Then
%CanCreate% = parent.Model.GetExtendedAttribute(&quot;mdde_Feature_BusinessRule_Custom&quot;)
End If
End Function</a:HandlerScript>
</o:EventHandlerTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<o:TypedCategoryTargetItem Id="31E6C4C4-8DF4-45EC-B33F-E5A952CB1FBD">
<a:TypePublicName>EventHandlerTargetItem</a:TypePublicName>
<a:ObjectID>31E6C4C4-8DF4-45EC-B33F-E5A952CB1FBD</a:ObjectID>
<a:Name>Event Handlers</a:Name>
<a:CreationDate>1726841992</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<c:Categories>
<xi:include href="CanCreate.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
</c:ParentSttp>
<c:Categories>
<xi:include href="Custom_Symbol.xml" />
<xi:include href="Event_Handlers/Event_Handlers.xml" />
</c:Categories>
</o:StereotypeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<o:EventHandlerTargetItem Id="C4D48095-33A0-4455-8D05-5478F6C651DD">
<a:ObjectID>C4D48095-33A0-4455-8D05-5478F6C651DD</a:ObjectID>
<a:Name>CanCreate</a:Name>
<a:CreationDate>1726754458</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:HandlerScript>Function %CanCreate%(parent)
&#39;the parent represents the PivotBusinessRule which communicaties with the model object&#39;
&#39;the default value for the attribute is set to TRUE in the form&#39;

%CanCreate% = False
&#39; If the parent is known return the value of the MDDE configuration extended attribute.
If Not (parent Is Nothing) Then
%CanCreate% = parent.Model.GetExtendedAttribute(&quot;mdde_Feature_BusinessRule_Pivot&quot;)
End If
End Function</a:HandlerScript>
</o:EventHandlerTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<o:TypedCategoryTargetItem Id="0C1D316D-5A7D-48B9-BFB3-CF87A105268A">
<a:TypePublicName>EventHandlerTargetItem</a:TypePublicName>
<a:ObjectID>0C1D316D-5A7D-48B9-BFB3-CF87A105268A</a:ObjectID>
<a:Name>Event Handlers</a:Name>
<a:CreationDate>1726754458</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<c:Categories>
<xi:include href="CanCreate.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,6 @@ D3D2D3FED4D3D4FAD0CFD0EDBFBFBFCA9D9D9D8A5F5F5F380303030A00000001
</c:ParentSttp>
<c:Categories>
<xi:include href="Custom_Symbol.xml" />
<xi:include href="Event_Handlers/Event_Handlers.xml" />
</c:Categories>
</o:StereotypeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<o:EventHandlerTargetItem Id="290DC1CF-77B8-47D6-90F6-F868A176A63A">
<a:ObjectID>290DC1CF-77B8-47D6-90F6-F868A176A63A</a:ObjectID>
<a:Name>CanCreate</a:Name>
<a:CreationDate>1726842654</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:HandlerScript>Function %CanCreate%(parent)
&#39;the parent represents the FilterBusinessRule which communicaties with the model object&#39;
&#39;the default value for the attribute is set to TRUE in the form&#39;

%CanCreate% = False
&#39; If the parent is known return the value of the MDDE configuration extended attribute.
If Not (parent Is Nothing) Then
%CanCreate% = parent.Model.GetExtendedAttribute(&quot;mdde_Feature_BusinessRule_Filter&quot;)
End If
End Function</a:HandlerScript>
</o:EventHandlerTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<o:TypedCategoryTargetItem Id="67229A03-E6AA-4682-B62A-A059A7C7F183">
<a:TypePublicName>EventHandlerTargetItem</a:TypePublicName>
<a:ObjectID>67229A03-E6AA-4682-B62A-A059A7C7F183</a:ObjectID>
<a:Name>Event Handlers</a:Name>
<a:CreationDate>1726842654</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<c:Categories>
<xi:include href="CanCreate.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,6 @@ C59EA3FFC59FA3FFC59FA4FFC7A0A5FFC7A0A6FFB5838AFF9A5360EF9A53602F
</c:ParentSttp>
<c:Categories>
<xi:include href="Custom_Symbol.xml" />
<xi:include href="Event_Handlers/Event_Handlers.xml" />
</c:Categories>
</o:StereotypeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<o:EventHandlerTargetItem Id="7A536EA2-A24B-47FA-B288-442F690950B1">
<a:ObjectID>7A536EA2-A24B-47FA-B288-442F690950B1</a:ObjectID>
<a:Name>CanCreate</a:Name>
<a:CreationDate>1726842683</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:HandlerScript>Function %CanCreate%(parent)
&#39;the parent represents the ScalarBusinessRule which communicaties with the model object&#39;
&#39;the default value for the attribute is set to TRUE in the form&#39;

%CanCreate% = False
&#39; If the parent is known return the value of the MDDE configuration extended attribute.
If Not (parent Is Nothing) Then
%CanCreate% = parent.Model.GetExtendedAttribute(&quot;mdde_Feature_BusinessRule_Scalar&quot;)
End If
End Function</a:HandlerScript>
</o:EventHandlerTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<o:TypedCategoryTargetItem Id="B4C49304-F4C0-4FA2-84AA-C0657EA5377F">
<a:TypePublicName>EventHandlerTargetItem</a:TypePublicName>
<a:ObjectID>B4C49304-F4C0-4FA2-84AA-C0657EA5377F</a:ObjectID>
<a:Name>Event Handlers</a:Name>
<a:CreationDate>1726842683</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<c:Categories>
<xi:include href="CanCreate.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,6 @@ EFE5E0FF78737080000000000000000000000000000000000000000000000000
<c:Categories>
<xi:include href="Custom_Symbol.xml" />
<xi:include href="Custom_Checks/Custom_Checks.xml" />
<xi:include href="Event_Handlers/Event_Handlers.xml" />
</c:Categories>
</o:StereotypeTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
<xi:include href="mdde_Export_Extension_Attached.xml" />
<xi:include href="mdde_Export_Extension_Initialization_Successful.xml" />
<xi:include href="mdde_Export_SourceObject_ExpressionBusinessRule_SqlExpression.xml" />
<xi:include href="mdde_Feature_BusinessRule_Pivot.xml" />
<xi:include href="mdde_Feature_BusinessRule_Scalar.xml" />
<xi:include href="mdde_Feature_BusinessRule_Filter.xml" />
<xi:include href="mdde_Feature_BusinessRule_Custom.xml" />
<xi:include href="mdde_Feature_BusinessRule_Aggregate.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<o:ExtendedAttributeTargetItem Id="52F0CC72-6B0C-44B8-A875-5DC31F6A52BA">
<a:ObjectID>52F0CC72-6B0C-44B8-A875-5DC31F6A52BA</a:ObjectID>
<a:Name>mdde_Feature_BusinessRule_Aggregate</a:Name>
<a:CreationDate>1726842440</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:Comment>This extended attribute is added to refer to the event handler CanCreate to be able to enable the aggregate business rule </a:Comment>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:ExtendedAttributeTargetItem.Value>true</a:ExtendedAttributeTargetItem.Value>
<a:Label>MDDE enable aggregate business rule</a:Label>
</o:ExtendedAttributeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<o:ExtendedAttributeTargetItem Id="89500EF5-C44B-4220-A363-A2620305F64A">
<a:ObjectID>89500EF5-C44B-4220-A363-A2620305F64A</a:ObjectID>
<a:Name>mdde_Feature_BusinessRule_Custom</a:Name>
<a:CreationDate>1726842337</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:Comment>This extended attribute is added to refer to the event handler CanCreate to be able to enable the custom business rule </a:Comment>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:ExtendedAttributeTargetItem.Value>true</a:ExtendedAttributeTargetItem.Value>
<a:Label>MDDE enable custom business rule</a:Label>
</o:ExtendedAttributeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<o:ExtendedAttributeTargetItem Id="0DEE60FE-69C3-4B1B-BE43-B4721C19FC70">
<a:ObjectID>0DEE60FE-69C3-4B1B-BE43-B4721C19FC70</a:ObjectID>
<a:Name>mdde_Feature_BusinessRule_Filter</a:Name>
<a:CreationDate>1726841633</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:Comment>This extended attribute is added to refer to the event handler CanCreate to be able to enable the filter business rule </a:Comment>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:ExtendedAttributeTargetItem.Value>true</a:ExtendedAttributeTargetItem.Value>
<a:Label>MDDE enable filter business rule</a:Label>
</o:ExtendedAttributeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<o:ExtendedAttributeTargetItem Id="B3CFF5CB-A1B0-4149-AF6A-AAD39EF84993">
<a:ObjectID>B3CFF5CB-A1B0-4149-AF6A-AAD39EF84993</a:ObjectID>
<a:Name>mdde_Feature_BusinessRule_Pivot</a:Name>
<a:CreationDate>1726754724</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:Comment>This extended attribute is added to refer to the event handler CanCreate to be able to enable the pivot business rule </a:Comment>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:ExtendedAttributeTargetItem.Value>true</a:ExtendedAttributeTargetItem.Value>
<a:Label>MDDE enable pivot business rule</a:Label>
</o:ExtendedAttributeTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<o:ExtendedAttributeTargetItem Id="380C3059-E59A-4556-AF67-19B74A862155">
<a:ObjectID>380C3059-E59A-4556-AF67-19B74A862155</a:ObjectID>
<a:Name>mdde_Feature_BusinessRule_Scalar</a:Name>
<a:CreationDate>1726841036</a:CreationDate>
<a:Creator>RichaneRamsoedit</a:Creator>
<a:Comment>This extended attribute is added to refer to the event handler CanCreate to be able to enable the scalar business rule </a:Comment>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:ExtendedAttributeTargetItem.Value>true</a:ExtendedAttributeTargetItem.Value>
<a:Label>MDDE enable scalar business rule</a:Label>
</o:ExtendedAttributeTargetItem>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a:Creator>HarmenWessels</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<c:Categories>
<xi:include href="mdde_XmlExportConfiguration.xml" />
<xi:include href="mdde_Configuration.xml" />
<xi:include href="General.xml" />
</c:Categories>
</o:TypedCategoryTargetItem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<o:FormTargetItem Id="82A848B3-38C7-40F2-AB0F-ECE90F5DB908">
<a:ObjectID>82A848B3-38C7-40F2-AB0F-ECE90F5DB908</a:ObjectID>
<a:Name>mdde_Configuration</a:Name>
<a:FormTargetItem.Value>&lt;Form &gt;
&lt;GroupBox Name=&quot;Enabling/Disabling Business Rule features&quot; Caption=&quot;Enable/Disable Business Rule features&quot; ControlAsLabel=&quot;No&quot; &gt;
&lt;StaticText Name=&quot;Description enable/disable&quot; Caption=&quot;With the options below you can enable/disable business rules.\nThe reason to enable/disable these business rules is for configuration options that are specific for any organisation.&quot; /&gt;
&lt;ExtendedAttribute Attribute=&quot;mdde_Feature_BusinessRule_Pivot&quot; Caption=&quot;Enable Pivot business rule &quot; AttributeID=&quot;{B3CFF5CB-A1B0-4149-AF6A-AAD39EF84993}&quot; GrayHiddenAttributes=&quot;Yes&quot; Display=&quot;Checkbox&quot; LeftText=&quot;No&quot; /&gt;
&lt;ExtendedAttribute Attribute=&quot;mdde_Feature_BusinessRule_Filter&quot; Caption=&quot;Enable Filter business rule &quot; AttributeID=&quot;{0DEE60FE-69C3-4B1B-BE43-B4721C19FC70}&quot; GrayHiddenAttributes=&quot;Yes&quot; Display=&quot;Checkbox&quot; LeftText=&quot;No&quot; /&gt;
&lt;ExtendedAttribute Attribute=&quot;mdde_Feature_BusinessRule_Aggregate&quot; Caption=&quot;Enable Aggregate business rule &quot; AttributeID=&quot;{52F0CC72-6B0C-44B8-A875-5DC31F6A52BA}&quot; GrayHiddenAttributes=&quot;Yes&quot; Display=&quot;Checkbox&quot; LeftText=&quot;No&quot; /&gt;
&lt;ExtendedAttribute Attribute=&quot;mdde_Feature_BusinessRule_Scalar&quot; Caption=&quot;Enable Scalar business rule &quot; AttributeID=&quot;{380C3059-E59A-4556-AF67-19B74A862155}&quot; GrayHiddenAttributes=&quot;Yes&quot; Display=&quot;Checkbox&quot; LeftText=&quot;No&quot; /&gt;
&lt;ExtendedAttribute Attribute=&quot;mdde_Feature_BusinessRule_Custom&quot; Caption=&quot;Enable Custom business rule &quot; AttributeID=&quot;{89500EF5-C44B-4220-A363-A2620305F64A}&quot; GrayHiddenAttributes=&quot;Yes&quot; Display=&quot;Checkbox&quot; LeftText=&quot;No&quot; /&gt;
&lt;/GroupBox&gt;
&lt;GroupBox Name=&quot;GroupBox1&quot; Caption=&quot;XML Export&quot; ControlAsLabel=&quot;No&quot; &gt;
&lt;StaticText Name=&quot;XML Export Configuration&quot; Caption=&quot;With the options below you can enable/disable the export of certain metadata.\nThe reason to disable unneeded metadata is to increase the export speed and keep the model export as small as possible.&quot; /&gt;
&lt;ExtendedAttribute Attribute=&quot;mdde_Export_SourceObject_ExpressionBusinessRule_SqlExpression&quot; Caption=&quot;SourceObject &amp;lt;&amp;lt;ExpressionBusinessRule&amp;gt;&amp;gt; SQL Expression&quot; AttributeID=&quot;{A3455CE1-6457-40F7-9C0B-599E355AF4DE}&quot; GrayHiddenAttributes=&quot;Yes&quot; SizeInChars=&quot;1&quot; LineNumber=&quot;3&quot; HorizontalResize=&quot;true&quot; VerticalResize=&quot;true&quot; Display=&quot;Checkbox&quot; LeftText=&quot;No&quot; /&gt;
&lt;/GroupBox&gt;
&lt;/Form&gt;
</a:FormTargetItem.Value>
<a:CreationDate>1716375491</a:CreationDate>
<a:Creator>HarmenWessels</a:Creator>
<a:TargetCategory.Type>1</a:TargetCategory.Type>
<a:Label>Configuration (MDDE)</a:Label>
</o:FormTargetItem>

This file was deleted.

3 changes: 0 additions & 3 deletions decomposed/models/ExampleDWH/Entities/Shortcuts/Country.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@
<a:TargetID>BC120FD8-8AF8-4F3F-86C8-474D1B5B207F</a:TargetID>
<a:TargetClassID>D86B0751-A544-42AE-AAA6-6E32C602F706</a:TargetClassID>
<a:TargetPackagePath>&lt;Model&gt;</a:TargetPackagePath>
<c:FullShortcutReplica>
<o:SubReplication Ref="3E2B5E57-F725-4F68-B614-21324DD2E1CE"/>
</c:FullShortcutReplica>
</o:Shortcut>
Loading

0 comments on commit e652408

Please sign in to comment.