wiki:EA_FAQ
Last modified 9 years ago Last modified on 02/24/2010 12:23:47 PM

Enterprise Architect FAQ

  1. How do I add something to the EA model?
  2. Notes on Robustness Diagrams
  3. Notes on Sequence Diagrams
  4. How do I link a note to an object's note text?
  5. How do I template a class?
  6. Adding Foreign Key Relationship between SQL Tables
  7. What are those red triangles that seem to magically come and go? (unanswered)
  8. Importing SQL schema into EA
  9. How do I get files into/off the EA windows box?
  10. Sharing Authorship of a Package
  11. EA Templates: Making changes or creating new templates within EA

Diagrams

How do I add something to the EA model?


Tim Axelrod answers questions three:

  • How do I add my class as a directory parallel to Citizen
    Check out the "Support" package: Select that package with left mouse button, then right click and select Package Control -> Checkout. Then Add->Add Package
  • How do I generate a pretty diagram
    Right click on the package, then Add->Add Diagram->Class Diagram. Drag your class onto it, do whatever.
  • How do I add it to cvs
    When you have made your changes, PackageControl->Checkin (in "Support" package) will put it in cvs and give you the opportunity to make a log entry

Notes on Robustness Diagrams

  • Robustness diagrams belong with use cases
  • Robustness diagrams should only include entity objects from the domain model. These should be instances, not simple links. If you find a missing object, add it to a local diagram in your package and mark it to be transferred to the domain model. There will be separate Domain model for each Data Challenge and for LSST.

Notes on Sequence Diagrams

  • Sequence diagrams belong with class diagrams in the logical model.
  • Sequence diagrams should have instances of classes from the logical model. Never include objects from the domain model.
  • When adding an operation (drawing a line from the life line of one object to another), add it as an operation. This will update the original class in the logical model. You will need the logical model checked out. Also, you will need to negotiate with whoever owns that package. I'm not sure how best to proceed with the sequence diagram without getting stuck in negotiations; perhaps sprinkle notes around where operations are required?
  • Details on Adding Methods (nms):
    • You will need to checkout both the sequence diagram you wish to edit as well as the part(s) of the logical model containing the class(es) you are applying the methods to. For example, when I added the 'getWCS' method in one of our Image Subtraction sequence diagrams to the Exposure class, I had both our IS sequence diagrams and the LSSTData package (containing the Exposure class) checked out.
    • After you have drawn your line and typed in the approprite info for the method, double click on the method text. This brings up the "Methods Properties" window. This window allows you to edit/add parameters, return values, notes, etc. to your method.
    • Click on the 'operations' button in this window. This brings up another window called "class_name Operations", where class_name is the name of the class to which the operation will be applied.
    • In the top half of this window, you will add the name of the operation, the return type, and any parameters needed. You can directly type the return type in to its box or choose from the extensive list of types available. Some return types are duplicated numerous times in this list...not sure why this is or if this is a good thing!
    • When you are satisfied with your edits click the 'save' button in the middle of the window. The successfully saved operation will show up in the list in the bottom half of the operations window, along with any other operationss currently on this class.
    • If you wish to edit this or any other operation on the class, simply select the operation you want to edit from the list and edit the operation. CAUTION: if you wish to add a new operation while in this window, make sure you click "new" before you start typing in the boxes. If you happen to have an operation selected (EA defaults to highlighting/selecting the last operation added) you will overwrite the operation when you click the 'save' button if you do not click the 'new' button first.

  • The basic controller for an image processing sequence diagram will be a subclass of Stage, the pipeline stage controller.

How do I link a note to an object's note text?

  • Add the object to the diagram
  • Right-click the object and select Add->Note
  • Set approximate width of note (optional but helps for wide notes)
  • Right-click on the link to the note and select Link this Note to an Element Feature
  • Choose Feature Type: Element Note in the resulting dialog box

How do I template a class?

  • Double click on the class name to set class properties
  • Click the Detail tab
  • In the Templates box (lower half):
    • Leave Type=Parameterised
    • Click Add to bring up a dialog box
    • Enter the type name in the Parameter box
    • Set Type to "class" (typename might also work)
  • The type parameters appear in a dashed rectangle at the upper right corner.
  • How do I specify a templated member function of a class?
    • EA does not appear to support this.

