- ArchiMate spec. ⤳ ☛
 - ArchiMate synthesis ⤳ ☛
 - ArchiMate within Enterprise Architect ⤳ ☛
 - ArchiMate online editor ⤳ ☛
 ![]()
ArchiMate ⤳ “Active structure” ⤳ strategy layer ☛
![]()
ArchiMate ⤳ “Active structure” ⤳ business layer ☛
![]()
ArchiMate ⤳ “Behavior” ⤳ business layer ☛
![]()
ArchiMate ⤳ “Passive structure” ⤳ business layer ☛
![]()
ArchiMate ⤳ “Product” ⤳ business layer ☛
![]()
ArchiMate ⤳ “Active structure” ⤳ application layer ☛
![]()
ArchiMate ⤳ “Behavior” ⤳ application layer ☛
![]()
ArchiMate ⤳ “Passive structure” ⤳ application layer ☛
![]()
Exercise
- Import content of
 Clinique.bpmnfileinto
Processus patientBPMN Collaboration Diagram as (owned) behavior ofProcessus patientArchiMate Business Interaction inClinique >> Business >> Behaviorpackage.Solution
![]()
- Model Library (of documents) ☛ ⤳
 Start⇝Model Library -Collaborate-- Glossary (of terms) ☛ ⤳
 Design⇝Glossary -Dictionary-Model Library
![]()
Exercise
- Add
 Processus patientBPMN Collaboration Diagram Web hyperlink ☛ to Model LibraryGlossary ⤳
Publishingperspective![]()
Glossary ⤳ creation (Model Builder) ☛
![]()
Glossary ⤳ terms as classes in UML Class Diagram
![]()
Glossary ⤳ term types, i.e., categories as packages in UML Package Diagram
![]()
Glossary ⤳ view ☛
![]()
Glossary ⤳ markup ☛
![]()
Exercise
- Add
 ArchiMateglossary category withAspect,Layer… glossary entries (terms) and define style ofArchiMateglossary category
Report Builder
Publish⇝Report Builder -Model Reports-⇝Generate Documentation -Report-Linked Document ☛
-right click-(element within diagram) ⇝Linked Document⤳ (Template: NoneorDefect Audit,Deployment Plan…)
- Document Window ⤳
 Start⇝Properties -All Windows-⇝Document -General-- Configuring, editing, deleting ⤳
 ≡(linked document within document window) ⇝Edit Mode, etc.- Linked Document Template ☛
 Design(element) ⇝Manage… -Element-Edit Linked Document -Documents-![]()
Linked Document Template (renamed “Document Guides” from ver. 17.x)
![]()
Document Template ☛ and ☛
Publish⇝Template Editor -Model Reports-- Template Fragment ⤳
 -right click-(template within browser-Resources-) ⇝Mark as Fragment-right click-(Document Template content)Insert Template⤳ insert Template Fragment into Document TemplateDocument Template ⤳ content settings
