When working with Enterprise Studio and Horizzon, there are situations in which you may need the type name of an element, for example the type name of an ArchiMate application component, a BPMN process diagram, or a UML class. A few examples:
- Creating data block definitions. Type names are needed to specify the types of elements a data block should be available on.
- Using the BiZZdesign Open API for requesting elements. Their type names are needed to access the correct information.
- Viewing the history of multiple elements at once. Their type names are needed to specify the elements you want to view the history of.
The available options to find the type name of an element are described below, each with its possibilities and/or limitations. Which option is the most suitable for the situation, may depend on the element type and/or metamodel you want to find an element type name for.
Using the Metamodel Browser
The Metamodel Browser can be accessed via the Query tool script editor. The Metamodel Browser contains the names of all objects, attributes and enumeration values of all the objects available in the metamodel of the active model, including any customizations that have been made to the configuration of the metamodel. Before opening the Metamodel Browser, make sure that the focus is on a component in the metamodel in which you want to search.
Clicking the Metamodel button in the script editor will open the Metamodel Browser window. Type the name of the object you are looking for in the search box, and click Search. Under Selection, in Name, the associated type name is shown.
Using a script
Lists of type names can be generated using a script. The script can be executed in the script editor and needs the "Table" output type. Following scripts are available:
// Find the type of 1 object, selected in the model browser. output selection[1].type().name();
// Find the type of all objects in the current open model package. nameType = Index(); forall List("AbstractCompound", "AbstractElement") obj in modelpackage { nameType.add( obj.type().toString(), obj.type().name() ); } forall name, type in nameType { output name, type; }
// Find all possible types in a metamodel (whether present in the model package or not). // Example below is for ArchiMate metamodel. Other metamodel names can be used, like BPMN, UML, etc. metamodel = "ArchiMate"; nameType = Index(); forall c in InternalObject("configuration").context(modelpackage).metaModel(metamodel).concepts(true) { if ( c.derivesFrom("AbstractCompound") || c.derivesFrom("AbstractElement") ) { nameType.add( c.label( modelpackage.activeLanguage() ), format("%s:%s", c.metaModel().name(), c.name()) ); } } forall name, type in nameType { output name, type; }
Example of a list generated with the script to find all possible types in a metamodel
Using the Metamodeler
The Metamodeler can be used for finding any element type in a metamodel. To open the metamodel of your choice in the Metamodeler, go to the File tab, click Manage Package > Manage Configuration, and click the metamodel you want to open. A new instance of Enterprise Studio opens with a representation of the metamodel from your model package.
Type names for objects and relations can be found in the Concepts folder in the metamodel on the Model browser tab, type names of diagrams and views are located in the Viewpoints folder. Names of diagrams and views end on "...Diagram" and "...View".
To refine your search you could enter part of the name in the search box at the top of the model and search for that. All names containing this text will be shown. A few examples: