Issue 19428: Dynamic set of input models (qvt-rtf) Source: (, ) Nature: Enhancement Severity: Minor Summary: This is a suggestion: A developer may need to take a set of in models that may vary in size each time he runs the transformation. So, instead of hard-coding the input/out put models when defining the transformation like this: transformation Uml2Rdbms(in uml:UML,out rdbms:RDBMS) The developer should be able to define a dynamic set of input models. So that he will not be obligated to change the transformation definition if the number of input models change every time he runs the transformation. For example, I defined a transformation that takes multiple input models (conforming to the same meta-model) to merge them. Now, I got different number of in models every time I run the transformation. To make this more dynamic, I need to take an array of models as an input to my transformation without specifying their numbers in the transformation definition each time I run the transformation. Resolution: Dynamic set of input models This is a suggestion: A developer may need to take a set of in models that may vary in size each time he runs the transformation. So, instead of hard-coding the input/out put models when defining the transformation like this: transformation Uml2Rdbms(in uml:UML,out rdbms:RDBMS) The developer should be able to define a dynamic set of input models. So that he will not be obligated to change the transformation definition if the number of input models change every time he runs the transformation. For example, I defined a transformation that takes multiple input models (conforming to the same meta-model) to merge them. Now, I got different number of in models every time I run the transformation. To make this more dynamic, I need to take an array of models as an input to my transformation without specifying their numbers in the transformation definition each time I run the transformation. Discussion - imperative This is already supported by the QVTo grammar. Just define a Collection of models as input or output. transformation Uml2Rdbms(in uml:Sequence(UML),out rdbms:Sequence(RDBMS)) and use collection operations to access the individual models. Discussion - declarative Revised Text: At the end of 7.1 add A declarative transformation is not restricted to a fixed number of models. Collections of input models may be provided and transformed as a single multi-rooted input model. At the end of 8.1.1 add. A transformation is not restricted to a fixed number of models. Collections of in and inout models may also be transformed. transformation Uml2Rdbms(in uml:Sequence(UML),out rdbms:RDBMS); The multiple models can be distinguished using collection operations. In 8.2.1.5 replace Each model parameter refers implicitly to a model participating in the query or transformation. by Each model parameter refers implicitly to a model or collection of models participating in the query or transformation. and The type of an instance of ModelParameter is an instance of ModelType. self.type.oclIsKindOf(ModelType) by The type of a ModelParameter is a ModelType or Collection of a ModelType. self.type.oclIsKindOf(ModelType) or (self.type.oclIsKindOf(CollectionType) and self.type.oclAsType(CollectionType).elementType.oclIsKindOf(ModelType)) and Model parameters are notated as simple parameters within the signature of a transformation. by Model parameters are notated as simple or collection parameters within the signature of a transformation. transformation ManyToOne(in many:Sequence(Mine),out one:Mine) Actions taken: May 22, 2014: received issue December 22, 2015: Resolved March 29, 2016: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 22 May 2014 02:06:22 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Fatma Mohamed Employer: mailFrom: fatma.mohamed@kustar.ac.ae Terms_Agreement: I agree Specification: Meta Object Facility (MOF) 2.0 Query/View/Transformation, v1.1 Section: 8.1.1 FormalNumber: formal/2011-01-01 Version: 1.1 Doc_Year: 2011 Doc_Month: January Doc_Day: Day Page: 79 Title: Dynamic set of input models Nature: Enhancement Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: bba409578.alshamil.net.ae Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 Time: 02:06 AM Description: This is a suggestion: A developer may need to take a set of in models that may vary in size each time he runs the transformation. So, instead of hard-coding the input/out put models when defining the transformation like this: transformation Uml2Rdbms(in uml:UML,out rdbms:RDBMS) The developer should be able to define a dynamic set of input models. So that he will not be obligated to change the transformation definition if the number of input models change every time he runs the transformation. For example, I defined a transformation that takes multiple input models (conforming to the same meta-model) to merge them. Now, I got different number of in models every time I run the transformation. To make this more dynamic, I need to take an array of models as an input to my transformation without specifying their numbers in the transformation definition each time I run the transformation.