Author Topic: hyperlink to an EA diagram  (Read 5880 times)

urs.eichmann

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
hyperlink to an EA diagram
« on: December 27, 2007, 04:02:16 am »
We have an internal wiki. What I want to do is:
  • Insert an URL link into a wiki page.
  • When the user double-clicks it, EA should open, load the solution and display the diagram specified by the URL.

Is something like this possible?

Tom G

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: hyperlink to an EA diagram
« Reply #1 on: December 27, 2007, 05:03:06 am »
Hey,

The only way I know something like this is possible is by publishing your project (or part of it) to HTML and creating links to the created web pages (containing the diagrams).

There are two problems with this solution:
1) you have to publish the solution manually (might be positive since you can better control when a change becomes 'public')
2) far worse: the names of the generated pages are not fixed... meaning you can create a link to a diagram but next time you generate the html pages your links are broken... as a result the only meaningful link is to the start page.

Anyone knows a way around this "feature" ?

Tom

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: hyperlink to an EA diagram
« Reply #2 on: December 27, 2007, 05:06:40 am »
It seems that you have a two-stage problem: how to get EA to open a specific model, and how to have EA display a specific diagram when the model is opened.

The second one is easy: open a diagram in EA (by hand) and then from the main menu choose Diagram | Set as Model Default. Note that this is not available from the context menu when you right-click the diagram; you must use the main menu.