![]()
Document Template ⤳ publication -package per package-
![]()
Template Fragment ☛
![]()
Template Fragment ⤳ SQL ☛
![]()
Template Fragment within Document Template
![]()
Publication
![]()
Template Fragment ⤳ scripting (don't forget
custom > < custom)![]()
Template Fragment ⤳ scripting cont'd
function Clinique(object_id) { // 'EA', 'Repository', 'Session'... are available objects... Session.Output("'Clinique' (JavaScript)... " + object_id); // Call with '#OBJECTID#' var object = Repository.GetElementByID(object_id); Session.Output("Package from which document generation occurs... " + object.Name); // API (https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/document_generator_interface_class.html): var reporting as EA.DocumentGenerator; // Intelli-sense type declaration reporting = CreateDocumentGenerator(); if(reporting) { // Publish > Model Reports > Report Builder > Generate Documentation > Project Constants Session.Output("'reporting': " + reporting.GetProjectConstant("FranckBarbier")); reporting.InsertText(reporting.GetProjectConstant("FranckBarbier"), EA.TextAlignment.AlignLeft); if(reporting.NewDocument("")) { // Insert an external document into the currently generated file: if(reporting.LoadDocument("C:\\Users\\franc\\Desktop\\Data.rtf") === false) Session.Output("Error: " + reporting.GetLastError()); // Effect of 'reporting.InsertText' is *CANCELED*! return reporting.GetDocumentAsRTF(); } } }Project constants
![]()
Exercise
- Adapt
 RealizationsTemplate Fragment fromClinique.qeaproject intoPrison_de_Nantes.qeaproject![]()
Settings⇝Transfer -Model-⇝Export Reference Data… -Reference Data-⤳Realizations -Document Templates-- Change
 Realizationsname toInstantiationsand adapt content to get instantiation relationships instead of realization relationships. Tip:SELECT SOURCE.Name || ' --IS INSTANCE OF--> ' || TARGET.Name AS is_instance_of FROM t_object as SOURCE, t_object as TARGET --SQLite! INNER JOIN t_connector as Instantiation ON SOURCE.Object_ID = Instantiation.Start_Object_ID AND TARGET.Object_ID = Instantiation.End_Object_ID WHERE Instantiation.Stereotype like 'instanceOf';- Construct Document Template, which (re)-uses
 InstantiationsTemplate Fragment- Publish package(s)
 Custom Document ☛ and ☛
Publish⇝Custom Document -Model Reports--drag & drop-packages (as dynamic content for instance) in applying Template Fragment (e.g.,Realizations)Publish⇝Dynamic Preview -Model Reports-⤳ visualizationEdit⇝File -File-⇝Save As (Export to File)⤳.rtf,.html, etc.Edit⇝File -File-⇝Reload from Repository⤳ update-right click-(document content) ⇝Update Dynamic Report elements⤳ updateCustom Document ⤳ creation
![]()
![]()
Custom Document ⤳ package's realization relationships
![]()
Custom Document ⤳ publication (
.rtf,.html, etc.)![]()
Exercise
- Create Template Fragment by adapting the
 Defaultsystem Template Fragment (remove containedGeneral Relationshipsystem Template Fragment and more…)- Create Custom Document named
 Definitionsby applyingGlossarysystem Document Template- Apply Template Fragment created in 1. as dynamic content to each item having
 GlossaryEntrystereotype inBusinesspackage havingGlossaryCategorystereotypeExpected result
![]()
HTML ⤳ -package per package- ☛ and ☛
- HTML Template Fragment ☛
 
Settings⇝Resources -Reference Data-⤳HTML Publishing- Access to model data ⤳ e.g.,
 #IMAGE#(image of diagram)Publish⇝HTML -Model Reports-⇝Standard HTML Report -Web Report-HTML Template Fragment
![]()
HTML ⤳ publication
![]()
![]()
Virtual Document ☛ and ☛
![]()
Virtual Document ⤳
«report package»stereotype![]()
Virtual Document ⤳ Model Document
![]()
![]()
Virtual Document ⤳ Model Document settings
![]()
Virtual Document ⤳ publication (
CliniqueDocument Template)![]()
Virtual Document ⤳ publication result (order:
Strategy >> Active structure, etc.)![]()
Virtual Document ⤳ publication formats
![]()
Exercise
- Create Virtual Document that publishes ArchiMate Assignment relationships (
 ArchiMate_Assignmentstereotype) for theStrategy,Business, andApplicationpackages in respecting order (tip: adaptRealizationsTemplate Fragment SQL query)Dynamic Document ☛
Publish⇝Dynamic Preview -Model Reports-![]()
Dynamic Document Template
Settings⇝Resources -Reference Data-⤳Report Templates >> System Templates >> Dynamic![]()
Data of an Enterprise Architect project are recorded and organized within a relational database. As a result, data may be handled through SQL statements, queries especially. This organization is known as the Object Model ☛
Object Model SQL tables with constants
t_cardinality⤳*…t_connectortypes⤳Abstraction,Association…t_objectproperties⤳eventGatewayType…t_scenariotypes⤳Simple…t_statustypes⤳Approved…- Etc.
 Enterprise Architect comes with the Query Builder to avoid SQL. The
Copy Search : Create a copy of a searchbutton is an asset for adapting numerous predefined searches ☛ in varied search categories:Common Searches… withMy Searchescategory devoted to custom searchesKey action(s)
Start⇝Search -Explore-⇝Model -Search-Start⇝Search -Explore-⇝Package -General-⤳ packages…Search ⤳ in model
![]()
Search ⤳ in current package
![]()
![]()
Search ⤳ Query Builder ☛
![]()
![]()
Object Model ⤳ “All diagrams”
select Name, Package_ID as 'Id. of package being the owner of the diagram' from t_diagram order by Name![]()
Object Model ⤳ “All diagrams containing
ApplicationinNamefield” (Query Builder)![]()
Object Model ⤳ “All classes”
select Name, Stereotype from t_object where Object_Type in ('Class', 'Enumeration')![]()
Searches are not part of Reference Data ⤳ exports and imports must be explicit
![]()
Object Model ⤳ simple queries
Get root package, i.e., the model itself
SELECT Name, Parent_ID FROM t_package WHERE Parent_ID = 0Internally usable queries
SELECT ea_guid AS CLASSGUID, Name FROM t_package WHERE Parent_ID = 0 -- 'ea_guid' has to be returned to highlight package (model) within browser...![]()
BPMN collaboration model(s)?
SELECT * FROM t_object WHERE Stereotype = 'CollaborationModel' -- 'Object_Type' -> 'CollaborationModel' sur la base de la classification BPMN... -- SELECT Name, Object_Type, Stereotype FROM t_object WHERE Stereotype = 'CollaborationModel' -- 'Object_Type' -> 'Activity' sur la base de la classification UML...Object Model ⤳ “Start and end classes of ArchiMate Assignment relationships”
SELECT Assignment.Stereotype, COALESCE(Assignment.Name,'-NO NAME-') 'Name of assignment', Start.Name AS _From_, End.Name AS _To_ FROM t_object as Start, t_object as End -- 'COALESCE(x,y,...)' returns the first non 'NULL' parameter... INNER JOIN t_connector as Assignment ON Start.Object_ID = Assignment.Start_Object_ID AND End.Object_ID = Assignment.End_Object_ID WHERE Assignment.Stereotype = 'ArchiMate_Assignment'Object Model ⤳ “Start and end classes of ArchiMate Serving associations”
SELECT Start.Name AS 'From', End.Name AS 'To' FROM t_object as Start, t_object as End INNER JOIN t_connector as Serving_association ON Start.Object_ID = Serving_association.Start_Object_ID AND End.Object_ID = Serving_association.End_Object_ID WHERE Serving_association.Connector_Type in ('Association','Aggregation', 'Composition') -- 'Association' is enough... AND Serving_association.Stereotype = 'ArchiMate_Serving'![]()
Object Model ⤳ “packages# in under-root
Businesspackage”Note: robust criterion for root package, i.e., “model” is
SELECT * FROM t_package AS Root WHERE Root.Parent_ID = 0SELECT COUNT(*) AS Total FROM t_package AS Business_sub_package INNER JOIN t_package AS Business_package ON Business_sub_package.Parent_ID = Business_package.Package_ID WHERE Business_package.Name = 'Business' AND Business_package.Parent_ID = 1 -- 'Business' package under root...![]()
Object Model ⤳ “diagrams in under-root
Businesspackage”SELECT D.Name, D.Package_ID as Owner FROM t_diagram AS D INNER JOIN t_package AS Business_package ON Owner = Business_package.Package_ID AND Business_package.Name = 'Business' AND Business_package.Parent_ID = 1 -- Tous les diagrammes juste sous 'Business' lui-même juste sous 'root' -> rien !SELECT D.Name, D.Package_ID as Owner FROM t_diagram AS D INNER JOIN t_package AS Business_package, t_package AS Business_sub_package ON Owner = Business_sub_package.Package_ID AND Business_sub_package.Parent_ID = Business_package.Package_ID AND Business_package.Name = 'Business' AND Business_package.Parent_ID = 1 -- Tous les diagrammes sous (récursivement) les sous-packages de 'Business' lui-même -- juste sous 'root' -> 4 'Name - Owner'![]()
Object Model ⤳ macro-statement ☛
SELECT COUNT(*) AS Total FROM t_diagram AS D INNER JOIN t_package AS Business_package, t_package AS Business_sub_package ON D.Package_ID = Business_sub_package.Package_ID AND Business_sub_package.Parent_ID = Business_package.Package_ID AND Business_package.Package_ID = #Package# AND Business_package.Parent_ID = 1 -- #Package# est le package actif dans le browser au moment -- de la requête![]()
Object Model ⤳
t_xrefSQL tableSELECT P.Name, Additional_data.Description FROM t_xref AS Additional_data -- Les références externes du projet INNER JOIN t_package AS P ON Additional_data.Client = P.ea_guid -- Quels sont les packages ayant des info. additionnelles ?![]()
Exercise
ArchiMate Realization relationships? ⤳
t_connectorSELECT Connector_Type, Stereotype FROM t_connector WHERE Connector_Type = 'Dependency' AND Stereotype = 'ArchiMate_Realization' -- La condition sur le stéréotype seul suffit : -- SELECT Connector_Type, Stereotype FROM t_connector WHERE Connector_Type in ('Realization')Packages whose status is not
Approved? ⤳t_objectSELECT Object_Type, Name, Status FROM t_object WHERE Object_Type = 'Package' AND Status <> 'Approved'
View:property of ArchiMate diagrams (-right click-(diagram within browser) ⇝Properties…⤳View:)? ⤳t_diagramSELECT Name FROM t_diagram WHERE StyleEx LIKE '%MDGDgm=ArchiMate3::Business;MDGView=ArchiMate 3 Basic::Business Process Cooperation%'Terms of glossary? ⤳
t_glossarySELECT Name AS Word, Note AS Signification FROM t_object WHERE Stereotype = 'GlossaryEntry' UNION SELECT Term AS Word, Meaning AS Signification FROM t_glossary