Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Versioning for UML Models like for Profiles(Automatic Versioning of Models might be a very useful new feature)
Versioning for UML Models like for Profiles [message #1116805] Wed, 25 September 2013 21:23 Go to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member

Automated Model Versioning Needed?[ 3 votes ]
1.Yes, this would improve the quality of my work 2 / 67%
2.No, i have an external mechanism for this 1 / 33%
3.No, i am not interested in versioning anyway 0 / 0%
4.I have no idea about this 0 / 0%

In Papyrus Profile diagramming the "save" function is coupled to a versioning+definition mechanism. One can give the newly saved profile a new version.

This feature is available without any explicit use of any model repos, as the versioning information is straight saved as part of the profile model (i am not experienced with the model repos yet).

What i really miss is the same behavior for UML models. I assume many users would not like to version their models everytime they save it but i want to. This could be solved with applying the mechanism to the models upon explicit request. A Papyrus menu point could enable/disable the mechanism, where the default could be "disabled".

I also assume that saving the versioning information as part of the model can rapidly get annoying for users of huge models. This would be yet another reason for making the feature optional.

-0-

I am not quite sure if there is a relation to CDO. If the profile versioning is being done in the background using CDO i would be thankful if someone put relevant pointers about the use of this stuff so that i could use the same mechanism for models.

[Updated on: Wed, 25 September 2013 21:58]

Report message to a moderator

Re: Versioning for UML Models like for Profiles [message #1117226 is a reply to message #1116805] Thu, 26 September 2013 08:08 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
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


Camille Letavernier
Re: Versioning for UML Models like for Profiles [message #1117316 is a reply to message #1117226] Thu, 26 September 2013 09:59 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
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 10: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 16:33 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
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 19:07 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
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.
Re: Versioning for UML Models like for Profiles [message #1218996 is a reply to message #1117733] Fri, 29 November 2013 14:38 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
I hoped that this topic would cause more resonance. I think proper versioning is an important aspect of software quality.

Could someone at least give me some guidelines, how to implement similar behavior myself?

How much of code is that? What technologies one needs to know?

I think the point is not interesting for the community and i want to implement an extension plugin myself if possible.
Re: Versioning for UML Models like for Profiles [message #1219008 is a reply to message #1218996] Fri, 29 November 2013 14:57 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi Furkan,


Papyrus provides a mean to register Save listeners (Pre-save and post-save). Using a pre-save listener, you could automatically increment the version number of the model.

Of course, automatic versioning only makes sense for minor/qualifier increments, so you'll also need a manual versioning system.


Basically, you need to implement and register a Papyrus service, which depends on the Papyrus ILifeCycleEventsProvider service. When the service is started (At model startup), you need to register a Save listener on the ILifeCycleEventsProvider. Then, when you receive the save event, increment the version number of the model (For example in an EAnnotation, or in a specific "Version" stereotype applied to your model)

If you are using a Stereotype, the user can also increment manually (From the profile tab of the properties view) the version, for "Major" releases.

Have a look at the "org.eclipse.papyrus.infra.core.service" extension point, for registering a service.


Regards,
Camille


Camille Letavernier
Re: Versioning for UML Models like for Profiles [message #1219022 is a reply to message #1219008] Fri, 29 November 2013 17:25 Go to previous messageGo to next message
Tomas Sandkvist is currently offline Tomas SandkvistFriend
Messages: 149
Registered: October 2013
Senior Member
Since it is so easy to create an SVN repository, even locally on my computer, with all the benefits of being able to move that repository as needed, I don't see any benefits from having an internal versioning system. If the only reason would be to go back to an earlier version, that is already built into Eclipse.

You will anyway end up with a kvazilion versions after a couple of days editing... Which SVN is really good at handling in my opinion...
Re: Versioning for UML Models like for Profiles [message #1219158 is a reply to message #1219022] Mon, 02 December 2013 12:17 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
Hello Tomas,


Thanks for your comments. I do use svn anyway. For artifact archiving i use svn (maybe i switch to git) and that's fine.

See, here it is not going in the direction of version-named artifact archiving, but automated governance of the versions.
Based on this discussion, my current solution is to do the version analysis in the acceleo modules during code generation.
My goal is the following:

1) edit separate models with dependencies in each other
2) generate library codes for each
3) generate library version numbers based on "predefined classes of changes" and embed the version numbers in the libraries (analyse changes by automated model queries/diff, and derive the number)
4) generate an osgi-like dependencies mechanism (outside of eclipse non-java env)
5) deploy the libraries with fitting versions (outside of eclipse non-java env)

Without a semi-automated version creation, i would need to do everything manually. You can think of the version suggested by such an automation similar to what the code recommendators do as you edit your code (You can take it, or you can leave it).

Analysis should take in the baselined model and the current model for comparison and come up with a version number based on DIFF analysis and add the version number in the current model as a post processing step.
I want to be able to trace the version numbers from model to code. This is basic idea behind.

Regards,
Furkan
Re: Versioning for UML Models like for Profiles [message #1219159 is a reply to message #1219008] Mon, 02 December 2013 12:20 Go to previous message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
Thanks Camille! i will have a look at it, to see if i am able to use this.
Previous Topic:"Unexpected error" when adding a guard in UML AD
Next Topic:Lifeline refers to one instance of a class?
Goto Forum:
  


Current Time: Tue Jul 07 14:06:51 GMT 2020

Powered by FUDForum. Page generated in 0.02330 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top