Skip to content

Commit

Permalink
Object select fix and source attribute ANSI quoted (#19)
Browse files Browse the repository at this point in the history
* Synced MDDE_LDM with Rabobank version.

* Updated XML export after updates.
  • Loading branch information
harmen-xb authored May 14, 2024
1 parent 0b9dc46 commit 683dc5a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Function SelectSourceObjectAttribute(objSourceObject)
Exit Function
End If

' Get a reference the real source object
' Get a reference to the real source object
Dim objRealSourceObject : Set objRealSourceObject = GetRealObject(objSourceObject.GetExtendedAttribute("mdde_JoinedObject"))

' If the selected source object is a scalar business rule, we automatically set the output attribute here without showing the object picker (if there is only one output attribute).
Expand All @@ -223,13 +223,13 @@ Function SelectSourceObjectAttribute(objSourceObject)
For Each objAttribute in objRealSourceObject.Attributes
' If the current attribute is an output attribute, select this one (for now, if it turns output there where multiple outputs, the variable will be unset later and object picker will be shown).
If objAttribute.HasStereotype("mdde_OutputAttribute") Then
Set SelectMappingSourceAttribute = objAttribute
Set SelectSourceObjectAttribute = objAttribute
intOutputAttributeCount = intOutputAttributeCount + 1
End If
Next

' Of the output attribute wasn't found, show an error and stop the method.
If SelectMappingSourceAttribute Is Nothing Then
If intOutputAttributeCount = 0 Then
MsgBox _
"The selected scalar business rule doesn't have an output attribute!" & vbCrLf & vbCrLf _
& "Please make sure there is only one attribute in the scalar business rule with the stereotype 'Output attribute (MDDE)'." _
Expand All @@ -238,7 +238,7 @@ Function SelectSourceObjectAttribute(objSourceObject)
Exit Function
' If there are multiple output attributes, show the object picker.
ElseIf intOutputAttributeCount > 1 Then
Set SelectMappingSourceAttribute = Nothing
Set SelectSourceObjectAttribute = Nothing
End If
End If

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<a:Name>mdde_Mapping_Stereotyped_XmlExport_Template</a:Name>
<a:TemplateTargetItem.Value>&lt;PivotConfig
.if (%mdde_PivotHeaderAttributeSelector%)
PivotHeaderAttribute=&quot;%mdde_PivotAggregatedAttribute_SourceObject.Code%.%mdde_PivotHeaderAttribute.Code%&quot;
PivotHeaderAttribute=&quot;&amp;quot;%mdde_PivotAggregatedAttribute_SourceObject.Code%&amp;quot;.&amp;quot;%mdde_PivotHeaderAttribute.Code%&amp;quot;&quot;
.endif()
.if (%mdde_PivotAggregatedAttributeSelector%)
PivotAggregatedAttribute=&quot;%mdde_PivotAggregatedAttribute_SourceObject.Code%.%mdde_PivotAggregatedAttribute.Code%&quot;
PivotAggregatedAttribute=&quot;&amp;quot;%mdde_PivotAggregatedAttribute_SourceObject.Code%&amp;quot;.&amp;quot;%mdde_PivotAggregatedAttribute.Code%&amp;quot;&quot;
.endif()
.if (%mdde_PivotAggregateFunction%)
PivotAggregateFunction=&quot;%.X:mdde_PivotAggregateFunction%&quot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.if (%SourceFeature%)
.comment If the source object is also known, the mapping is correct and we present the source attribute.
.if (%mdde_SourceObject%)
%mdde_SourceObject.Code%.%SourceFeature.Code%
&quot;%mdde_SourceObject.Code%&quot;.&quot;%SourceFeature.Code%&quot;
.endif
.comment If the mapped to value is a numeric value or encapsulated in single quotes, it&#39;s a static value.
.elsif (%mdde_IsLiteralValue%)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<a:Name>mdde_BaseStructuralFeatureMapping_XmlExport_Template</a:Name>
<a:TemplateTargetItem.Value>&lt;%Feature.mdde_NamedObject_XmlElementName%Mapping Id=&quot;%ObjectID%&quot; TargetAttribute=&quot;%Feature.Code%&quot;
.if (%mdde_BaseStructuralFeatureMapping_SourceAttribute_XmlExport_Template%)
SourceAttribute=&quot;%mdde_BaseStructuralFeatureMapping_SourceAttribute_XmlExport_Template%&quot; IsLiteralValue=&quot;%mdde_IsLiteralValue%&quot;
SourceAttribute=&quot;%.X:mdde_BaseStructuralFeatureMapping_SourceAttribute_XmlExport_Template%&quot; IsLiteralValue=&quot;%mdde_IsLiteralValue%&quot;
.endif()
.comment Add the Aggregate function if it is specified.
.if (%mdde_Aggregate?%)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.if %mdde_ParentLiteralValue%
%mdde_ParentLiteralValue%
.elsif (%mdde_ParentSourceObject%) &amp;&amp; (%mdde_ParentAttribute%)
%mdde_ParentSourceObject.Code%.%mdde_ParentAttribute.Code%
&amp;quot;%mdde_ParentSourceObject.Code%&amp;quot;.&amp;quot;%mdde_ParentAttribute.Code%&amp;quot;
.endif</a:TemplateTargetItem.Value>
<a:CreationDate>1654155830</a:CreationDate>
<a:Creator>WesselsH1</a:Creator>
Expand Down
Loading

0 comments on commit 683dc5a

Please sign in to comment.