Skip to main content
Jump to: navigation, search

Difference between revisions of "Profile migration"

(Actions to tackle)
 
Line 1: Line 1:
=Context=
+
=Global presentation=
 
When a profile change we have to reapply it in all models whose apply it. This action of simply reapply this profile could lose some information and the model can become invalid.
 
When a profile change we have to reapply it in all models whose apply it. This action of simply reapply this profile could lose some information and the model can become invalid.
 +
The Profile Migration tool is providing a way to migrate profiled model from a profile version V1 to the same profile version V2. This tool try to make the most part of the migration automatically but in some case it is necessary that the user make a choice.
  
=Proposition=
+
=Example=
A new tool which will allow to migrate a profiled model when the profile evolve. This means that it will reapply the profile and ask the user some action to modify the model according to the modification of the profile. For example, if a stereotype becomes abstract then we will ask the designer if he wants to replace the abstract stereotype by a specification of this stereotype.  
+
In this example, you can see in the figure 1 the profile before modification (profile V1) and in the figure 2 the model where the profile V1 is applied.  
 +
<br/>
 +
[[File:ProfileMigrationTool_ProfileBefore.png]]
 +
<br>''Figure1: Profile V1''<br>
 +
<br/>
 +
[[File:ProfileMigrationTool_ModelBefore.png]]
 +
<br>''Figure2: Profiled model with V1 applied''<br>
  
=Actions to tackle=
+
In the figure 3, the profile V2 is shown, modifications with the profile version V1 are:
* Compare profile before and after modification to get evolutions of this profile. to do this we will use [https://www.eclipse.org/emf/compare/ EMF compare]
+
* p1 has become unique
* Code migration action for each type of evolution of the profile
+
* p2 has become static
 +
* S has become abstract, S1 ans S2 has been created and inherit from S
  
=Bugs=
+
During the migration from the version V1 to the version V2 of the profile the tool ask us if we want to replace stereotype applications of S by one or many of its sub-stereotypes, in this example we chose to apply S1 to C1, S2 to C2 and S1 and S2 to C3. Since the property p2 has become static the Profile Migration Tool ask us if we want to apply a value to every slot corresponding to the property p2, in this example we chose "static value".
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=525483 Bug 525483] - Profile changes management and model migration
+
 
 +
<br/>
 +
[[File:ProfileMigrationTool_ProfileAfter.png]]
 +
<br>''Figure3: Profile V2''<br>
 +
<br/>
 +
[[File:ProfileMigrationTool_ModelAfter.png]]
 +
<br>''Figure4: Profiled model with V2 applied''<br>
 +
 
 +
As we expected in the profiled model applying the version V2 (figure 4) stereotype S1 and S2 are apply like we chose, the "static value" is set to slot corresponding to the property p2 and slots corresponding to the property p1 has no more duplicated values.
 +
 
 +
=Video=
 +
A quick video can be found on the Papyrus' Youtube channel right [https://www.youtube.com/watch?v=tGrQUaERoA0 here] showcasing the use of the current iteration of the Profile Migration Tool.

Latest revision as of 04:54, 17 January 2018

Global presentation

When a profile change we have to reapply it in all models whose apply it. This action of simply reapply this profile could lose some information and the model can become invalid. The Profile Migration tool is providing a way to migrate profiled model from a profile version V1 to the same profile version V2. This tool try to make the most part of the migration automatically but in some case it is necessary that the user make a choice.

Example

In this example, you can see in the figure 1 the profile before modification (profile V1) and in the figure 2 the model where the profile V1 is applied.
ProfileMigrationTool ProfileBefore.png
Figure1: Profile V1

ProfileMigrationTool ModelBefore.png
Figure2: Profiled model with V1 applied

In the figure 3, the profile V2 is shown, modifications with the profile version V1 are:

  • p1 has become unique
  • p2 has become static
  • S has become abstract, S1 ans S2 has been created and inherit from S

During the migration from the version V1 to the version V2 of the profile the tool ask us if we want to replace stereotype applications of S by one or many of its sub-stereotypes, in this example we chose to apply S1 to C1, S2 to C2 and S1 and S2 to C3. Since the property p2 has become static the Profile Migration Tool ask us if we want to apply a value to every slot corresponding to the property p2, in this example we chose "static value".


ProfileMigrationTool ProfileAfter.png
Figure3: Profile V2

ProfileMigrationTool ModelAfter.png
Figure4: Profiled model with V2 applied

As we expected in the profiled model applying the version V2 (figure 4) stereotype S1 and S2 are apply like we chose, the "static value" is set to slot corresponding to the property p2 and slots corresponding to the property p1 has no more duplicated values.

Video

A quick video can be found on the Papyrus' Youtube channel right here showcasing the use of the current iteration of the Profile Migration Tool.

Back to the top