From 65e55374f0040298e98ff81f040fdb4ebb46a569 Mon Sep 17 00:00:00 2001 From: Harmen Wessels Date: Thu, 7 Mar 2024 22:06:10 +0100 Subject: [PATCH 1/6] Renamed mdde_Classifier_IsMDDEMapping to mdde_Criterion_IsMDDEMapping. Created mdde_IsMDDEDataSource criterium with template to be used from other objects to check data source is MDDE and refactored criteria for BaseClassifierMapping, BaseStructuralFeatureMapping, . Updated Entity AddMapping method to use constant for the MDDE DataSource Stereotype. Created mdde_Entity_IsBusinessRule extended attribute to be consumed by other extensions. Fixed naming error in criterium from mdde_BusinessRule_IsBusinessRuleWithMapping to mdde_BusinessRule_IsBusinessRuleWithoutMapping. Fixed ExtendedSubObject/mdde_EntityExampleData mdde_EntityExampleData_EditExampleEntity method so you can also make example data for business rules with mappings. Added mdde_ExampleValueCount on ExtendedSubObject/mdde_ExampleRecord, so it can be viewed in datagrid. Added force saving the model file as XML (in Model mdde_ExportXmlAndDecompose method) to the current location to solve issue of switching to binary model. XML Export: - Added sorting in XML export for Packages, ExampleRecord, Inheritence, DependentModels (in Model template). - Added Comment to XML export of BaseStructuralFeatureMapping. - Created mdde_IsAttributeMapped extended attribute on EntityAttribute (with logic on inheritance) and added to XML Export. - Updated EntityAttribute XML Export template to produce same XML output (and newlines) as before added export extension. - Added mdde_NamedObject_XmlElementExport_Template to Example XML export. - Enabled export of Comment and Description properties for all named objects (mdde_NamedObject_XmlElementExport_Template). Model checks: - BaseClassifierMapping - New: Check duplicate source objects (MDDE) - Updated: mdde_Check_OrderOFSourceObjects. - Business rule - Moved mdde_Check_BusinessRuleHasAtLeastOneInputAttribute and mdde_Check_BusinessRuleHasAtLeastOneExample to ExpressionBusinessRule, otherwise it wouldn't show up. - EntityAttribute: - Renamed mdde_Check_ScalarBusinessRule_AttributeCodeOccursInSqlExpression to mdde_Check_ExpressionBusinessRule_AttributeCodeOccursInSqlExpression. - ExtendedSubObject/mdde_EntityExampleData - New: Check Entity Example Data Attributes (MDDE) - ExtendedSubObject/mdde_SourceObject - New: Expression business rule join conditions are in same order as attributes (MDDE) - Updated: mdde_Check_JoinConditionSpecified: Added checking FROM object, coping with literals and better error handling. - ShortcutBase - New: Shortcut is broken (MDDE) --- .../Criteria/Criteria.xml | 2 +- .../Criteria/Criteria.xml | 0 .../Extended_Attributes.xml | 0 .../mdde_Mapping_SqlExpression.xml | 0 .../Forms/Forms.xml | 0 .../Forms/MappingDetails.xml | 0 .../Templates/Templates.xml | 0 ...Mapping_Stereotyped_XmlExport_Template.xml | 0 ...iterion_ClassifierIsCustomBusinessRule.xml | 0 .../Criteria/Criteria.xml | 0 .../Forms/Forms.xml | 0 .../Forms/MappingDetails.xml | 0 ...rion_ClassifierIsAggregateBusinessRule.xml | 0 .../Forms/Forms.xml | 0 .../Forms/MappingDetails.xml | 0 ...rion_ClassifierIsNotCustomBusinessRule.xml | 0 .../Check_duplicate_source_objects_(MDDE).xml | 123 +++++++++++++++++ .../Custom_Checks/Custom_Checks.xml | 1 + .../mdde_Check_OrderOfSourceObjects.xml | 31 +++-- .../Extended_Attributes.xml | 0 .../mdde_Mapping_DefaultExample.xml | 0 .../Extended_Collections.xml | 0 .../mdde_Mapping_DefaultExample.xml | 0 .../Extended_Compositions.xml | 0 .../mdde_Mapping_Examples.xml | 0 .../mdde_SourceObjects.xml | 0 .../Forms/Forms.xml | 0 .../Forms/mdde_Mapping_Examples.xml | 0 .../Methods/Methods.xml | 0 .../Methods/mdde_Mapping_AddExample.xml | 0 .../mdde_Mapping_EditDefaultExample.xml | 0 .../Templates/Templates.xml | 0 ...seClassifierMapping_XmlExport_Template.xml | 7 +- .../Templates/mdde_IsMapping.xml | 0 .../mdde_Mapping_DefaultExampleList.xml | 0 .../mdde_Criterion_IsMDDEMapping.xml} | 4 +- .../Profile/BaseDataSource/BaseDataSource.xml | 1 + .../BaseDataSource/Criteria/Criteria.xml | 11 ++ .../Templates/Templates.xml | 11 ++ .../Templates/mdde_IsMDDEDataSource.xml | 8 ++ .../mdde_Criterion_IsMDDEDataSource.xml | 11 ++ .../mdde_BasePackage_XmlExport_Template.xml | 4 +- .../Criteria/Criteria.xml | 8 +- .../Custom_Checks/Custom_Checks.xml | 8 +- ...turalFeatureMapping_XmlExport_Template.xml | 8 +- .../mdde_Criterion_ParentIsMDDEMapping.xml | 2 +- .../Event_Handlers/Validate.xml | 4 +- .../Entity/Methods/mdde_Entity_AddMapping.xml | 4 +- .../Extended_Attributes.xml | 11 ++ .../mdde_Entity_IsBusinessRule.xml | 10 ++ .../Custom_Checks/Custom_Checks.xml | 12 -- .../Custom_Checks/Custom_Checks.xml | 2 + ...Check_BusinessRuleHasAtLeastOneExample.xml | 1 + ...usinessRuleHasAtLeastOneInputAttribute.xml | 1 + .../Templates/Templates.xml | 2 +- ...nessRule_IsBusinessRuleWithoutMapping.xml} | 4 +- .../mdde_BusinessRuleWithoutMapping.xml | 4 +- .../mdde_BusinessRule/mdde_BusinessRule.xml | 2 + ...dde_Entity_DefaultMappingList_Template.xml | 2 +- .../mdde_Entity_XmlExport_Template.xml | 8 +- .../EntityAttribute/Criteria/Criteria.xml | 2 + .../Criterion_AttributeIsInherited.xml | 11 ++ .../Extended_Attributes.xml | 11 ++ .../mdde_IsAttributeMapped.xml | 23 ++++ .../Criteria/Criteria.xml | 12 ++ .../Criterion_AttributeIsMapped.xml | 14 ++ .../Extended_Attributes.xml | 11 ++ .../mdde_IsAttributeMapped.xml | 8 ++ .../Criterion_AttributeIsNotMapped.xml | 14 ++ .../Extended_Attributes.xml | 11 ++ .../mdde_IsAttributeMapped.xml | 8 ++ .../Criterion_AttributeIsNotInherited.xml | 11 ++ .../Criteria/Criteria.xml | 2 +- .../Criteria/Criteria.xml | 0 ...iterion_ParentIsExpressionBusinessRule.xml | 0 .../Custom_Checks/Custom_Checks.xml | 2 +- ...le_AttributeCodeOccursInSqlExpression.xml} | 2 +- ...on_ParentIsBusinessRuleWithoutMapping.xml} | 4 +- .../Custom_Checks/Custom_Checks.xml | 0 .../mdde_Check_BusinessRuleAttribute.xml | 0 ...dde_EntityAttribute_XmlExport_Template.xml | 12 +- ..._Entity_Example_Data_Attributes_(MDDE).xml | 88 ++++++++++++ .../Custom_Checks/Custom_Checks.xml | 11 ++ ...de_EntityExampleData_EditExampleEntity.xml | 4 +- .../mdde_EntityExampleData.xml | 1 + .../mdde_Example_XmlExport_Template.xml | 4 + .../Extended_Attributes.xml | 11 ++ .../mdde_ExampleValueCount.xml | 14 ++ .../mdde_ExampleRecord_XmlExport_Template.xml | 2 +- .../mdde_ExampleRecord/mdde_ExampleRecord.xml | 1 + .../mdde_SourceObject/Criteria/Criteria.xml | 11 ++ .../Criteria/Criteria.xml | 11 ++ .../Custom_Checks/Custom_Checks.xml | 11 ++ ...are_in_same_order_as_attributes_(MDDE).xml | 127 ++++++++++++++++++ ...SourceObject_Is_ExpressionBusinessRule.xml | 14 ++ ...ject_CanCheck_IsExpressionBusinessRule.xml | 11 ++ .../mdde_Check_JoinConditionSpecified.xml | 45 +++++-- .../mdde_SourceObject/mdde_SourceObject.xml | 1 + .../mdde_Inheritence_XmlExport_Template.xml | 2 +- .../Methods/mdde_ExportXmlAndDecompose.xml | 3 +- .../mdde_Model_XmlExport_Template.xml | 5 +- ..._NamedObject_XmlElementExport_Template.xml | 13 +- .../extensions/MDDE_LDM/Profile/Profile.xml | 1 + .../Custom_Checks/Custom_Checks.xml | 11 ++ .../Shortcut_is_broken_(MDDE).xml | 28 ++++ .../Profile/ShortcutBase/ShortcutBase.xml | 10 ++ 106 files changed, 817 insertions(+), 88 deletions(-) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/Criteria.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/Extended_Attributes.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/mdde_Mapping_SqlExpression.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/Forms.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/MappingDetails.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/Templates.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/mdde_Mapping_Stereotyped_XmlExport_Template.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/mdde_Criterion_ClassifierIsCustomBusinessRule.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/Criteria.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/Forms.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/MappingDetails.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/mdde_Criterion_ClassifierIsAggregateBusinessRule.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/Forms.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/MappingDetails.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/mdde_Criterion_ClassifierIsNotCustomBusinessRule.xml (100%) create mode 100644 decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Check_duplicate_source_objects_(MDDE).xml rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Custom_Checks/Custom_Checks.xml (87%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml (80%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Attributes/Extended_Attributes.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Attributes/mdde_Mapping_DefaultExample.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Collections/Extended_Collections.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Collections/mdde_Mapping_DefaultExample.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Compositions/Extended_Compositions.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Compositions/mdde_Mapping_Examples.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Extended_Compositions/mdde_SourceObjects.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Forms/Forms.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Forms/mdde_Mapping_Examples.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Methods/Methods.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Methods/mdde_Mapping_AddExample.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Methods/mdde_Mapping_EditDefaultExample.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Templates/Templates.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml (89%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Templates/mdde_IsMapping.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping => mdde_Criterion_IsMDDEMapping}/Templates/mdde_Mapping_DefaultExampleList.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/{mdde_Classifier_IsMDDEMapping/mdde_Classifier_IsMDDEMapping.xml => mdde_Criterion_IsMDDEMapping/mdde_Criterion_IsMDDEMapping.xml} (78%) create mode 100644 decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/Criteria.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/Templates.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/mdde_IsMDDEDataSource.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/mdde_Criterion_IsMDDEDataSource.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/Extended_Attributes.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/mdde_Entity_IsBusinessRule.xml delete mode 100644 decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/Custom_Checks.xml rename decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/{ => Stereotypes/mdde_ExpressionBusinessRule}/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml (90%) rename decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/{ => Stereotypes/mdde_ExpressionBusinessRule}/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml (88%) rename decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/{mdde_BusinessRule_IsBusinessRuleWithMapping.xml => mdde_BusinessRule_IsBusinessRuleWithoutMapping.xml} (62%) create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Criterion_AttributeIsInherited.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/Extended_Attributes.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/mdde_IsAttributeMapped.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criteria.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Criterion_AttributeIsMapped.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/Extended_Attributes.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/mdde_IsAttributeMapped.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Criterion_AttributeIsNotMapped.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/Extended_Attributes.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/mdde_IsAttributeMapped.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criterion_AttributeIsNotInherited.xml rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping => Criterion_ParentIsBusinessRuleWithoutMapping}/Criteria/Criteria.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping => Criterion_ParentIsBusinessRuleWithoutMapping}/Criteria/Criterion_ParentIsExpressionBusinessRule/Criterion_ParentIsExpressionBusinessRule.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping => Criterion_ParentIsBusinessRuleWithoutMapping}/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml (81%) rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ScalarBusinessRule_AttributeCodeOccursInSqlExpression.xml => Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ExpressionBusinessRule_AttributeCodeOccursInSqlExpression.xml} (94%) rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping/Criterion_ParentIsIsBusinessRuleWithMapping.xml => Criterion_ParentIsBusinessRuleWithoutMapping/Criterion_ParentIsBusinessRuleWithoutMapping.xml} (81%) rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping => Criterion_ParentIsBusinessRuleWithoutMapping}/Custom_Checks/Custom_Checks.xml (100%) rename decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/{Criterion_ParentIsIsBusinessRuleWithMapping => Criterion_ParentIsBusinessRuleWithoutMapping}/Custom_Checks/mdde_Check_BusinessRuleAttribute.xml (100%) create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Custom_Checks.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/Extended_Attributes.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/mdde_ExampleValueCount.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/Criteria.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/Criteria.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/SourceObject_Is_ExpressionBusinessRule.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/SourceObject_CanCheck_IsExpressionBusinessRule.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Custom_Checks.xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Shortcut_is_broken_(MDDE).xml create mode 100644 decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/ShortcutBase.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/Criteria.xml index 7463dc2..5862f5f 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/Criteria.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/Criteria.xml @@ -6,6 +6,6 @@ WesselsH1 1 - + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/Criteria.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/Criteria.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/Criteria.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/Extended_Attributes.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/Extended_Attributes.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/Extended_Attributes.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/mdde_Mapping_SqlExpression.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/mdde_Mapping_SqlExpression.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/mdde_Mapping_SqlExpression.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Extended_Attributes/mdde_Mapping_SqlExpression.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/Forms.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/Forms.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/Forms.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/Forms.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/MappingDetails.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/MappingDetails.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/MappingDetails.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Forms/MappingDetails.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/Templates.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/Templates.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/Templates.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/Templates.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/mdde_Mapping_Stereotyped_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/mdde_Mapping_Stereotyped_XmlExport_Template.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/mdde_Mapping_Stereotyped_XmlExport_Template.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/Templates/mdde_Mapping_Stereotyped_XmlExport_Template.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/mdde_Criterion_ClassifierIsCustomBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/mdde_Criterion_ClassifierIsCustomBusinessRule.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/mdde_Criterion_ClassifierIsCustomBusinessRule.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsCustomBusinessRule/mdde_Criterion_ClassifierIsCustomBusinessRule.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/Criteria.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/Criteria.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/Criteria.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/Forms.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/Forms.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/Forms.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/Forms.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/MappingDetails.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/MappingDetails.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/MappingDetails.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/Forms/MappingDetails.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/mdde_Criterion_ClassifierIsAggregateBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/mdde_Criterion_ClassifierIsAggregateBusinessRule.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/mdde_Criterion_ClassifierIsAggregateBusinessRule.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Criteria/mdde_Criterion_ClassifierIsAggregateBusinessRule/mdde_Criterion_ClassifierIsAggregateBusinessRule.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/Forms.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/Forms.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/Forms.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/Forms.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/MappingDetails.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/MappingDetails.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/MappingDetails.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/Forms/MappingDetails.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/mdde_Criterion_ClassifierIsNotCustomBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/mdde_Criterion_ClassifierIsNotCustomBusinessRule.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/mdde_Criterion_ClassifierIsNotCustomBusinessRule.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Criteria/mdde_Criterion_ClassifierIsNotCustomBusinessRule/mdde_Criterion_ClassifierIsNotCustomBusinessRule.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Check_duplicate_source_objects_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Check_duplicate_source_objects_(MDDE).xml new file mode 100644 index 0000000..e90dee4 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Check_duplicate_source_objects_(MDDE).xml @@ -0,0 +1,123 @@ + +70F744D4-1B3D-4C91-948B-1095EF0DFD02 +Check duplicate source objects (MDDE) +1704977369 +WesselsH1 +Check whether there are duplicate source objects in the mapping (meaning the same joined object with join conditions and offset period exists as a source object more then once). +1 +This check ensures that there are no are duplicate source objects in the mapping (meaning the same joined object with join conditions and offset period exists as a source object more then once). +The following mapping have one or more duplicate source objects: +Function %Check%(obj) + ' Create all arrays to be used in this function. + ' The arrays must be created at the beginning, otherwise VBScript will complain (because of compile issues). + Dim arrSourceObjectKeyParts(), arrJoinConditionKeyParts() + + ' Initialize the result with true. + %Check% = True + + ' Create an array to store the source objects found so far. + Dim colSourceObjectKeys : Set colSourceObjectKeys = CreateObject("System.Collections.ArrayList") + + ' Retrieve the source objects from the mapping. + Dim colSourceObjects : Set colSourceObjects = obj.GetExtendedCollection("mdde_SourceObjects") + + ' If the mapping has no source objects, stop here. + If colSourceObjects.Count = 0 Then + Exit Function + End If + + ' Now loop though all source objects and construct a unique string to compare the source objects on. + Dim objSourceObject + For Each objSourceObject In colSourceObjects + ' Get the joined object. + Dim objJoinedObject : Set objJoinedObject = objSourceObject.GetExtendedAttribute("mdde_JoinedObject") + + ' If the joined object is nothing (unset), skip this source object. + If Not(objJoinedObject Is Nothing) Then + + ' We will use: SourceObject.JoinedObject.Code + SourceObject.JoinType + SourceObject.OffsetPeriod + SourceObject.OffsetValue + SourceObject.JoinConditions + ' The JoinConditions collection should be alphabetically sorted to make sure we also find equal onces if the order of the joins is different. + + ' Get the collection with join conditions of the current source object. + Dim objJoinConditions : Set objJoinConditions = objSourceObject.GetExtendedCollection("mdde_JoinConditions") + + ' If there are no join conditions, skip creating the join conditions part. + If Not(objJoinConditions Is Nothing) And objJoinConditions.Count > 0 Then + + ' Create an array to contain the join condition key parts. + ReDim arrJoinConditionKeyParts(objJoinConditions.Count) + ' Loop through the join conditions and make a sortable array of join conditions. + Dim intCurrentJoinConditionIndex + For intCurrentJoinConditionIndex = 0 To objJoinConditions.Count - 1 + Dim objJoinCondition : Set objJoinCondition = objJoinConditions.Item(intCurrentJoinConditionIndex) + ' Use the Xml Export template to get a textual representation of the join condition. + Dim TTI : Set TTI = obj.Model.FindMetaExtensionByName(objJoinCondition, PdCommon.cls_TemplateTargetItem, "mdde_JoinCondition_XmlExport_Template") + Dim strJoinConditionKey : strJoinConditionKey = objJoinCondition.EvaluateTemplate("mdde_JoinCondition_XmlExport_Template", TTI) + + ' Now we need to insert the key at the right place in the array (so the array stays alphabetically sorted). + ' So we loop over the array until we find a join condition key which is larger then the current one (or we reach the end). + ' Then we know at which position the new key needs to be and which keys to move up one position. + Dim intCompareJoinConditionIndex + Dim intNewJoinConditionKeyIndex : intNewJoinConditionKeyIndex = intCurrentJoinConditionIndex + For intCompareJoinConditionIndex = 0 To intCurrentJoinConditionIndex + ' If we find the first key which is larger then the current one, we have found the position to store the new key in. + If arrJoinConditionKeyParts(intCompareJoinConditionIndex) > strJoinConditionKey Then + ' Update the new join condition key index to the found position. + intNewJoinConditionKeyIndex = intCompareJoinConditionIndex + ' This means we have to move all keys from this position onwards one index further. + ' So we loop from the index of the new key to the last index in reverse order + Dim intOldJoinConditionIndex + For intOldJoinConditionIndex = intCurrentJoinConditionIndex - 1 To intNewJoinConditionKeyIndex Step -1 + ' Move the value of the key one index further. + arrJoinConditionKeyParts(intOldJoinConditionIndex + 1) = arrJoinConditionKeyParts(intOldJoinConditionIndex) + ' To be sure, empty the value on the old position. + arrJoinConditionKeyParts(intOldJoinConditionIndex) = vbEmpty + Next + + ' Since we found the right place, we can exit the loop. + Exit For + End If + Next + + ' Update the array to have the new join condition key at the designated index. + arrJoinConditionKeyParts(intNewJoinConditionKeyIndex) = strJoinConditionKey + Next + End If + + ' Create an array to store the source object key parts. + ' Initialize the array for 5 items in it (so upperbound 4). + ReDim arrSourceObjectKeyParts(4) + + ' Construct the first part of the source object key. + arrSourceObjectKeyParts(0) = objJoinedObject.Code + arrSourceObjectKeyParts(1) = objSourceObject.GetExtendedAttributeText("mdde_JoinType") + arrSourceObjectKeyParts(2) = objSourceObject.GetExtendedAttributeText("mdde_OffsetPeriod") + arrSourceObjectKeyParts(3) = objSourceObject.GetExtendedAttributeText("mdde_OffsetValue") + arrSourceObjectKeyParts(4) = Join(arrJoinConditionKeyParts, "&") + + ' Construct the textual representation of the source object key by joining the key parts together. + Dim strSourceObjectKey : strSourceObjectKey = Join(arrSourceObjectKeyParts, "|") + ' Now check whether the source object key already exists in the keys collection. + ' If so we have found a duplicate, so report it. + If colSourceObjectKeys.Contains(strSourceObjectKey) Then + WriteError("The mapping '" & obj.DisplayName & "' contains duplicate source objects, where the duplicate source object is: '" & objSourceObject.DisplayName & "'") + WriteDebug(" > Duplicate key: " & strSourceObjectKey) + %Check% = False + ' If we haven't found the key yet, add it to the key collection. + Else + colSourceObjectKeys.Add strSourceObjectKey + End If + + End If + Next +End Function +Function %Fix%(obj, outmsg) + ' Implement your automatic correction on <obj> here + ' filling <outmsg> as you wish + ' and return True if successful. + + outmsg = "Automatic correction not implemented" + + %Fix% = False +End Function + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Custom_Checks.xml similarity index 87% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Custom_Checks/Custom_Checks.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Custom_Checks.xml index 5ec7d1a..42359fc 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Custom_Checks/Custom_Checks.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/Custom_Checks.xml @@ -7,5 +7,6 @@ 1 + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml similarity index 80% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml index 10076f6..1b9501f 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Custom_Checks/mdde_Check_OrderOfSourceObjects.xml @@ -32,7 +32,7 @@ Function CheckSourceObjects(objMapping, boolAutoFix) ' Check whether the from is the first source join. If UCase(colSourceObjects.Item(0).GetExtendedAttributeText("mdde_JoinType")) <> "FROM" Then - WriteError("Mapping '" & objMapping.DisplayName & "': The first source objects in the mapping doesn't have join type 'FROM'!") + WriteError("Mapping '" & objMapping.DisplayName & "': The first source object in the mapping doesn't have join type 'FROM'!") CheckSourceObjects = False Exit Function End If @@ -43,7 +43,7 @@ Function CheckSourceObjects(objMapping, boolAutoFix) ' Loop over all remaining source objects to check it's join conditions (we take count - 1 since the index is starting at 0). Dim intSourceObjectCount : intSourceObjectCount = colSourceObjects.Count - 1 - ' We start at index 1, since the FROM source object is at index 0. We don't need to check the FROM source object, since it has not join conditions. + ' We start at index 1, since the FROM source object is at index 0. We don't need to check the FROM source object, since it has no join conditions. Dim intCurrentSourceObjectIndex For intCurrentSourceObjectIndex = 1 To intSourceObjectCount ' Store a reference to the current source object, @@ -61,7 +61,7 @@ Function CheckSourceObjects(objMapping, boolAutoFix) ' If we are fixing, try to fix the issue. Else ' Now we loop trough the remaining source object (current index = 1), searching for a source object which we can trade places with. - ' This means finding a source object which references only to parent object which are listed above the current source object. + ' This means finding a source object where the join condition parent object(s) are all listed above the current source object. ' When we find such a source object we can stop looping and try the current source object again (since it will be checked again later, since it's position is moved). ' Store wether we have moved anything in the loop below. Dim boolMovedSomething : boolMovedSomething = False @@ -88,7 +88,7 @@ Function CheckSourceObjects(objMapping, boolAutoFix) ' If no valid source object was found for the current index, either the referenced parent side is broken or there is a circular dependency in the mapping. If boolMovedSomething = False Then CheckSourceObjects = False - WriteError "Cannnot fix the source object order for source object '" & objCurrentSourceObject.DisplayName & "' in mapping '" & objMapping.DisplayName & "'. There is probably a circular dependency." + WriteError "Cannot fix the source object order for source object '" & objCurrentSourceObject.DisplayName & "' in mapping '" & objMapping.DisplayName & "'. There is probably a circular dependency." Exit Function End If End If @@ -104,18 +104,27 @@ Function SourceObjectHasInvalidReference(ByRef objSourceObject, ByRef colAvailab ' Initialize the reulst with false. SourceObjectHasInvalidReference = False - ' Loop over the ajcs and check the ajc-sjc against the collections, depending on the join type + ' Loop over the sourcebject join conditions and check the referenced objects in the join conditions against the available source objects (uptill now). Dim objJoinCondition For Each objJoinCondition in objSourceObject.GetExtendedCollection("mdde_JoinConditions") ' Store a reference to the references source object. - Dim objParentSouceObject : Set objParentSouceObject = objJoinCondition.GetExtendedAttribute("mdde_ParentSourceObject") - - If Not(colAvailableSourceObjects.Contains(objParentSouceObject)) Then - WriteError("The source object '" & objSourceObject.DisplayName & "' in mapping '" & objSourceObject.ParentObject.DisplayName & "' is referencing a source object '" & objParentSouceObject.DisplayName & "' which is not above the current one.") - SourceObjectHasInvalidReference = True + Dim objParentSourceObject : Set objParentSourceObject = objJoinCondition.GetExtendedAttribute("mdde_ParentSourceObject") + If objParentSourceObject is Nothing Then Exit Function End If - next + + ' Check if parent attribute is a literal value if False it continues + Dim parentIsLiteralValue : parentIsLiteralValue = objJoinCondition.GetExtendedAttribute("mdde_ParentIsLiteralValue") + If parentIsLiteralValue = False Then + + ' Store a reference to the references source object. + If Not(colAvailableSourceObjects.Contains(objParentSourceObject)) Then + WriteError("The source object '" & objSourceObject.DisplayName & "' in mapping '" & objSourceObject.ParentObject.DisplayName & "' is referencing a source object '" & objParentSourceObject.DisplayName & "' which is not above the current one.") + SourceObjectHasInvalidReference = True + Exit Function + End If + End If + Next End Function Function %Fix%(obj, outmsg) diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Attributes/Extended_Attributes.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Attributes/Extended_Attributes.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Attributes/Extended_Attributes.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Attributes/mdde_Mapping_DefaultExample.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Attributes/mdde_Mapping_DefaultExample.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Attributes/mdde_Mapping_DefaultExample.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Attributes/mdde_Mapping_DefaultExample.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Collections/Extended_Collections.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Collections/Extended_Collections.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Collections/Extended_Collections.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Collections/Extended_Collections.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Collections/mdde_Mapping_DefaultExample.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Collections/mdde_Mapping_DefaultExample.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Collections/mdde_Mapping_DefaultExample.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Collections/mdde_Mapping_DefaultExample.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Compositions/Extended_Compositions.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Compositions/Extended_Compositions.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Compositions/Extended_Compositions.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Compositions/Extended_Compositions.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Compositions/mdde_Mapping_Examples.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Compositions/mdde_Mapping_Examples.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Compositions/mdde_Mapping_Examples.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Compositions/mdde_Mapping_Examples.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Compositions/mdde_SourceObjects.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Compositions/mdde_SourceObjects.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Extended_Compositions/mdde_SourceObjects.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Extended_Compositions/mdde_SourceObjects.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Forms/Forms.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Forms/Forms.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Forms/Forms.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Forms/Forms.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Forms/mdde_Mapping_Examples.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Forms/mdde_Mapping_Examples.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Forms/mdde_Mapping_Examples.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Forms/mdde_Mapping_Examples.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Methods/Methods.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Methods/Methods.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Methods/Methods.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Methods/Methods.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Methods/mdde_Mapping_AddExample.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Methods/mdde_Mapping_AddExample.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Methods/mdde_Mapping_AddExample.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Methods/mdde_Mapping_AddExample.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Methods/mdde_Mapping_EditDefaultExample.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Methods/mdde_Mapping_EditDefaultExample.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Methods/mdde_Mapping_EditDefaultExample.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Methods/mdde_Mapping_EditDefaultExample.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/Templates.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/Templates.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/Templates.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/Templates.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml similarity index 89% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml index 9123673..0f627bf 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_BaseClassifierMapping_XmlExport_Template.xml @@ -16,10 +16,15 @@ .foreach_item(mdde_Mapping_Examples,\n <Examples>\n,\n </Examples>) %mdde_Example_XmlExport_Template% .next(\n) + .if (%mdde_NamedObject_XmlElementExport_Template%) + + %mdde_NamedObject_XmlElementExport_Template% + .endif .comment Add the content of the export extension template .if (%Model.mdde_Export_Extension_Attached%) .if (%.D:mddex_BaseClassifierMapping_Export_Content%) -%.D:mddex_BaseClassifierMapping_Export_Content% + + %.D:mddex_BaseClassifierMapping_Export_Content% .endif .endif diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_IsMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_IsMapping.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_IsMapping.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_IsMapping.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_Mapping_DefaultExampleList.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_Mapping_DefaultExampleList.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/Templates/mdde_Mapping_DefaultExampleList.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/Templates/mdde_Mapping_DefaultExampleList.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/mdde_Classifier_IsMDDEMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/mdde_Criterion_IsMDDEMapping.xml similarity index 78% rename from decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/mdde_Classifier_IsMDDEMapping.xml rename to decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/mdde_Criterion_IsMDDEMapping.xml index da21102..92ed7be 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Classifier_IsMDDEMapping/mdde_Classifier_IsMDDEMapping.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseClassifierMapping/Criteria/mdde_Criterion_IsMDDEMapping/mdde_Criterion_IsMDDEMapping.xml @@ -1,7 +1,7 @@ A2A060E6-1927-4A9C-9BBC-0D3021B68C98 -mdde_Classifier_IsMDDEMapping -(%DataSource.Stereotype%=="") Or (%DataSource.Stereotype%=="mdde_DataSource") +mdde_Criterion_IsMDDEMapping +%DataSource.mdde_IsMDDEDataSource% == "True" 1701944918 WillemOtten 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/BaseDataSource.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/BaseDataSource.xml index 15f61e7..b2a235f 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/BaseDataSource.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/BaseDataSource.xml @@ -7,5 +7,6 @@ + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/Criteria.xml new file mode 100644 index 0000000..9f05416 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/Criteria.xml @@ -0,0 +1,11 @@ + +CriterionTargetItem +8EC2655D-4D06-4870-8B2B-C0CC4132546B +Criteria +1709820290 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/Templates.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/Templates.xml new file mode 100644 index 0000000..d8dfdd0 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/Templates.xml @@ -0,0 +1,11 @@ + +TemplateTargetItem +04574872-0E16-4BE1-9404-F8EF62AE5918 +Templates +1709820334 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/mdde_IsMDDEDataSource.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/mdde_IsMDDEDataSource.xml new file mode 100644 index 0000000..929f6af --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/Templates/mdde_IsMDDEDataSource.xml @@ -0,0 +1,8 @@ + +B319137E-9329-4A06-82A5-663C4A0E5F3B +mdde_IsMDDEDataSource +True +1709820334 +WesselsH1 +1 + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/mdde_Criterion_IsMDDEDataSource.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/mdde_Criterion_IsMDDEDataSource.xml new file mode 100644 index 0000000..d0128d4 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseDataSource/Criteria/mdde_Criterion_IsMDDEDataSource/mdde_Criterion_IsMDDEDataSource.xml @@ -0,0 +1,11 @@ + +078B9AFB-C42D-4955-B7C1-9488775BD364 +mdde_Criterion_IsMDDEDataSource +(%Stereotype% == null) Or (%Stereotype% == "") Or (%Stereotype% == "mdde_DataSource") +1709820290 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/BasePackage/Templates/mdde_BasePackage_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/BasePackage/Templates/mdde_BasePackage_XmlExport_Template.xml index ef828dc..85ef703 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BasePackage/Templates/mdde_BasePackage_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BasePackage/Templates/mdde_BasePackage_XmlExport_Template.xml @@ -2,11 +2,11 @@ E0D4E34B-C088-4AEB-8CB3-EB21FFF9F211 mdde_BasePackage_XmlExport_Template .comment For all child packages, include the output of this template of the child-package. -.foreach_item(Packages,<Packages>\n,\n</Packages>\n,%IsSelected%==true) +.foreach_item(Packages,<Packages>\n,\n</Packages>\n,%IsSelected%==true,%Item1.Code% > %Item2.Code%) %mdde_Package_XmlExport_Template% .next(\n) .comment Include all Entities in current Package. -.foreach_item(Entities,<Entities>,\n</Entities>\n,%IsSelected%==true) +.foreach_item(Entities,<Entities>,\n</Entities>\n,%IsSelected%==true,%Item1.Code% > %Item2.Code%) .if (%IsShortcut%==false) %mdde_Entity_XmlExport_Template% diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Criteria/Criteria.xml index 7e455d0..711e247 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Criteria/Criteria.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Criteria/Criteria.xml @@ -1,9 +1,9 @@ - + CriterionTargetItem -94026E1B-A9E5-4BA2-A0EF-B76EF3DBEDF1 +436DE3DF-C43A-416B-9158-D08F0F1D4BB3 Criteria -1701945386 -WillemOtten +1709791623 +WesselsH1 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Custom_Checks/Custom_Checks.xml index c7edfde..5fe9141 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Custom_Checks/Custom_Checks.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Custom_Checks/Custom_Checks.xml @@ -1,9 +1,9 @@ - + CustomCheckTargetItem -968AD01E-9187-4A70-95C5-64BF34DA8503 +BB065AFA-729F-4712-B250-558BEEED188A Custom Checks -1701945386 -WillemOtten +1650377393 +WesselsH1 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Templates/mdde_BaseStructuralFeatureMapping_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Templates/mdde_BaseStructuralFeatureMapping_XmlExport_Template.xml index 43fe75c..3526df9 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Templates/mdde_BaseStructuralFeatureMapping_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/Templates/mdde_BaseStructuralFeatureMapping_XmlExport_Template.xml @@ -27,11 +27,15 @@ .endif %SourceFeature.mdde_NamedObject_XmlAttributeExport_Template% /> .endif(\n) +.if (%Comment%) + <Comment>%.X:Comment%</Comment> +.endif(\n) .comment Add the content of the export extension template .if (%Model.mdde_Export_Extension_Attached%) .if(%.D:mddex_BaseStructuralFeatureMapping_Export_Content%) -%.D:mddex_BaseStructuralFeatureMapping_Export_Content% - .endif + + %.D:mddex_BaseStructuralFeatureMapping_Export_Content% + .endif(\n) .endif </%Feature.mdde_NamedObject_XmlElementName%Mapping> 1651753617 diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/mdde_Criterion_ParentIsMDDEMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/mdde_Criterion_ParentIsMDDEMapping.xml index 1395722..d9ac779 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/mdde_Criterion_ParentIsMDDEMapping.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Criteria/mdde_Criterion_ParentIsMDDEMapping/mdde_Criterion_ParentIsMDDEMapping.xml @@ -1,7 +1,7 @@ 5D26D36B-FC93-4D44-B0CF-FB7A4ED2FB2D mdde_Criterion_ParentIsMDDEMapping -(%ClassifierMap.DataSource.Stereotype%=="") Or (%ClassifierMap.DataSource.Stereotype%=="mdde_DataSource") +%ClassifierMap.DataSource.mdde_IsMDDEDataSource% == "True" 1701945219 WillemOtten 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Event_Handlers/Validate.xml b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Event_Handlers/Validate.xml index c730524..4448cc1 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Event_Handlers/Validate.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/BaseStructuralFeatureMapping/Event_Handlers/Validate.xml @@ -6,8 +6,8 @@ 1 Function %Validate%(obj, ByRef message) 'Since event handlers cannot be defined under a criterion, first check that the validation is applicable for the object - If Not obj.ClassifierMap is nothing Then - If obj.ClassifierMap.DataSource.Stereotype = "" or obj.ClassifierMap.DataSource.Stereotype = cMDDE_DATASOURCE_STEREOTYPE Then + If Not obj.ClassifierMap Is Nothing Then + If obj.ClassifierMap.DataSource.Stereotype = "" Or obj.ClassifierMap.DataSource.Stereotype = cMDDE_DATASOURCE_STEREOTYPE Then WriteDebug "[BaseStructuralFeatureMapping.Validate] " & obj.UOL ' Check if the attribute mapping has a valid source object, and if not update it. If (AttributeMappingHasValidSourceObject(obj) = false) Then diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Methods/mdde_Entity_AddMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Methods/mdde_Entity_AddMapping.xml index 7d2fc5e..a887fae 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Methods/mdde_Entity_AddMapping.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Methods/mdde_Entity_AddMapping.xml @@ -37,9 +37,9 @@ End If ' Exit the routine if the datasource selected is not valid - If Not(objSelectedDS.stereotype = "" Or objSelectedDS.Stereotype = "mdde_DataSource") Then + If Not(objSelectedDS.Stereotype = "" Or objSelectedDS.Stereotype = cMDDE_DATASOURCE_STEREOTYPE) Then MsgBox _ - "The Data Source " & objSelectedDS.Code & " has stereotype " & objSelectedDS.stereotype & " and cannot be used for creating MDDE mappings." & vbCrLf & vbCrLf _ + "The Data Source " & objSelectedDS.Code & " has stereotype " & objSelectedDS.Stereotype & " and cannot be used for creating MDDE mappings." & vbCrLf & vbCrLf _ & "Please select or add a Data Source with a valid stereotype." & vbCrlf & vbCrLf & _ "Valid stereotypes are: " & vbCrlf & vbCrLf & _ "- Data Source (MDDE)" & vbCrlf & _ diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/Extended_Attributes.xml new file mode 100644 index 0000000..2cafd5e --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/Extended_Attributes.xml @@ -0,0 +1,11 @@ + +ExtendedAttributeTargetItem +0E9F3025-183C-4BD8-A128-B0F18A71E441 +Extended Attributes +1706689760 +BuwaldaN +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/mdde_Entity_IsBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/mdde_Entity_IsBusinessRule.xml new file mode 100644 index 0000000..80b6a3a --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Extended_Attributes/mdde_Entity_IsBusinessRule.xml @@ -0,0 +1,10 @@ + +6FE423BC-A49D-4AF7-ABB8-7CCBE29FD58A +mdde_Entity_IsBusinessRule +1706689760 +BuwaldaN +This is a extended attribute for other extentions to evaluate whether an Entity has a stereotype BusinessRule. Since GTL doesn't have a HasStereotype type of function this is a workaround to check one template. +1 +12 +True + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/Custom_Checks.xml deleted file mode 100644 index 520c6ec..0000000 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/Custom_Checks.xml +++ /dev/null @@ -1,12 +0,0 @@ - -CustomCheckTargetItem -5C470D63-5AC9-4A77-99F0-E6BF7D4174A5 -Custom Checks -1683208720 -WesselsH1 -1 - - - - - \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml index 425b5da..5ecb7ae 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml @@ -7,5 +7,7 @@ 1 + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml similarity index 90% rename from decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml rename to decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml index 456d863..d860d66 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneExample.xml @@ -3,6 +3,7 @@ mdde_Check_BusinessRuleHasAtLeastOneExample 1657118746 WesselsH1 +This should be on the level op mdde_BusinessRuleWithout mapping, but checks on that level are not visable in the modelcheck list. 1 This check ensures that every business rule has at least one example The following business rules have no examples specified: diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml similarity index 88% rename from decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml rename to decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml index 1cff720..1d05039 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Stereotypes/mdde_ExpressionBusinessRule/Custom_Checks/mdde_Check_BusinessRuleHasAtLeastOneInputAttribute.xml @@ -3,6 +3,7 @@ mdde_Check_BusinessRuleHasAtLeastOneInputAttribute 1655828224 WesselsH1 +This should be on the level op mdde_BusinessRuleWithout mapping, but checks on that level are not visable in the modelcheck list. 1 This check ensures that every business rule has at least one input attribute The following business rules have no attribute(s) with the input stereotype: diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/Templates.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/Templates.xml index 04d0762..be19b88 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/Templates.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/Templates.xml @@ -9,6 +9,6 @@ - + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/mdde_BusinessRule_IsBusinessRuleWithMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/mdde_BusinessRule_IsBusinessRuleWithoutMapping.xml similarity index 62% rename from decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/mdde_BusinessRule_IsBusinessRuleWithMapping.xml rename to decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/mdde_BusinessRule_IsBusinessRuleWithoutMapping.xml index dbdb126..8f3809d 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/mdde_BusinessRule_IsBusinessRuleWithMapping.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/Templates/mdde_BusinessRule_IsBusinessRuleWithoutMapping.xml @@ -1,9 +1,9 @@ 1A60F8F7-CAE0-4E94-8B53-92A8C2515851 -mdde_BusinessRule_IsBusinessRuleWithMapping +mdde_BusinessRule_IsBusinessRuleWithoutMapping True 1685648282 WesselsH1 -This is a template which is used in the Criterion_ParentIsIsBusinessRuleWithMapping criterion on EntityAttribute. Since GTL doesn't have a HasStereotype type of function this is a workaround to check one template. +This is a template which is used in the Criterion_ParentIsIsBusinessRuleWithoutMapping criterion on EntityAttribute. Since GTL doesn't have a HasStereotype type of function this is a workaround to check one template. 1 \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/mdde_BusinessRuleWithoutMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/mdde_BusinessRuleWithoutMapping.xml index c5bba34..41a67b8 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/mdde_BusinessRuleWithoutMapping.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/Stereotypes/mdde_BusinessRuleWithoutMapping/mdde_BusinessRuleWithoutMapping.xml @@ -3,7 +3,8 @@ mdde_BusinessRuleWithoutMapping 1656441185 WesselsH1 -Business rule without a mapping. This can be subtyped for mapping-less business rules. +Business rule without a mapping. This can be subtyped for mapping-less business rules. +Model checks on this level did not become visiable in the model check list, so they are moved to the level of mdde_ExpressionBusinessRule 1 1 @@ -17,6 +18,5 @@ - \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/mdde_BusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/mdde_BusinessRule.xml index ffab829..7a15617 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/mdde_BusinessRule.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Stereotypes/mdde_BusinessRule/mdde_BusinessRule.xml @@ -5,8 +5,10 @@ WesselsH1 1 Business rule (MDDE) +1 + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_DefaultMappingList_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_DefaultMappingList_Template.xml index 7e1933e..34852a9 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_DefaultMappingList_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_DefaultMappingList_Template.xml @@ -1,7 +1,7 @@ 69DA0FB4-8F13-4F07-BD2D-BB70AC5D51DE mdde_Entity_DefaultMappingList_Template -.collection(Mappings, (%DataSource.Stereotype%=="") Or (%DataSource.Stereotype%=="mdde_DataSource")) +.collection(Mappings, %DataSource.mdde_IsMDDEDataSource% == "True") 1653998220 WesselsH1 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_XmlExport_Template.xml index b635eb3..7314bc2 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Entity/Templates/mdde_Entity_XmlExport_Template.xml @@ -17,7 +17,7 @@ .foreach_item(Identifiers,\n <Identifiers>\n,\n </Identifiers>) %mdde_Identifier_XmlExport_Template% .next(\n) - .foreach_item(Mappings,\n <Mappings>\n,\n </Mappings>,(DataSource.Stereotype=="") Or (DataSource.Stereotype=="mdde_DataSource")) + .foreach_item(Mappings,\n <Mappings>\n,\n </Mappings>,%DataSource.mdde_IsMDDEDataSource% == "True") %mdde_BaseClassifierMapping_XmlExport_Template% .next(\n) .foreach_item(Relationships,\n <Relationships>\n,\n </Relationships>) @@ -29,7 +29,6 @@ .foreach_item(InheritsFrom,\n <InheritsFrom>\n,\n </InheritsFrom>) %mdde_InheritenceLink_XmlExport_Template% .next(\n) - .comment If the stereotype of the current entity has it's own template, include it here. .if (%mdde_Entity_Stereotyped_XmlExport_Template?%) @@ -38,10 +37,11 @@ .comment Add the content of the export extension template .if (%Model.mdde_Export_Extension_Attached%) .if(%.D:mddex_Entity_Export_Content%) -%.D:mddex_Entity_Export_Content% + + %.D:mddex_Entity_Export_Content% .endif .endif - + </%mdde_NamedObject_XmlElementName%> 1651670451 WesselsH1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criteria.xml index 3f671cd..2de4dc2 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criteria.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criteria.xml @@ -7,5 +7,7 @@ 1 + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Criterion_AttributeIsInherited.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Criterion_AttributeIsInherited.xml new file mode 100644 index 0000000..4a6b11f --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Criterion_AttributeIsInherited.xml @@ -0,0 +1,11 @@ + +004E4258-02C4-45C7-B432-5BA89B31796E +Criterion_AttributeIsInherited +%InheritedBy.Count% > 0 +1699373780 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/Extended_Attributes.xml new file mode 100644 index 0000000..274595c --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/Extended_Attributes.xml @@ -0,0 +1,11 @@ + +ExtendedAttributeTargetItem +34090D0D-59EF-4CFD-9238-D45120AE9C22 +Extended Attributes +1699373940 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/mdde_IsAttributeMapped.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/mdde_IsAttributeMapped.xml new file mode 100644 index 0000000..b414872 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsInherited/Extended_Attributes/mdde_IsAttributeMapped.xml @@ -0,0 +1,23 @@ + +20A707A0-DBC3-445C-846A-68390FE90F11 +mdde_IsAttributeMapped +1699373940 +WesselsH1 +1 +1 +RO +Function %Get%(obj) + Dim objInheritedByAttribute + For Each objInheritedByAttribute In obj.InheritedBy + Dim inheritedAttributeMapped : inheritedAttributeMapped = objInheritedByAttribute.GetExtendedAttribute("mdde_IsAttributeMapped") + ' If we find an inherited attribute which is mapped, then return true. Otherwise continue. + If (inheritedAttributeMapped = True) Then + %Get% = True + Exit Function + End If + Next + + ' If we reach this point, there is no inherited attribute mapped, so we return False. + %Get% = False +End Function + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criteria.xml new file mode 100644 index 0000000..1357a81 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criteria.xml @@ -0,0 +1,12 @@ + +CriterionTargetItem +CBD9CFEE-94F6-43A0-B454-EC5792C9A3C9 +Criteria +1699373856 +WesselsH1 +1 + + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Criterion_AttributeIsMapped.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Criterion_AttributeIsMapped.xml new file mode 100644 index 0000000..834df12 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Criterion_AttributeIsMapped.xml @@ -0,0 +1,14 @@ + +AB3A132C-E7EA-4852-85C1-2CCFCADDA758 +Criterion_AttributeIsMapped +%Mappings.Count% > 0 +1699373856 +WesselsH1 +1 + + + + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/Extended_Attributes.xml new file mode 100644 index 0000000..d19b99c --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/Extended_Attributes.xml @@ -0,0 +1,11 @@ + +ExtendedAttributeTargetItem +4FA864DF-5F14-4FC1-8B7B-F5CBBA04C76D +Extended Attributes +1699373856 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/mdde_IsAttributeMapped.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/mdde_IsAttributeMapped.xml new file mode 100644 index 0000000..a668c92 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsMapped/Extended_Attributes/mdde_IsAttributeMapped.xml @@ -0,0 +1,8 @@ + +7EF5C2E0-0EA3-462F-BE69-9F76634A4A27 +mdde_IsAttributeMapped +1699373856 +WesselsH1 +1 +TRUE + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Criterion_AttributeIsNotMapped.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Criterion_AttributeIsNotMapped.xml new file mode 100644 index 0000000..b2229f2 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Criterion_AttributeIsNotMapped.xml @@ -0,0 +1,14 @@ + +D26B9611-B8A9-4140-9C4A-FD642D3446DF +Criterion_AttributeIsNotMapped +%Mappings.Count% == 0 +1699373856 +WesselsH1 +1 + + + + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/Extended_Attributes.xml new file mode 100644 index 0000000..2d07f74 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/Extended_Attributes.xml @@ -0,0 +1,11 @@ + +ExtendedAttributeTargetItem +4980FB99-8304-425D-94FE-A836F0ACBBAE +Extended Attributes +1699373856 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/mdde_IsAttributeMapped.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/mdde_IsAttributeMapped.xml new file mode 100644 index 0000000..214efbd --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criteria/Criterion_AttributeIsNotMapped/Extended_Attributes/mdde_IsAttributeMapped.xml @@ -0,0 +1,8 @@ + +ABFB70A7-D6CB-4533-B8BD-59BB34AC9FD9 +mdde_IsAttributeMapped +1699373856 +WesselsH1 +1 +FALSE + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criterion_AttributeIsNotInherited.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criterion_AttributeIsNotInherited.xml new file mode 100644 index 0000000..5215362 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_AttributeIsNotInherited/Criterion_AttributeIsNotInherited.xml @@ -0,0 +1,11 @@ + +B3DFB1EF-527F-47A4-A73A-E42686D05059 +Criterion_AttributeIsNotInherited +%InheritedBy.Count% == 0 +1699372201 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criteria.xml index ffe506e..ab587e5 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criteria.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criteria.xml @@ -6,6 +6,6 @@ WesselsH1 1 - + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criteria.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criteria.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criteria.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Criterion_ParentIsExpressionBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Criterion_ParentIsExpressionBusinessRule.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Criterion_ParentIsExpressionBusinessRule.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Criterion_ParentIsExpressionBusinessRule.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml similarity index 81% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml index ef52f35..cc76c26 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/Custom_Checks.xml @@ -6,6 +6,6 @@ WesselsH1 1 - + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ScalarBusinessRule_AttributeCodeOccursInSqlExpression.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ExpressionBusinessRule_AttributeCodeOccursInSqlExpression.xml similarity index 94% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ScalarBusinessRule_AttributeCodeOccursInSqlExpression.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ExpressionBusinessRule_AttributeCodeOccursInSqlExpression.xml index 11b100f..2b7b6da 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ScalarBusinessRule_AttributeCodeOccursInSqlExpression.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criteria/Criterion_ParentIsExpressionBusinessRule/Custom_Checks/mdde_Check_ExpressionBusinessRule_AttributeCodeOccursInSqlExpression.xml @@ -1,6 +1,6 @@ DE43B8C8-A0B8-4522-8AB4-770DD48156AD -mdde_Check_ScalarBusinessRule_AttributeCodeOccursInSqlExpression +mdde_Check_ExpressionBusinessRule_AttributeCodeOccursInSqlExpression 1655828611 WesselsH1 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criterion_ParentIsIsBusinessRuleWithMapping.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criterion_ParentIsBusinessRuleWithoutMapping.xml similarity index 81% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criterion_ParentIsIsBusinessRuleWithMapping.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criterion_ParentIsBusinessRuleWithoutMapping.xml index bce24f3..87eb7b2 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Criterion_ParentIsIsBusinessRuleWithMapping.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Criterion_ParentIsBusinessRuleWithoutMapping.xml @@ -1,7 +1,7 @@ A6FE577D-0DC1-411C-96B1-CA7D7CD594FD -Criterion_ParentIsIsBusinessRuleWithMapping -%Parent.mdde_BusinessRule_IsBusinessRuleWithMapping% == "True" +Criterion_ParentIsBusinessRuleWithoutMapping +%Parent.mdde_BusinessRule_IsBusinessRuleWithoutMapping% == "True" 1685648453 WesselsH1 1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Custom_Checks/Custom_Checks.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Custom_Checks/Custom_Checks.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Custom_Checks/Custom_Checks.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Custom_Checks/mdde_Check_BusinessRuleAttribute.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleAttribute.xml similarity index 100% rename from decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsIsBusinessRuleWithMapping/Custom_Checks/mdde_Check_BusinessRuleAttribute.xml rename to decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Criteria/Criterion_ParentIsBusinessRule/Criteria/Criterion_ParentIsBusinessRuleWithoutMapping/Custom_Checks/mdde_Check_BusinessRuleAttribute.xml diff --git a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Templates/mdde_EntityAttribute_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Templates/mdde_EntityAttribute_XmlExport_Template.xml index 7d7f0be..11a9291 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Templates/mdde_EntityAttribute_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/EntityAttribute/Templates/mdde_EntityAttribute_XmlExport_Template.xml @@ -24,17 +24,21 @@ .if (%Mandatory%) Mandatory="%Mandatory%" .endif +.if (%mdde_IsAttributeMapped%) + IsAttributeMapped="%.U:mdde_IsAttributeMapped%" +.endif > .if (%mdde_NamedObject_XmlElementExport_Template%) -\n %mdde_NamedObject_XmlElementExport_Template% + + %mdde_NamedObject_XmlElementExport_Template% .endif(\n) .comment Add the content of the export extension template .if (%Model.mdde_Export_Extension_Attached%) .if(%.D:mddex_EntityAttribute_Export_Content%) -%.D:mddex_EntityAttribute_Export_Content% - .endif -.endif + %.D:mddex_EntityAttribute_Export_Content% + .endif(\n) +.endif </%mdde_NamedObject_XmlElementName%> 1651670975 WesselsH1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml new file mode 100644 index 0000000..5906fa8 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml @@ -0,0 +1,88 @@ + +D515BB63-1DD5-41D2-9C5E-46424B854D49 +Check Entity Example Data Attributes (MDDE) +1709626112 +WesselsH1 +This model check verifies that for example data of an entity, the attributes used across the example records are all the same. +1 +This model check verifies that for example data of an entity, the attributes used across the example records are all the same. +The following entity example data don't have consistant usage of attributes: +Function %Check%(obj) + ' Initialize the output with true. + %Check% = True + + ' Get the example records. + Dim colExampleRecords : Set colExampleRecords = obj.GetExtendedCollection("mdde_ExampleRecords") + + ' If there are no or 1 record, we don't need to check anything. + If (colExampleRecords.Count <= 1) Then + Exit Function + End If + + ' There are multiple records, so we need to verify all used attributes are the same across the records. + Dim objExampleRecord + Dim colExampleAttributes + Dim intExampleRecordCount : intExampleRecordCount = 0 + For Each objExampleRecord In colExampleRecords + ' Increase the example record count. + intExampleRecordCount = intExampleRecordCount + 1 + ' When this is the first iteration in the loop, store the example attributes of the first record. + If intExampleRecordCount = 1 Then + Set colExampleAttributes = CreateObject("System.Collections.ArrayList") + + ' Get the record values for the current record. + Dim colFirstExampleRecordValues : Set colFirstExampleRecordValues = objExampleRecord.GetExtendedCollection("mdde_ExampleAttributeValues") + + Dim objFirstExampleRecordValue + ' Loop through the attributes and store them in the array list. + For Each objFirstExampleRecordValue In colFirstExampleRecordValues + Dim objFirstAttribute : Set objFirstAttribute = objFirstExampleRecordValue.GetExtendedAttribute("mdde_Attribute") + colExampleAttributes.Add objFirstAttribute + Next + + ' For all remaining records (so after the first record), we check whether they all use the same attributes. + Else + + ' Get the record values for the current record. + Dim colExampleRecordValues : Set colExampleRecordValues = objExampleRecord.GetExtendedCollection("mdde_ExampleAttributeValues") + ' If the number of values is different then the first row, we can stop checking. + If (colExampleRecordValues.Count <> colExampleAttributes.Count) Then + WriteError("The number of attributes specified for example record " & intExampleRecordCount & " is different then the first one. They should all be the same!") + %Check% = False + Exit Function + End If + + ' Loop through the attributes and check whether they are in the colExampleAttributes array. + Dim objExampleRecordValue + Dim intExampleRecordValueCount : intExampleRecordValueCount = 0 + For Each objExampleRecordValue In colExampleRecordValues + intExampleRecordValueCount = intExampleRecordValueCount + 1 + Dim objAttribute : Set objAttribute = objExampleRecordValue.GetExtendedAttribute("mdde_Attribute") + + If (objAttribute Is Nothing) Then + WriteError("Example value " & intExampleRecordValueCount & " within record " & intExampleRecordCount & " doesn't reference an attribute!") + %Check% = False + Exit Function + End If + + If (Not(colExampleAttributes.Contains(objAttribute))) Then + WriteError("Example record " & intExampleRecordCount & " uses an attribute '" & objAttribute.DisplayName & "' which is not used in the first record. All records within one example must specify the same attributes!") + %Check% = False + Exit Function + End If + Next + + End If + Next + +End Function +Function %Fix%(obj, outmsg) + ' Implement your automatic correction on <obj> here + ' filling <outmsg> as you wish + ' and return True if successful. + + outmsg = "Automatic correction not implemented" + + %Fix% = False +End Function + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Custom_Checks.xml new file mode 100644 index 0000000..8de4508 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Custom_Checks.xml @@ -0,0 +1,11 @@ + +CustomCheckTargetItem +062D6982-786F-4CDB-9014-4752AF115899 +Custom Checks +1709626112 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Methods/mdde_EntityExampleData_EditExampleEntity.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Methods/mdde_EntityExampleData_EditExampleEntity.xml index dc0eaaa..e026325 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Methods/mdde_EntityExampleData_EditExampleEntity.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Methods/mdde_EntityExampleData_EditExampleEntity.xml @@ -10,9 +10,9 @@ If Not(objSel Is Nothing) Then Dim objSourceEntity For Each objSourceEntity in obj.ParentObject.ParentObject.SourceClassifiers - ' Skip busienss rules. + ' Skip business rules without mapping. Dim objRealSourceEntity : Set objRealSourceEntity = GetRealObject(objSourceEntity) - If Not(objRealSourceEntity.HasStereotype("mdde_BusinessRule")) Then + If Not(objRealSourceEntity.HasStereotype("mdde_BusinessRuleWithoutMapping")) Then objSel.Objects.Add objSourceEntity End If Next diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/mdde_EntityExampleData.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/mdde_EntityExampleData.xml index 4db8654..788e761 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/mdde_EntityExampleData.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/mdde_EntityExampleData.xml @@ -12,5 +12,6 @@ + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_Example/Templates/mdde_Example_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_Example/Templates/mdde_Example_XmlExport_Template.xml index e308bfc..3ba3556 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_Example/Templates/mdde_Example_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_Example/Templates/mdde_Example_XmlExport_Template.xml @@ -2,6 +2,10 @@ 1098748A-0062-4042-8B95-04FA34ECAE2B mdde_Example_XmlExport_Template <%mdde_NamedObject_XmlElementName% %mdde_NamedObject_XmlAttributeExport_Template%> +.if (%mdde_NamedObject_XmlElementExport_Template%) + + %mdde_NamedObject_XmlElementExport_Template% +.endif .if(%mdde_Example_Stereotyped_XmlExport_Template?%) %mdde_Example_Stereotyped_XmlExport_Template% .endif() diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/Extended_Attributes.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/Extended_Attributes.xml new file mode 100644 index 0000000..e959a29 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/Extended_Attributes.xml @@ -0,0 +1,11 @@ + +ExtendedAttributeTargetItem +CD178450-271F-47CC-B256-A5F8AF3FB6E0 +Extended Attributes +1705399732 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/mdde_ExampleValueCount.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/mdde_ExampleValueCount.xml new file mode 100644 index 0000000..042debe --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Extended_Attributes/mdde_ExampleValueCount.xml @@ -0,0 +1,14 @@ + +D1FC66EF-286B-4E30-AD2D-E857ECC49A95 +mdde_ExampleValueCount +1705399732 +WesselsH1 +1 +10 +1 +RO +Function %Get%(obj) + %Get% = obj.GetExtendedCollection("mdde_ExampleAttributeValues").Count +End Function +Example value count (MDDE) + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Templates/mdde_ExampleRecord_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Templates/mdde_ExampleRecord_XmlExport_Template.xml index 012b182..df75290 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Templates/mdde_ExampleRecord_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/Templates/mdde_ExampleRecord_XmlExport_Template.xml @@ -1,7 +1,7 @@ 1D4B8202-E351-446D-BAD7-FEC0DEA4300A mdde_ExampleRecord_XmlExport_Template -.foreach_item(mdde_ExampleAttributeValues,\n<ExampleRecord>\n,\n</ExampleRecord>) +.foreach_item(mdde_ExampleAttributeValues,\n<ExampleRecord>\n,\n</ExampleRecord>,,%Item1.Code% > %Item2.Code%) %mdde_ExampleAttributeValue_XmlExport_Template% .next(\n) 1666188164 diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/mdde_ExampleRecord.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/mdde_ExampleRecord.xml index cd57de3..01f691b 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/mdde_ExampleRecord.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_ExampleRecord/mdde_ExampleRecord.xml @@ -9,5 +9,6 @@ + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/Criteria.xml new file mode 100644 index 0000000..6f2957e --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/Criteria.xml @@ -0,0 +1,11 @@ + +CriterionTargetItem +94AB94DC-411F-41BC-8DC5-850801880692 +Criteria +1700599237 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/Criteria.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/Criteria.xml new file mode 100644 index 0000000..5c137a7 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/Criteria.xml @@ -0,0 +1,11 @@ + +CriterionTargetItem +4DAEAC12-195E-4FF9-9AB0-61643B788616 +Criteria +1700599379 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml new file mode 100644 index 0000000..855e1a6 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Custom_Checks.xml @@ -0,0 +1,11 @@ + +CustomCheckTargetItem +11B6F5A1-D243-445F-AD2F-841F3E4AB8D9 +Custom Checks +1700599454 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml new file mode 100644 index 0000000..bedc600 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml @@ -0,0 +1,127 @@ + +B032A37D-0C10-44F1-A7BD-C7BCDE0F4A61 +Expression business rule join conditions are in same order as attributes (MDDE) +1700599454 +WesselsH1 +For expression business rules the join conditions need to be in the same order as the attributes of the business rule. Meaning when applying a business rule the order of the business rule attribute in the join conditions must be the same order as the list of attributes of the business rule itself. + +If this isn't the case this model check will report an error, and with autofix the order can be automatically updated. +1 +This check ensures that all join conditions for expression business rules are in the correct order. +The following source objects have the join conditions in the wrong order: +Function %Check%(obj) + %Check% = CheckOrFixJoinConditions(obj, False) +End Function + +Function CheckOrFixJoinConditions(objSourceObject, boolAutoFix) + ' Initialize result with True, only return False if an error is found. + CheckOrFixJoinConditions = True + + ' Get the join conditions. + Dim colJoinConditions : Set colJoinConditions = objSourceObject.GetExtendedCollection("mdde_JoinConditions") + + ' If there are no join conditions, stop checking since this is handled in another model check. + If colJoinConditions Is Nothing Then + Exit Function + End If + If colJoinConditions.Count = 0 Then + Exit Function + End If + + ' Get the source object. + ' We don't need to check whether the source object is defined, this is handled by the criteria. + Dim objExpressionBusinessRule : Set objExpressionBusinessRule = objSourceObject.GetExtendedAttribute("mdde_JoinedObject") + ' The last attribute index, so it's the count minus 1 (since it's zero based index). + Dim intLastBRAttributeIndex : intLastBRAttributeIndex = objExpressionBusinessRule.Attributes.Count - 1 + Dim intCurrentAttributeIndex + ' Keep track of the number of input attributes we processed. + ' We start with -1, so in the first cycle it jump to 0 and that's the index of the join condition this attribute should be references. + Dim intCurrentInputAttributeIndex : intCurrentInputAttributeIndex = -1 + For intCurrentAttributeIndex = 0 To intLastBRAttributeIndex + Dim objBRAttribute : Set objBRAttribute = objExpressionBusinessRule.Attributes.Item(intCurrentAttributeIndex) + + ' If the business rule attribute is an input attribute, continu checking... + If objBRAttribute.HasStereotype("mdde_InputAttribute") Then + ' We found an input attribute, so lets increase the input attribute index. + intCurrentInputAttributeIndex = intCurrentInputAttributeIndex + 1 + + ' If the index is higher then the number of join conditions, report an error (count minus 1 because zero based indexes). + If intCurrentInputAttributeIndex > colJoinConditions.Count - 1 Then + CheckOrFixJoinConditions = False + WriteError("There are less join conditions specified then input attributes exist on the business rule!") + Exit Function + End If + + ' Get the join condition on the input attribute index. + Dim objCurrentJoinCondition : Set objCurrentJoinCondition = colJoinConditions.Item(intCurrentInputAttributeIndex) + + ' Get a reference on the join condition child attribute. + Dim objJoinConditionChildAttribute : Set objJoinConditionChildAttribute = objCurrentJoinCondition.GetExtendedAttribute("mdde_ChildAttribute") + + ' Check whether the child attribute is set. + If objJoinConditionChildAttribute Is Nothing Then + CheckOrFixJoinConditions = False + WriteError("The join conditions on position " & (intCurrentInputAttributeIndex + 1) & " has no child attribute specified!") + Exit Function + End If + + ' Check the join condition references to the input attribute, if not report an error. + If objJoinConditionChildAttribute.ObjectID <> objBRAttribute.ObjectID Then + If boolAutoFix = True Then + ' We are asked to autofix the issue, so let's see whether we can find another join condition which is the right one for the current position. + ' We start at the next position. + Dim intOtherJoinConditionIndex + Dim boolMovedSomething : boolMovedSomething = False + For intOtherJoinConditionIndex = intCurrentInputAttributeIndex + 1 To colJoinConditions.Count - 1 + ' Get a reference on the other join condition. + Dim objOtherJoinCondition : Set objOtherJoinCondition = colJoinConditions.Item(intOtherJoinConditionIndex) + ' Get a reference on the join condition child attribute. + Dim objOtherJoinConditionChildAttribute : Set objOtherJoinConditionChildAttribute = objOtherJoinCondition.GetExtendedAttribute("mdde_ChildAttribute") + ' Check whether the other join condition child attribute is the one we are looking for. + If Not(objOtherJoinConditionChildAttribute Is Nothing) Then + If objOtherJoinConditionChildAttribute.ObjectID = objBRAttribute.ObjectID Then + ' We have found the right join condition for the current position, so let's move it. + colJoinConditions.Move intCurrentInputAttributeIndex, intOtherJoinConditionIndex + boolMovedSomething = True + ' Exit the For loop. + Exit For + End If + End If + Next + + If boolMovedSomething = False Then + CheckOrFixJoinConditions = False + WriteError("Couldn't find join condition for business rule attribute '" & objBRAttribute.DisplayName & "'!") + Exit Function + End If + + Else + CheckOrFixJoinConditions = False + WriteError("The join condition on the " & (intCurrentInputAttributeIndex + 1) & " position is not referencing the child attribute '" & objBRAttribute.DisplayName & "'!") + Exit Function + End If + End If + End If + Next + + ' At this point we handled all business rule input attributes. + ' If there are still unchecked join conditions, there are to many, so we report an error. + If (colJoinConditions.Count - 1) > intCurrentInputAttributeIndex Then + CheckOrFixJoinConditions = False + WriteError("There are more join conditions specified (" & colJoinConditions.Count & ") then input attributes exist on the business rule (" & (intCurrentInputAttributeIndex + 1) & ")!") + Exit Function + End If +End Function + +Function %Fix%(obj, outmsg) + Dim boolAutoCorrected : boolAutoCorrected = CheckOrFixJoinConditions(obj, True) + If boolAutoCorrected Then + outmsg = "The join conditions where successfully re-arranged to the right order." + Else + outmsg = "An error occured while re-arragning the join conditions!" + End If + + %Fix% = boolAutoCorrected +End Function +1 + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/SourceObject_Is_ExpressionBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/SourceObject_Is_ExpressionBusinessRule.xml new file mode 100644 index 0000000..3375d42 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/SourceObject_Is_ExpressionBusinessRule.xml @@ -0,0 +1,14 @@ + +1940325C-3F83-4AB2-ABD7-BAA59E936DB1 +SourceObject Is ExpressionBusinessRule +%mdde_JoinedObject.mdde_Entity_IsExpressionBusinessRule% == "True" +1700599379 +WesselsH1 +1 + + + + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/SourceObject_CanCheck_IsExpressionBusinessRule.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/SourceObject_CanCheck_IsExpressionBusinessRule.xml new file mode 100644 index 0000000..233e1d5 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/SourceObject_CanCheck_IsExpressionBusinessRule.xml @@ -0,0 +1,11 @@ + +361D1062-019C-434A-8065-8CEF093B1556 +SourceObject CanCheck IsExpressionBusinessRule +%mdde_JoinedObject.mdde_Entity_IsExpressionBusinessRule?% +1700599237 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Custom_Checks/mdde_Check_JoinConditionSpecified.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Custom_Checks/mdde_Check_JoinConditionSpecified.xml index ecf2501..16e8dab 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Custom_Checks/mdde_Check_JoinConditionSpecified.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Custom_Checks/mdde_Check_JoinConditionSpecified.xml @@ -11,10 +11,21 @@ %Check% = True ' Get the join type of the entity in current source object. Dim JoinType : JoinType = obj.GetExtendedAttributeText("mdde_JoinType") - 'Exclude join type From' - If Not(UCase(JoinType) = "FROM") Then + ' Get the join conditions of the source object. + Dim objJoinConditions : Set objJoinConditions = obj.GetExtendedCollection("mdde_JoinConditions", False) + + ' For FROM join types we expect an empty list of join conditions. + If (UCase(JoinType) = "FROM") Then + If Not(objJoinConditions Is Nothing) Then + If objJoinConditions.Count > 0 Then + WriteError("Join conditions are specified for the FROM source object '" & obj.DisplayName & "', there should be none.") + %Check% = False + End If + End If + + ' For all non-FROM join types we check the contents. + Else 'Make sure join codition is specified - Dim objJoinConditions : Set objJoinConditions = obj.GetExtendedCollection("mdde_JoinConditions", False) Dim objMapping : Set objMapping = obj.ParentObject Dim objEntity : Set objEntity = objMapping.Classifier @@ -30,19 +41,31 @@ Else ' Check join condition completeness Dim JoinCondition - For Each JoinCondition In objJoinConditions - Dim objChildAttribute : Set objChildAttribute = JoinCondition.GetExtendedAttribute("mdde_ChildAttribute") - Dim objParentAttribute : Set objParentAttribute = JoinCondition.GetExtendedAttribute("mdde_ParentAttribute") - Dim strJoinOperator : strJoinOperator = JoinCondition.GetExtendedAttributeText("mdde_JoinOperator") - If (objChildAttribute is Nothing) Or (objParentAttribute Is Nothing) Or (Len(strJoinOperator) = 0) Then - WriteError( "Part(s) of the join conditions are missing for source object '" & obj.DisplayName & "' in the mapping '" & objMapping.DisplayName & "' for entity '" & objEntity.DisplayName & "'") + For Each JoinCondition In objJoinConditions + + Dim objChildAttribute : Set objChildAttribute = JoinCondition.GetExtendedAttribute("mdde_ChildAttribute") + If (objChildAttribute is Nothing) Then + WriteError( "The Child Attribute of the join condition is missing for the source object '" & obj.DisplayName & "' in the mapping '" & objMapping.DisplayName & "' for entity '" & objEntity.DisplayName & "'") %Check% = False - Exit For End If + + Dim strJoinOperator : strJoinOperator = JoinCondition.GetExtendedAttributeText("mdde_JoinOperator") + If (Len(strJoinOperator) = 0) Then + WriteError( "The Join Operator of the join condition is missing for the source object '" & obj.DisplayName & "' in the mapping '" & objMapping.DisplayName & "' for entity '" & objEntity.DisplayName & "'") + %Check% = False + End If + + ' Check if parent attribute is a literal value if False and Parent Attribute is empty the error message below will be executed + Dim parentIsLiteralValue : parentIsLiteralValue = JoinCondition.GetExtendedAttribute("mdde_ParentIsLiteralValue") + Dim objParentAttribute : Set objParentAttribute = JoinCondition.GetExtendedAttribute("mdde_ParentAttribute") + + If (parentIsLiteralValue = False) and (objParentAttribute is Nothing) Then + WriteError( "The Parent Attribute of the join condition is missing for the source object '" & obj.DisplayName & "' in the mapping '" & objMapping.DisplayName & "' for entity '" & objEntity.DisplayName & "'") + %Check% = False + End If Next End If End If - End Function Function %Fix%(obj, outmsg) ' Implement your automatic correction on <obj> here diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/mdde_SourceObject.xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/mdde_SourceObject.xml index 4c96a8b..e9b89b9 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/mdde_SourceObject.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/mdde_SourceObject.xml @@ -200,5 +200,6 @@ A05477FF9E5376FF9C5275FF9B4F73FF994C71FF4D2639800000000000000000 + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/Inheritance/Templates/mdde_Inheritence_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/Inheritance/Templates/mdde_Inheritence_XmlExport_Template.xml index dbbf9a2..00fec14 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Inheritance/Templates/mdde_Inheritence_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Inheritance/Templates/mdde_Inheritence_XmlExport_Template.xml @@ -3,7 +3,7 @@ mdde_Inheritence_XmlExport_Template <%mdde_NamedObject_XmlElementName% %mdde_NamedObject_XmlAttributeExport_Template%> .comment Loop over the ChildEntities to list them. - .foreach_item(ChildEntities,\n <ChildEntities>\n,\n </ChildEntities>,%Generated%==true) + .foreach_item(ChildEntities,\n <ChildEntities>\n,\n </ChildEntities>,%Generated%==true,%Item1.Code% > %Item2.Code%) <%mdde_NamedObject_XmlElementName% ModelCode="%.X:Model.Code%" %mdde_NamedObject_XmlAttributeExport_Template% /> .next(\n) diff --git a/decomposed/extensions/MDDE_LDM/Profile/Model/Methods/mdde_ExportXmlAndDecompose.xml b/decomposed/extensions/MDDE_LDM/Profile/Model/Methods/mdde_ExportXmlAndDecompose.xml index 1b72302..dc65687 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Model/Methods/mdde_ExportXmlAndDecompose.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Model/Methods/mdde_ExportXmlAndDecompose.xml @@ -16,7 +16,8 @@ ' Save any change to the model file before exporting and decomposing. WriteDebug "Saving the model" - obj.Save() + ' We force save the file in XML format here to make sure it's XML before decomposing. + obj.Save obj.Filename, False, "XML" ' Decompose the model. obj.ExecuteCustomMethod(cMDDE_EXT_CODE & ".mdde_Decompose") diff --git a/decomposed/extensions/MDDE_LDM/Profile/Model/Templates/mdde_Model_XmlExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/Model/Templates/mdde_Model_XmlExport_Template.xml index 02174cf..322d44f 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Model/Templates/mdde_Model_XmlExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Model/Templates/mdde_Model_XmlExport_Template.xml @@ -8,7 +8,7 @@ .endif() .comment Include a list of source models. .set_value(CurrentModelID, %ObjectID%) - .foreach_item(TargetModels,\n <DependentModels>\n," </DependentModels>",%TargetModelType%=="Logical Data Model") + .foreach_item(TargetModels,\n <DependentModels>\n," </DependentModels>",%TargetModelType%=="Logical Data Model",%Item1.Code% > %Item2.Code%) .if (%Used%) && (%TargetModelID% != %CurrentModelID%) <DependentModel Id="%TargetModelID%" Code="%Code%" Name="%Name%" /> .endif(\n) @@ -19,7 +19,8 @@ .comment Add the content of the export extension template .if (%mdde_Export_Extension_Attached%) .if(%.D:mddex_Model_Export_Content%) -%.D:mddex_Model_Export_Content% + + %.D:mddex_Model_Export_Content% .endif .endif() diff --git a/decomposed/extensions/MDDE_LDM/Profile/NamedObject/Templates/mdde_NamedObject_XmlElementExport_Template.xml b/decomposed/extensions/MDDE_LDM/Profile/NamedObject/Templates/mdde_NamedObject_XmlElementExport_Template.xml index 7dd33fe..0eed9cc 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/NamedObject/Templates/mdde_NamedObject_XmlElementExport_Template.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/NamedObject/Templates/mdde_NamedObject_XmlElementExport_Template.xml @@ -1,16 +1,15 @@ 4F397B8D-E026-4659-9A1A-2967B19E566E mdde_NamedObject_XmlElementExport_Template -.comment Disabled the Comment and Description export for now, since it makes the export larger and we don't need these. -.comment .if (%Comment?%) -.comment .if (%Comment%) -.comment <Comment>%.X:Comment%</Comment> -.comment .endif -.comment .endif +.if (%Comment?%) +.if (%Comment%) +<Comment>%.X:Comment%</Comment> +.endif(\n) +.endif .comment .if (%Description?%) .comment .if (%Description%) .comment <Description>%.X:mdde_Description_Rtf2Ascii%</Description> -.comment .endif +.comment .endif(\n) .comment .endif 1651675822 WesselsH1 diff --git a/decomposed/extensions/MDDE_LDM/Profile/Profile.xml b/decomposed/extensions/MDDE_LDM/Profile/Profile.xml index 7fe7836..1195c72 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/Profile.xml +++ b/decomposed/extensions/MDDE_LDM/Profile/Profile.xml @@ -20,6 +20,7 @@ + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Custom_Checks.xml b/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Custom_Checks.xml new file mode 100644 index 0000000..71f42fd --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Custom_Checks.xml @@ -0,0 +1,11 @@ + +CustomCheckTargetItem +08E6782A-222D-48CE-95A3-CEA23D66540B +Custom Checks +1699530450 +WesselsH1 +1 + + + + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Shortcut_is_broken_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Shortcut_is_broken_(MDDE).xml new file mode 100644 index 0000000..73ed412 --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/Custom_Checks/Shortcut_is_broken_(MDDE).xml @@ -0,0 +1,28 @@ + +5CA1FF92-8AB6-4DB1-A273-11DD1ED0A3DE +Shortcut is broken (MDDE) +1699530450 +WesselsH1 +The model check, checks whether the current shortcut is broken. +1 +The model check, checks whether the current shortcut is broken. Meaning it cannot find the object it points to. In PowerDesigner the Shortcut has the status 'Not Found' when this is the case. + +You can re-map the shortcut to the object is should point to by opening the shortcut and select 'Change Target Object'. +The following shortcuts are broken: +Function %Check%(obj) + %Check% = True + ' If the status of a shortcut is 'Not Found', then it's broken. + If obj.Status = "Not Found" Then + %Check% = False + End If +End Function +Function %Fix%(obj, outmsg) + ' Implement your automatic correction on <obj> here + ' filling <outmsg> as you wish + ' and return True if successful. + + outmsg = "Automatic correction not implemented" + + %Fix% = False +End Function + \ No newline at end of file diff --git a/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/ShortcutBase.xml b/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/ShortcutBase.xml new file mode 100644 index 0000000..d1d6e4d --- /dev/null +++ b/decomposed/extensions/MDDE_LDM/Profile/ShortcutBase/ShortcutBase.xml @@ -0,0 +1,10 @@ + +7CEC7356-D603-42B4-BA5F-44C918281E6A +ShortcutBase +1699530450 +WesselsH1 +1 + + + + \ No newline at end of file From 856913a5a94980830174eed9d82d9c5e0704d81e Mon Sep 17 00:00:00 2001 From: Harmen Wessels Date: Thu, 7 Mar 2024 22:22:42 +0100 Subject: [PATCH 2/6] Updated model xml exports after extension update. --- .../models/ExampleDWH/EXAMPLEDWH.model.xml | 344 ++++++++++++++++++ .../ExampleSource/EXAMPLESOURCE.model.xml | 41 ++- .../models/Reference/REFERENCE.model.xml | 8 +- 3 files changed, 369 insertions(+), 24 deletions(-) create mode 100644 decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml diff --git a/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml b/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml new file mode 100644 index 0000000..4dd2b81 --- /dev/null +++ b/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml @@ -0,0 +1,344 @@ + + + + + + + + + Aggregate the total of sales order to customer level. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Business rule to get the last sales order per customer. We use a custom business rule here, since we can't model it using the standard filter rule. + + + + + + + + + + + + + + + + + + + + + + WITH SalesOrdersCTE AS ( + SELECT + Id, + OrderDate, + OrderNumber, + CustomerId, + TotalAmount, + -- Create a row-number for the order per customer, this way we can filter on the last order. + ROW_NUMBER() OVER (PARTITION BY CustomerId ORDER BY OrderDate DESC) AS CustomerOrderRowNumber + FROM SalesOrder + ) + SELECT + Id, + OrderDate, + OrderNumber, + CustomerId, + TotalAmount + FROM SalesOrdersCTE + -- Only the last SalesOrder record per customer. + WHERE CustomerOrderRowNumber = 1 + + + + Example which only expected the last SalesOrder of a single Customer. + + + + + + + + + + + Calculate the age of order + + + + + + DATEDIFF(DAY, @ORDER_DATE, @CURRENT_DATE) AS ORDER_AGE_IN_DAYS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Merge the firstname and lastname of a customer. + + + + + + FIRST_NAME || ' ' || LAST_NAME AS FULL_NAME + + + + + + + + + + + + + + Only include records where the country is the Netherlands. + + + + @COUNTRY_CODE = 'NL' + + + When the country is equal to 'NL', the record should be included. + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/decomposed/models/ExampleSource/EXAMPLESOURCE.model.xml b/decomposed/models/ExampleSource/EXAMPLESOURCE.model.xml index 93536c4..33848ac 100644 --- a/decomposed/models/ExampleSource/EXAMPLESOURCE.model.xml +++ b/decomposed/models/ExampleSource/EXAMPLESOURCE.model.xml @@ -1,18 +1,19 @@ - + - - - - - + + + + + + - + - + @@ -21,21 +22,20 @@ - + - + - - - - - - + + + + + - + - + @@ -44,6 +44,7 @@ - + - \ No newline at end of file + + \ No newline at end of file diff --git a/decomposed/models/Reference/REFERENCE.model.xml b/decomposed/models/Reference/REFERENCE.model.xml index 3144e86..cfba9ef 100644 --- a/decomposed/models/Reference/REFERENCE.model.xml +++ b/decomposed/models/Reference/REFERENCE.model.xml @@ -3,12 +3,12 @@ - - - + + + - + From fed892213868a11fd220c24ffe0b9638c8fd9001 Mon Sep 17 00:00:00 2001 From: Harmen Wessels <97173058+harmen-xb@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:20:50 +0100 Subject: [PATCH 3/6] Updated Check Entity Example Data Attributes (MDDE) to also verify first record attribute. --- .../Check_Entity_Example_Data_Attributes_(MDDE).xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml index 5906fa8..86a99c9 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_EntityExampleData/Custom_Checks/Check_Entity_Example_Data_Attributes_(MDDE).xml @@ -37,6 +37,13 @@ ' Loop through the attributes and store them in the array list. For Each objFirstExampleRecordValue In colFirstExampleRecordValues Dim objFirstAttribute : Set objFirstAttribute = objFirstExampleRecordValue.GetExtendedAttribute("mdde_Attribute") + + If (objFirstAttribute Is Nothing) Then + WriteError("Example value '" & objFirstExampleRecordValue.DisplayName & "' within record " & intExampleRecordCount & " doesn't reference an attribute!") + %Check% = False + Exit Function + End If + colExampleAttributes.Add objFirstAttribute Next @@ -60,7 +67,7 @@ Dim objAttribute : Set objAttribute = objExampleRecordValue.GetExtendedAttribute("mdde_Attribute") If (objAttribute Is Nothing) Then - WriteError("Example value " & intExampleRecordValueCount & " within record " & intExampleRecordCount & " doesn't reference an attribute!") + WriteError("Example value '" & objExampleRecordValue.DisplayName & "' within record " & intExampleRecordCount & " doesn't reference an attribute!") %Check% = False Exit Function End If From 59315d2a0b64e5395b73bdd7adb3d22b5a7bc3db Mon Sep 17 00:00:00 2001 From: Harmen Wessels <97173058+harmen-xb@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:39:33 +0100 Subject: [PATCH 4/6] Fixed join condition for business where parameter was missing. Updated pdc ldm config to removed empty ExtendedCollections and ExtendedComposition elements. --- .../models/ExampleDWH/EXAMPLEDWH.model.xml | 1 + .../Mapping_AggrTotalSalesPerCustomer.xml | 7 ----- ...apping_Br_Custom_Business_Rule_Example.xml | 21 ------------- ...ExampleSources_Customer_WithEnrichment.xml | 7 ----- .../SalesOrder_Mapping.xml | 30 ++++++++++++++----- pdc/pdc_config_ldm.xml | 3 ++ 6 files changed, 27 insertions(+), 42 deletions(-) diff --git a/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml b/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml index 4dd2b81..edad1a3 100644 --- a/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml +++ b/decomposed/models/ExampleDWH/EXAMPLEDWH.model.xml @@ -301,6 +301,7 @@ + diff --git a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_AggrTotalSalesPerCustomer.xml b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_AggrTotalSalesPerCustomer.xml index 0c591e1..8a35e50 100644 --- a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_AggrTotalSalesPerCustomer.xml +++ b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_AggrTotalSalesPerCustomer.xml @@ -38,13 +38,6 @@ - -E90EA032-CB5B-4F07-8C83-D4CA5AE60D75 -Examples -mdde_Mapping_Examples -1690285517 -WesselsH1 - diff --git a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Br_Custom_Business_Rule_Example.xml b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Br_Custom_Business_Rule_Example.xml index 6d4dd97..86f9b74 100644 --- a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Br_Custom_Business_Rule_Example.xml +++ b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Br_Custom_Business_Rule_Example.xml @@ -118,13 +118,6 @@ WHERE CustomerOrderRowNumber = 1 WesselsH1 mdde_ExampleRecord - -1ED1616E-7888-404C-9287-6BC9FE07D3D8 -Example attribute values (MDDE) -mdde_ExampleAttributeValues -1683208654 -WesselsH1 - FE0CDEF3-F95B-43F4-BCFB-7F7DC8A8716A Example attribute values (MDDE) @@ -290,13 +283,6 @@ WHERE CustomerOrderRowNumber = 1 WesselsH1 mdde_ExampleRecord - -F27C71C6-CA41-420D-96E4-E3AC75C26D5F -Example attribute values (MDDE) -mdde_ExampleAttributeValues -1683208556 -WesselsH1 - BD6587FF-A6FC-47B3-809F-ED0267892461 Example attribute values (MDDE) @@ -431,13 +417,6 @@ WHERE CustomerOrderRowNumber = 1 WesselsH1 mdde_ExampleRecord - -BE0BBD80-679F-42DD-A996-75D84AED865E -Example attribute values (MDDE) -mdde_ExampleAttributeValues -1683208607 -WesselsH1 - 83BE5AE2-C2CA-42FD-B90C-495A0BBC9DC5 Example attribute values (MDDE) diff --git a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Customer_ExampleSources_Customer_WithEnrichment.xml b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Customer_ExampleSources_Customer_WithEnrichment.xml index 167a1d0..c0581ac 100644 --- a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Customer_ExampleSources_Customer_WithEnrichment.xml +++ b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/Mapping_Customer_ExampleSources_Customer_WithEnrichment.xml @@ -375,13 +375,6 @@ - -BAFDF681-F2A0-41EC-9E6A-89C26225BAD0 -Examples -mdde_Mapping_Examples -1680597084 -MooOthman - diff --git a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/SalesOrder_Mapping.xml b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/SalesOrder_Mapping.xml index 71beee3..3916d32 100644 --- a/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/SalesOrder_Mapping.xml +++ b/decomposed/models/ExampleDWH/Mappings/mdde_ForHorizontalLineage/SalesOrder_Mapping.xml @@ -106,19 +106,35 @@ + +2B08F648-7DE4-4F5D-B0CC-5BE0F94729DF +Join condition_2 +Join_condition_2 +1709911284 +HarmenWessels +mdde_JoinCondition +{1626A879-DBAC-4E54-8A36-28FCB761FF3A},MDDE_LDM,80={E9D50277-1E36-464C-9842-5008646943AB},mdde_ParentLiteralValue,12='2023-12-31' + + + + +C41485A7-B110-438D-A20F-9E5950576C5D +mdde_ChildAttribute +mdde_ChildAttribute +1709911291 +HarmenWessels + + + + + + - -AC6DC32A-7B0A-41AC-AABF-1888D1A5850F -Examples -mdde_Mapping_Examples -1683211634 -WesselsH1 - diff --git a/pdc/pdc_config_ldm.xml b/pdc/pdc_config_ldm.xml index 06fc533..4f31807 100644 --- a/pdc/pdc_config_ldm.xml +++ b/pdc/pdc_config_ldm.xml @@ -64,7 +64,10 @@ + + + From 6f3888bcfbcd87ea58db4056e1a1037d662076f1 Mon Sep 17 00:00:00 2001 From: Harmen Wessels <97173058+harmen-xb@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:42:44 +0100 Subject: [PATCH 5/6] Fixed typo. --- ...e_join_conditions_are_in_same_order_as_attributes_(MDDE).xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml index bedc600..52411d4 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml @@ -35,7 +35,7 @@ Function CheckOrFixJoinConditions(objSourceObject, boolAutoFix) Dim intLastBRAttributeIndex : intLastBRAttributeIndex = objExpressionBusinessRule.Attributes.Count - 1 Dim intCurrentAttributeIndex ' Keep track of the number of input attributes we processed. - ' We start with -1, so in the first cycle it jump to 0 and that's the index of the join condition this attribute should be references. + ' We start with -1, so in the first cycle it jumps to 0 and that's the index of the join condition this attribute should be references. Dim intCurrentInputAttributeIndex : intCurrentInputAttributeIndex = -1 For intCurrentAttributeIndex = 0 To intLastBRAttributeIndex Dim objBRAttribute : Set objBRAttribute = objExpressionBusinessRule.Attributes.Item(intCurrentAttributeIndex) From 1e81c2d09da7b94ec3cb77fdcdb41b0d97c62526 Mon Sep 17 00:00:00 2001 From: Harmen Wessels <97173058+harmen-xb@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:51:08 +0100 Subject: [PATCH 6/6] Fixed type --- ...join_conditions_are_in_same_order_as_attributes_(MDDE).xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml index 52411d4..2cf931a 100644 --- a/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml +++ b/decomposed/extensions/MDDE_LDM/Profile/ExtendedSubObject/Stereotypes/mdde_SourceObject/Criteria/SourceObject_CanCheck_IsExpressionBusinessRule/Criteria/SourceObject_Is_ExpressionBusinessRule/Custom_Checks/Expression_business_rule_join_conditions_are_in_same_order_as_attributes_(MDDE).xml @@ -35,7 +35,7 @@ Function CheckOrFixJoinConditions(objSourceObject, boolAutoFix) Dim intLastBRAttributeIndex : intLastBRAttributeIndex = objExpressionBusinessRule.Attributes.Count - 1 Dim intCurrentAttributeIndex ' Keep track of the number of input attributes we processed. - ' We start with -1, so in the first cycle it jumps to 0 and that's the index of the join condition this attribute should be references. + ' We start with -1, so in the first cycle it jumps to 0 and that's the index of the join condition this attribute should be referencing. Dim intCurrentInputAttributeIndex : intCurrentInputAttributeIndex = -1 For intCurrentAttributeIndex = 0 To intLastBRAttributeIndex Dim objBRAttribute : Set objBRAttribute = objExpressionBusinessRule.Attributes.Item(intCurrentAttributeIndex) @@ -124,4 +124,4 @@ End Function %Fix% = boolAutoCorrected End Function 1 - \ No newline at end of file +