- 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.bpmn
file intoProcessus patient
BPMN Collaboration Diagram as (owned) behavior ofProcessus patient
ArchiMate Business Interaction inClinique >> Business >> Behavior
package.Solution
- Model Library (of documents) ☛ ⤳
Start
⇝Model Library -Collaborate-
- Glossary (of terms) ☛ ⤳
Design
⇝Glossary -Dictionary-
Model Library
Exercise
- Add
Processus patient
BPMN Collaboration Diagram Web hyperlink to Model LibraryGlossary ⤳
Publishing
perspectiveGlossary ⤳ 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
ArchiMate
glossary category withAspect
,Layer
… glossary entries (terms) and define style ofArchiMate
glossary category
Report Builder
Publish
⇝Report Builder -Model Reports-
⇝Generate Documentation -Report-
Linked Document ☛
-right click-
(element within diagram) ⇝Linked Document
⤳ (Template: None
orDefect 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 Guide” 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
Realizations
Template Fragment fromClinique.qea
project intoPrison_de_Nantes.qea
project
Settings
⇝Transfer -Model-
⇝Export Reference Data… -Reference Data-
⤳Realizations -Document Templates-
- Change
Realizations
name toInstantiations
and 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
Instantiations
Template 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
Default
system Template Fragment (remove containedGeneral Relationship
system Template Fragment and more…)- Create Custom Document named
Definitions
by applyingGlossary
system Document Template- Apply Template Fragment created in 1. as dynamic content to each item having
GlossaryEntry
stereotype inBusiness
package havingGlossaryCategory
stereotypeExpected 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»
stereotypeVirtual Document ⤳ Model Document
Virtual Document ⤳ Model Document settings
Virtual Document ⤳ publication (
Clinique
Document Template)Virtual Document ⤳ publication result (order:
Strategy >> Active structure
, etc.)Virtual Document ⤳ publication formats
Exercise
- Create Virtual Document that publishes ArchiMate Assignment relationships (
ArchiMate_Assignment
stereotype) for theStrategy
,Business
, andApplication
packages in respecting order (tip: adaptRealizations
Template 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 search
button is an asset for adapting numerous predefined searches ☛ in varied search categories:Common Searches
… withMy Searches
category devoted to custom searches.Key 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”
Object Model ⤳ “All diagrams containing
Application
inName
column” (Query Builder)Object Model ⤳ “All classes”
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 = 0
Internally 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
Business
package”Note: robust criterion for root package, i.e., “model” is
SELECT * FROM t_package AS Root WHERE Root.Parent_ID = 0
SELECT 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
Business
package”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 ⤳
x_ref
SQL table ☛SELECT 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_connector
SELECT 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_object
SELECT 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_diagram
SELECT Name FROM t_diagram WHERE StyleEx LIKE '%MDGDgm=ArchiMate3::Business;MDGView=ArchiMate 3 Basic::Business Process Cooperation%'
Terms of glossary? ⤳
t_glossary
SELECT Name AS Word, Note AS Signification FROM t_object WHERE Stereotype = 'GlossaryEntry' UNION SELECT Term AS Word, Meaning AS Signification FROM t_glossary