How to get a list of hyperlink information using Astah API

Astah Activity Diagram Sample UML

Yesterday I received a request from one of our customers saying “I’d like to get a list of hyperlink information in a project.”

This is their background:
They have one “Template” model which everyone makes a copy of and modifies for their own use. They heavily reuse UML Activity diagram with lots of hyperlinks. And this customer wanted to list up models that have hyperlinks to certain type of model (in their case, it was a CallBehaviour Action).

Let me show you the solution we provided using a sample diagram below.

UML Astah Activity DiagramThere are three Activity diagrams, A, B and C and [Action0] has a hyperlink to [CallBehaviorAction0] (Red) and both [Action1] and [Action2] have one to [Callbehavior Action1] (Blue) and they wanted to know all about the hyperlink information of the CallBehaviorActions (towards to the CallbehaviorActions) in the project. So that helps them to know what models they need to be careful with when they modify the model.

The easiest way to do is using our new Script Plug-in which enables you to add features via a scripting language dynamically. (Read the “Introduction of Script Plug-in” post for details and how to use.) So one of our developers wrote a Java script for them using Astah API.

Here’s the result of running the Java Script using the Script Plug-in:

Astah Activity Diagram Sample UML

In the bottom pane of the Script window, it lists up all the model information which has hyperlinks to CallBehaviorActions.
Astah_ScriptPlug-n

You can download this Java Script here and there are more Script samples up on our website. Script Plug-in is free to use for both Astah Professional and Astah Community editions. Take a look, download and get the good use of it! Hope we have a library of useful scripts for all the users to share in near future. So if you create one or have any sample requests, please feel free to let us know!
Astah Script Plugins

Cheers,
SJ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s