Commit f473def0 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ fix for DataInstanceOrArgumentsOrItemsInDataElementUse constraint

parent d045c4eb
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -450,13 +450,13 @@ context DataElementUse
  -- 'DataElement' reference or non-empty 'argument' or non-empty 'item'
  inv DataInstanceOrArgumentsOrItemsInDataElementUse ('If a \'dataElement\' is not specified, or if the \'dataElement\' is resolved to a \'StructuredDataType\' or a \'CollectionDataType\', either a non-empty \'argument\' set or a non-empty \'item\' set shall be specified.' + self.toString()):
        not (self.dataElement.oclIsUndefined() and self.argument->isEmpty() and self.item->isEmpty())
                and (self.dataElement.oclIsKindOf(StructuredDataInstance) 
                or (self.dataElement.oclIsKindOf(StructuredDataInstance) 
                      or not (self.resolveDataType().oclIsKindOf(StructuredDataType) 
                          and self.argument->isEmpty())
                      or (self.resolveDataType().oclIsKindOf(StructuredDataType) 
                      	and self.dataElement.oclIsKindOf(CollectionDataInstance)
                      ))
                and (self.dataElement.oclIsKindOf(CollectionDataInstance) 
                or (self.dataElement.oclIsKindOf(CollectionDataInstance) 
                      or not (self.resolveDataType().oclIsKindOf(CollectionDataType) 
                          and self.item->isEmpty()))