Astah API User Guide

Astah API is a Java Interface Group for developing applications software using Astah model data.
API can be used for developing plug-ins and also in Script Editor which can be used to access Astah models via Scripting language.

Agreements

  • Redistribution of astah-api.jar file is NOT allowed.
  • By using Astah API, you are agreeing to be bound by the terms of END-USER LICENSE AGREEMENT.

Astah API System Requirements

In order to run applications created by using Astah API, you need system environments that enable Astah to run.


  • Ensure that an appropriate version of Java is installed to run Astah
  • Astah software needs to be installed
    • astah-api.jar is required for application compilation
    • astah-api.jar, lib/slf4j-api-1.6.6.jar, lib/logback-loader-1.0.9b.jar and astah-pro.jar (or astah-community.jar) are required for execution of applications
    • Please let a class path pass to installation folder/lib/*.jar.
    • JAVA VM memory setting is required when handling a large size of Astah file
      Example for setting initial heap size 16MB and maximum 256MB: -Xms16m -Xmx256m
  • Functions

Notes

  • Multi-threading of Astah API is not supported
  • When opening a project file via API (ProjectAccessor.open(String projectName)), an error may occur when the file is locked.
    In this case, try reopening the file via API or open it in read-only mode by setting "true" to allowReadOnly.
    ProjectAccessor.open(String projectName, boolean isIgnoreModelVersion, boolean lockMode, boolean allowReadOnly)

Additional information about Model elements

Difference between UML metamodel and Astah API

A part of the class structure of Astah API is different from the one of UML metamodel. Astah API has a simplified structure. Some of abstract model elements in the UML metamodel inheritance structure are eliminated because they would not be instantiated as model elements.

Class elements with notations

There are some elements that can be shown as normal class notations such as Actor, Interface, Boundary, Entity, Control, and these are the classes that have stereotypes.
For example, Actor is a class that has "Actor" stereotype, and Interface is a class with "Interface" stereotype.

TaggedValue(ITaggedValue)

Astah uses TaggedValues for derived information of Attributes, role names, and expressions about UseCase descriptions.