Adding Foreign Key Relationship between SQL Tables

  • Use Class -- associate to create association
  • Right click on the association, change
    • direction: unspecified
    • style: autoroute
  • Make sure the columns needed for the FK are defined in both tables, and that the pointed-to table has primary (or unique) key defined
  • Again right click on the association, choose "foreign keys"
    • select columns which should be part of the FK and "Save"
    • Fix the name of FK. It should follow the convention: FK_thisTableName_pointedToTableName_columnNameOfThisTable.
    • Save again
  • Update multiplicity of the association as needed (double click on the association, then use "Source Role" and "Target Role" tabs)
  • Fix the diagram:
    • remove "+PK_..." and "+FK_..." (by pressing F2 and delete for each)
    • rename link name (by pressing F2 and changing name)
  • Align association on diagram(s)

What are those red triangles that seem to magically come and go? (unanswered)

Code Generation and Import

Importing SQL schema into EA


This is useful if you have a large schema outside of EA and want to import it. It is a one-time operation, it is unlikely we will need to do that in LSST (we already went through this once and have schema in EA). It is probably worth documenting, just in case we do need to redo this ...

  • You need to have a local database that EA can connect to. In many cases this will mean
    • installing MySQL
    • installing ODBC driver for EA
    • loading schema
    • setting appropriate privileges
  • on Windows. I found this link useful while installing the ODBC driver: http://sparxsystems.com.au/EAUserGuide/index.html?setupmysqlodbcdriver.htm
  • Once the database is set up, in EA:
    • create new package
    • create a diagram within new package
    • select Project -> Database Engineering -> Import DB Schema from ODBC
  • Be aware that some types (like UNSIGNED) are not correctly handled by EA
  • The diagram often needs to be rearranged, in particular the names next to the foreign key relations.
  • Related EA help: "Import Database schema from ODBC".

Files and Packages

How do I get files into/off the EA windows box?

Linux or MS-Windows users with SSH suite installed, use scp or sftp.
MS-Windows users can enable Local Resource Disk Drives option on Remote Desktop Connection.

  • EA_Username is your EA Server login name
  • The name of the file is file.txt
  • C:documents and settingsEA_Username is your "home" directory from the perspective of the Windows file sytem
  • The file is or will be located in C:documents and settingsEA_Username mp from the perspective of the Windows file system

Copy files from the EA server

Using a terminal window within your Remote Desktop session-
scp ./tmp/file.txt remoteusername@remotecomputeraddress:/destinationpath/file.txt (note the period before /tmp)

Using a terminal window from your local machine-
scp EA_Username@ ea.lsstcorp.org:./tmp/file.txt /destinationpath/file.txt (note the leading period on /tmp)

Copy files to the EA server

Using a terminal window within your Remote Desktop session-
(must be able to SSH to the remote computer)
scp remoteusername@remotecomputeraddress:/pathtofile/file.txt ./tmp/file.txt (note the leading period on /tmp)

Using a terminal window from your local machine-
scp /pathtofile/file.txt EA_Username@ ea.lsstcorp.org:./tmp/file.txt (note the leading period on /tmp)

Sharing Authorship of a Package

  • There is no easy way for multiple authors to simultaneously edit one package of the model.
  • It is possible, but difficult, to have one author export a copy, work on that, then have the person who has it checked out merge it. The procedure goes something like this, though details are lacking:
    • Export the package to an external xmi file. This does not require you to check out the package.
    • Edit the exported package. This may require creating a new ea file and importing the diagram into that, but I'm not sure of the details.
    • Export the updated package.
    • Merge the changes:
      • Open the original model and check out the package.
      • Show differences between that and the xmi package. How?
      • Incorporate the desired differences.

EA Templates: Making changes or creating new templates within EA

When creating or editing a template you need to do the following:

  • Export the template (rtf) and place it in C:\EA_Sharing\templates under your name (create a folder if it doesn't exist)
  • Send me an email to igoodenow@… with the name of the rtf file, the name of the template as seen within EA, and to which model it belongs
  • Make sure you keep your own copy; the file placed in C:\EA_Sharing\templates will be removed once it is added to the "Master" EAP file

Same procedure for images except you will use the images folder.