
wikitect
Nic Plum
Eclectica Systems Ltd. (Consultant)
Nic is a long time systems engineer/thinker who has worked mostly in aerospace and defence but has diversified into big government projects and more recently rail and transport. He views enterprise architecture and modelling as one of the essentials to any toolkit. Over the last year he has co-created TRAK - an architecture framework based on MODAF - using EA and has developed an MDG Technology to implement it within EA - and learnt a lot in the process! TRAK is a simple, pragmatic, no-nonsense framework which is based firmly around the user (not the specifier or tool vendor ;-) ) - it has to be easy to user & 'obvious'...
Create Single Location for Sparx EA Settings & Configuration Files for Multiple Crossover VMs
This provides a single file location on the Mac (or Linux?) to hold the Sparx EA configuration, user searches, database error output when used with Codeweavers Crossover. The same principle would work for the 'bare' Wine.
When Sparx EA is installed into a Bottle each Bottle is deliberately isolated. This is fine normally but if you've created custom search definitions and later create a new Bottle with Sparx EA this new bottle won't have your custom search definitions. You could copy the file containing the search definitions /Search Data/EA_Search.xml but changes to searches in one bottle won't be reflected in the other so you then have to remember to copy from one Bottle to the other, etc.
This method using a symbolic link creates a central single (master) location for these Sparx EA user settings and then places a symbolic link to this common location in each bottle containing Sparx EA.

Note: Since Sparx EA saves the Workspace layout into a folder named after the specific build of Sparx EA, e.g. 'EA1608Workspace-Layouts' there isn't a common file location that can be used to hold these layouts (unless creating a symbolic link to a single .eaworkspacelout file is used).
Another advantage is that if you delete the Crossover Bottle containing Sparx EA these settings won't be deleted with the Bottle. This becomes increasingly important given the cumulative time spent creating custom searches etc.
Create a New Common Location for Sparx EA Settings
- Under your user ~/Library/Application Support folder create a new 'Enterprise Architect' folder i.e.
- /Users/<<username>>/Library/Application Support/Enterprise Architect
- Choose the Bottle holding the Sparx EA data to be used for this common folder, the 'Sparx Systems' folder will be located at
- up to and including Windows 8 bottle: /Users/<<username>>/Library/Application Support/CrossOver/Bottles/<<bottle name>>/drive_c/users/crossover/Application Data/Sparx Systems
- Windows 10 bottle: /Users/<<username>>/Library/Application Support/CrossOver/Bottles/<<bottle name>>/drive_c/users/crossover/AppData/Roaming/Sparx Systems
- Copy this folder
- Paste this folder into the one created at 1 so that you now have
- /Users/<<username>>/Library/Application Support/Enterprise Architect/Sparx Systems
- Rename the existing (old) folder at 2 e.g. 'Sparx Systems - old' to preserve the settings should something go wrong

Creating a Symbolic Link to the Enterprise Architect Folder
- Open the Terminal app
- Type 'ln -s '
- Drag and drop the 'Enterprise Architect' folder from the Finder window onto the Terminal window to set the source for the symbolic link
- Add a space after this in the Terminal window
- Type in the destination where the symbolic link will be saved, for example your desktop '~/Desktop'
- If you look at your Desktop there will be a folder with a symbolic link / alias icon


Corner
Copy the Symbolic Link to Each Crossover Bottle with Sparx EA
- Copy the newly created 'Sparx Systems' symbolic link, in this example saved on the Desktop
- Paste the 'Sparx Systems' symbolic link into each bottle that is to use the common settings
- /Users/<<username>>/Library/Application Support/CrossOver/Bottles/<<bottle name>>/drive_c/users/crossover/Application Data/Sparx Systems
- Validate correct operation by launching Crossover, then the particular Enterprise Architect and displaying the search dialog (Control + F) and verify that your custom search definitions are listed.
- When you're satisfied that everything works you can delete the old folder (/Users/<<username>>/Library/Application Support/CrossOver/Bottles/<<bottle name>>/drive_c/users/crossover/Application Data/Sparx Systems - old)
Add Diagram Feedback and Comment Link to HTML Report
This describes a modification to the HTML report template which adds a link to each diagram which allows feedback to be provided by email on the diagram being viewed. The email captures the comments together with diagram identity and a hyperlink back to the diagram being commented on.
Specifically the email generated by the hyperlink provides:
- a hyperlink to the diagram commented on
- the GUID
- diagram author name
- diagram modification date
- feedback comment
Modify the HTML Report Template
- Under the Resources pane select the Web Style Templates
- Right-click to select 'Create HTML Template'
- Give it a suitable name.
- Under the list of templates that appear in the left pane select 'Body - Diagram'
- Somewhere around line 4 you will see
<div class="PageBody">
#IMAGE#
<div class="ObjectTitle">#NAME# : #TYPE# diagram</div>
- Insert the following javascript
<script type="text/javascript">
//-----------------------------------
function feedbackEmailLink(emailAddress,guidString,title,modified,author,modelRootToIndexHTM)
{
var oGuid=guidString.substring(1,guidString.length-1);
//url for EA object of form http://path/path/path/Index.htm?guid=xxxxxxxxxxxx
var oURL=modelRootToIndexHTM +'/index.htm?guid=' + oGuid;
var eMailSubject='subject=Feedback on - '+ title +' - by '+ author;
var bodyNewLine='%0A';
var objectHyperlinkString = oURL;
var eMailBody='Diagram Title - ' +title +bodyNewLine + 'ID - ' + oGuid + bodyNewLine + 'URL - ' + oURL + bodyNewLine +'Author - ' + author + bodyNewLine + 'Modified Date - ' + modified + bodyNewLine+ bodyNewLine + 'Feedback Comment' + bodyNewLine ;
var eMailLinkText='<a href="mailto:'+emailAddress+'?'+ eMailSubject+ '&body='+eMailBody + '">Send feedback on this view</a>';
return eMailLinkText;
}
//-----------------------------------
</script>
- Look further down until you see the following:
<tr>
<td width="15%" class="ObjectDetailsTopic">Modified:</td>
<td width="85%" class="ObjectDetailsValue">#MODDATE#</td>
</tr>
- After this point you want to insert a new row into the table with the link to create the feedback email. Paste the following afterwards:
<tr id="contact">
<td width="15%" class="ObjectDetailsTopic">Feedback:</td>
<td width="85%" class="ObjectDetailsTopic">
<script type="text/javascript">
document.write(feedbackEmailLink('YOUR_EMAIL','#GUID#','#NAME#','#MODDATE#','#AUTHOR#','http://YOUR_URL'));
</script>
</td>
</tr>
- replacing YOUR_EMAIL with the email address you want it to go to and YOUR_URL with the base URL (folder in which the index.html of the exported model sits)
- Save the modified template.
Use of the Template
- In the Project Browser select the folder/package to be exported
- Right-click and select Documentation | HTML Report
- In the Generate HTMl Report window that appears select the Style drop-down list and select the template you've just saved.
That's it!
The End Result
and when the reader clicks on the link he/she gets:
Other Possibilities
You can also use the same method to display a permalink (url) for each diagram so that visitors can link directly to a specific diagram.
This can be seen in an online repository http://trak-community.org/TRAK_Demo_Repository/
An Implementation of TRAK in Sparx Systems Enterprise Architect
This paper is a companion to a presentation made at the INCOSE UK chapter’s Annual Systems Engineering Conference. The paper describes how an implementation of the definition of TRAK was implemented as a MDG technology for Sparx Systems Enterprise Architect. It covers the architecture, features together with the considerations and an outline of the lessons learnt.