|
| Re: Versioning for UML Models like for Profiles [message #1117226 is a reply to message #1116805] |
Thu, 26 September 2013 04:08   |
Camille Letavernier Messages: 285 Registered: February 2011 |
Senior Member |
|
|
Hi,
In Profiles, there is no real "versionning". Only the "definitions" are versionned, and this is really different, because the UML Profile itself exists in a single version (And doesn't have a version number).
The versionned definitions exist only for a compatibility/migration purpose (Between Applied Profile N-1 and Applied Profile N)
If you want an actual versionning (Version number + history + diff/merge...), then you need to rely on a true versionning system (CDO, SVN, Git, ...). AFAIK, the Papyrus integration of CDO doesn't support versionning yet.
Regards,
Camille
|
|
|
| Re: Versioning for UML Models like for Profiles [message #1117316 is a reply to message #1117226] |
Thu, 26 September 2013 05:59   |
Furkan Eke Messages: 4 Registered: June 2012 |
Junior Member |
|
|
Hello Camille,
thanks for your reply. What i am looking for is definitely not a kind of repo like git, svn etc. I use such systems already.
What i am looking for is a kind of automatically updated version attribute which is intrinsic to the model. That i could than read let's say from templates (for example acceleo but not restricted to acceleo).
This sounds like having definitions for M1 models right? My use case is as follows:
1- UML model will constitute an M1 model, from which a M1 library will be generated
2- In runtime, some application which does not know my M1 model will use the generated M1 library as an objects factory.
3- This application will save some data tree conforming a specific version of M1 library for later use.
4- If M1 model gets redesigned, the application must be able to check the generated M1 library version which in turn comes from the "automatically saved version attribute of M1 model"
5- Ath application will compare the version number of the linked library against the version number of the data tree saved priorly. If these match a read will be enabled.
[Updated on: Thu, 26 September 2013 06:04] Report message to a moderator
|
|
|
| Re: Versioning for UML Models like for Profiles [message #1117619 is a reply to message #1117316] |
Thu, 26 September 2013 12:33   |
Christian W. Damus Messages: 603 Registered: July 2009 |
Senior Member |
|
|
Hi,
The UML2 API maintains the "version" of a profile in an annotation, or
to be more precise, in the distinct namespace URIs of the EPackage
definitions stored in an annotation. You might do something similar if
you are using the UML2EcoreConverter to generate EPackages from your
UML models.
Talking of M1, M2, etc. when dealing with metamodels quickly gets
confusing. Is the "generated M1 library" that your client applications
use an EPackage conversion of your UML model?
Cheers,
Christian
On 2013-09-26 09:59:10 +0000, Furkan Eke said:
> Hello Camille,
>
> thanks for your reply. What i am looking for is definitely not a kind
> of repo like git, svn etc. I use such systems already.
>
> What i am looking for is a kind of automatically updated version
> attribute which is intrinsic to the model. That i could than read let's
> say from templates (for example acceleo but not).
>
> This sounds like having definitions for M1 models right? My use case is
> as follows:
> 1- UML model will constitute "a kind of" M1 model, from which a M1
> library will be generated
>
> 2- In runtime, some application which does not know my M1 model will
> use the generated M1 library as an objects factory.
>
> 3- This application will save some data tree conforming a specific
> version of M1 library for later use.
>
> 4- If M1 library gets redesigned, the application must be able to check
> the M1 library version which in turn comes from the "automatically
> saved version attribute of M1 model".
|
|
|
| Re: Versioning for UML Models like for Profiles [message #1117733 is a reply to message #1117619] |
Thu, 26 September 2013 15:07  |
Furkan Eke Messages: 4 Registered: June 2012 |
Junior Member |
|
|
Hello Christian,
I can indeed model something by hand matching the same pattern like in profile definitions but that does not solve the automation problem. I have to remember each time i have to increase the version number by hand.
Btw, the profile definitions are expressed with different model elements in Papyrus based profile modelling than in plain EclipseUML2. On this i have lost a day desperately realising the Papyrus modeling pattern for profiles does not allow other valid UML2 profile definition be imported.
+++++
Considering metamodel<->model relation this can perhaps give a better view..
My M1 Model is basically a UML Model. The target language is not Java so that it does not help me to use the EMF way.
However it is indifferent for me if such a versioning feature need to use ECore Model elements, that would be ok.
The workflow i am planning is roughly:
1) UML Model M1 @ Papyrus (data model and/or behavior. no strict separation here)
2) .uml file as input to a template based text generator/interpreter
..assuming the library has data model part..:
3) generated texts are c++ code forming a data library.
Library can be used to generate data files conforming to the data model.
(M0 file is an instance of the data part of the M1 model)
4) a c++ application binds this library.
The application will sign the M0 data file with the model version number,
reading the number from the library.
In order to have this scenario work, the UML model at the beginning must have such a number updated automatically.
As i read the forum i get the impression, that more common practice is to expect
the UML model to be M0. This i see as modeling for non-reusable code.
In the scenario above the modelled lib is modelled from the beginning for reuse. Than an application must care of its usage. This is not much different in EMF generated model code. There you also get a kind of library for reuse. It is you who has to build an application around that.
|
|
|
Powered by
FUDForum. Page generated in 0.23158 seconds