[NOTE: I am assuming you have the Corporate edition of EA from this point on. A lot of the discussion involves models stored in a DBMS.

I am also listing the steps in a blow-by-blow - pretty long winded - fashion, since I don't know your experience level. Please stay with me.]

The first part is a bit trickier. I suspect - this is entirely without proof, so you need to check this - that you can create a command line with a file name following EA, and that EA will open that file. So far so good, if it works. But that would still handicap you if you need to open a model in a DBMS repository.

Here's what I'd do as an alternative.

When you are working with a model in a DBMS repository, EA allows you 'save' the file to an EAP file. If you do so, the EAP file does not contain the actual model. Rather, it contains the connection string that EA uses to open the DBMS model. If you later open that file from EA, it connects to the DBMS and opens the model from there.

So far so good.

If you were to invoke the file from the desktop, or a command line, or the Windows Explorer, Windows would identify the EAP extension and invoke EA to open the file. Thus, you'd automatically have EA start and connect to the model.

Better, but we're not there yet.

In order to get this to work from a URL, you might have to define a MIME type to associate the EAP file type in a URL with EA. Not difficult to do; check your browser settings.

Almost finished.

What about having EA open a file that's not in a DBMS repository? This is actually pretty easy. You can have EA open an EAP file as if it were in a repository; Microsoft Jet would be the repository 'engine' in this case. Just start EA - there's no need to open any model - and use File | Open Project to get the normal open dialog. Check the Connect to Server box in the upper right, then click the browse button ("..."). In the first dialog (Data Link Properties) choose the appropriate Jet driver - either 3.51 or 4.0, to match the one you have set in the Tools | Options dialog - and then fill out the rest of the dialogs. One of them will allow you to identify which EAP file you are pointing to. Now you can do the same 'save' operation as with a DBMS, and get the same result.

Please let us know how it works.

David
No, you can't have it!

urs.eichmann

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: hyperlink to an EA diagram
« Reply #3 on: December 27, 2007, 05:13:36 am »
Thanks david for your detailed answer. My main problem is, however, not to open the EAP project with a default diagram, but to open a *specific* diagram *within* the project. In our project, we have many diagrams, e.g. one for the use case "Create Customer" and one for the use case "Create Order". If the user is now on a wiki page which deals with orders, I want the user to be able to just click on some link in the wiki page, this should automatically open the EA use case diagram for creating orders *within* a specific EA project.

It would be a viable alternative to use HTML export and link to the generated HTML page, but if the page names are not consistent across differnt publications (as Tom G mentioned in this thread), this of course is no good for us.
« Last Edit: December 27, 2007, 05:13:59 am by urs.eichmann »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: hyperlink to an EA diagram
« Reply #4 on: December 27, 2007, 05:43:00 am »
I see what you mean. You want the ability to (for example) have several links; each URL would open the same model, but with a different diagram.

I suspect you've got a catch-22 here. The Model Default option allows you to set a specific diagram, but it is inflexible; you'll get the same diagram each time. The HTML option has the problem of 'ephemeral' paths. [Note that something more stable and predictable has been brought up as a feature request to Sparx; we've not heard back on this as yet.] The other problem with the HTML format is that you don't actually have the EA model open, just a 'picture' of the model.

I suppose you could write an add-in to help here. You'd have to trap the URL (or command line) somehow, parse it, and then open the correct model. The add-in would need to be registered on the users' machines, and it would also have to be loaded into EA by default. This could be done. The add-in would also have to trap an event when EA started. I don't know if you need to have an MDG technology to do this.

Another approach would be to write an automation project separate from EA, that would start EA for you, open the appropriate model and diagram, then hand over to EA. You'd have to make sure that your automation program stayed around until EA closed, then cleaned up after itself. [Perhaps you could open EA on an independent thread and then exit; you'll have to think this through.]

That last approach might sound daunting, but it would likely be very little work, once you've got the hang of external automation.

David
No, you can't have it!

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: hyperlink to an EA diagram
« Reply #5 on: December 27, 2007, 02:42:22 pm »
Along the lines of what Midnight was saying about saving a shortcut eap file, this functionality has been extended in recent builds to allow you to specify specific diagram(s) to open or can even run a saved search or open a matrix profile.  Shortcuts can now also be saved to simple eap file models, not just database repositories.  Not sure which build this first came in, but it's available in 7.0.818.

See: http://www.sparxsystems.com/EAUserGuide/shortcuts_to__eap_files.htm

The file format created is fairly simple and you may be able to dynamically create the file yourself if needed.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: hyperlink to an EA diagram
« Reply #6 on: December 27, 2007, 03:51:33 pm »
Thanks Aaron,

That's a solid move towards what we (the user community) have been looking for!

Urs.eichmann: If you've been running a build of EA before 818, make sure you download and install the full kit to upgrade. The EA help file and user guide that were posted in the build 818 download page were for the wrong build. This is a known problem, but the 'fix' did not work perfectly.

As far as we - Sparx and I coordinated on this for a while - the full install kit for 818 has the correct help file. As for the on-line help, this too was out of sync, but it may be working correctly now.

HTH, David
No, you can't have it!

ocroquette

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: hyperlink to an EA diagram
« Reply #7 on: January 07, 2008, 07:07:46 am »
One solution is also to extract automatically all the images as bitmap files (BMP, PNG...) using the internal id as filename. If you do this regularly, you can link to the images, which have stable names.
This approach is especially useful to include the diagrams in external documentations.
« Last Edit: January 07, 2008, 07:13:19 am by ocroquette »

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: hyperlink to an EA diagram
« Reply #8 on: January 07, 2008, 01:02:51 pm »
Hi David, I see you're not frozen there yet  ;D, but at least you probably had a "white Xmiss" :)

I spoke with Bruno Cossi http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=;action=viewprofile;username=Bruno%2ECossi A while a go, and he mentioned something about having a sherpoint integration for EA. maybe you should consult with him for a solution.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: hyperlink to an EA diagram
« Reply #9 on: January 07, 2008, 05:19:01 pm »
I believe that's the EA User Group site, which predates the Wiki by some time.

And yes, we got our fill of snow - a couple of feet worth - over the holidays, though not as much as our east coast did by far. But over the past couple of days we've had record-breaking warm temperatures - several degrees C above previous records - and we're in for a few days of heavy rain. Flood warnings everywhere. Not exactly normal min-winter weather for these parts!

David
No, you can't have it!