Creating Custom ModelElements


I am attempting to create a custom ModelElement to use in my Diagrams within VP and I am experiencing some difficulties:

  1. I am trying to define the new element by implementing the IModelElement interface. In order to do this I need to override over 84 methods, where most of the methods don’t have a clear meaning to me. I was wondering if there is a list of method that are strictly necessary to be overridden in order for the custom ModelElement to work. In case of a negative answer, I was wondering if there was any documentation regarding what all those methods are supposed to do. Some methods, like getName() are very straightforward; but there are other methods, like ‘public IModelElement getChildByName(String arg0, String arg1)’, where the attributes are not helpful to get the method implementation right. When looking at the online API documentation I noticed that there is no class, interface, or method descriptions.

  2. I am trying to add my custom ModelElement as a child to a VP State2 Model. When I do this I get an illegal cast exception stating that my custom ModelElement cannot be cast to v.alua. I am not sure what this means. Can this be because I am not overriding the correct methods? Or are there any restrictions regarding what ‘Types’ of ModelElements can be added to a State2 Model?

  3. My final goal is to have custom information embedded within the State2 Model when I export the project/diagram using VP XMI / XML export capability. Can this be achieved using the approach I am currently taking? If I manage to add the custom ModelElement as a child to the State2 Model, will it be exported as a custom XMI / XML tag within the State2’s tag in the export document?

Thank you very much in advance for your help,


I would like to do a similar thing. I want to add a group box to the UI designer. Also we use Rich Faces and want to add components with the look of our standard object set.


I want to integrate some non-standard diagrams to enterprise architecture, for example market segments in Zachman Framework Who column. A convenient way to do this is to use a basic Business Actor as an specific customer and a market segment Element that should behave as sets and subsets.

I guess that this is possible to be done by creating a Custom Model Element that would aloud nesting, is this a correct approach? Does this even make sense in VP? or is more like developing MinesSweeper in Excel? :?:

If it does makes sense and is possible which is the most recommendable way to go?