We are using Graphiti with an Ecore-Metamodel. Now that the metamodel evolves (migration here is done with Edapt) the question arises how to deal with metamodel-changes on the graphiti side.
Are there thoughts or even tools for migrating the graphiti model along with the metamodel?
In our current model files the graphiti model and business model are in one file, which is - as I now read - not the way to go. Is there a best practice for that?
Michael Wenz Messages: 1884 Registered: July 2009 Location: Walldorf, Germany
unfortunately I have to tell you that there is no support by Graphiti for adapting to metamodel changes. This simply depends too much on the type of changes that are done to you metamodel. For sure there is no tools that can handle this.
An idea how to handle that would be to implement this in your update features and let them adapt your shapes with whatever is necessary, or if that becomes too complex that you (programmatically from a migrate action?) remove all shapes from the diagram and re-add them at the original location. In case you have the visual representation separeated in another file you could also leave the old diagram around and create a new version in addition in case that makes sense.
Overall, the recommendation is to have the model objects and the diagram separated into 2 files, as it makes handling easier in several aspects, also one could imagine that you need you domain objects standalone as well (e.g. to generate something out of that information); this could be done then by sharing the file only.
thanks a lot for the hint and advice, I'll take that into account. Of course it would be nice to have sth. like Edapt for Graphiti but clearly that is very complex.
So I may have to specify a custom migration that only runs when migrating from metamodel v1 to v2 or sth. similar.