AI4MDE studio

Working with Diagrams

You can create diagrams from scratch in the Projects section accessible from the sidebar menu. Here, you first create and name your project. A project can have many systems, and a system can have many diagrams. For example, you might want to create a project called Airline, which is split over several systems such as Logistics, Payments, Marketing, Maintenance, etc. Each of these systems might contain one or several class, use case or activity diagrams. These diagrams may or may not have common elements, like the class Airplane appearing in class diagrams in both the Logistics and the Maintenance systems.

Once you have your project and system, you can get started working on a diagram.

Class Diagrams

Nodes

Creating and Editing

Nodes are the buidling blocks of class diagrams. By right-clicking your modelling area, you have the option to create a new node representing a Class, Enum, Signal or Application. You will have to name your node. If you are creating an Enum, you can also use the create menu to specify your literals. By right clicking a node, you then have the option to edit it. This allows you to:

  • rename the node
  • edit attributes and methods for classes
  • edit literals for enums
Importing Nodes from Other Systems

In the class diagram, you have the option to import nodes from other diagrams, and even from other systems within your project. The origin system is marked when it is different than the current one. Sometimes you are importing a node that in other diagrams has some preexisting edges connecting it to nodes that already exist in your current diagram. If that happens, these edges will be added to your current diagram as well.

Removing and Deleting

You have two options in terms of removing a node:

  • Remove from Diagram: only deletes the node and its edges in the current diagram.
  • Delete Completely: removes the node and its edges in any diagram in your project.

This distinction is important when you have imported a node to multiple systems, and allows you to decide whether you want to delete it only from the current diagram or from everywhere in your project.


Edges

Creating and Editing

You can create an edge by right-clicking on a source node and then selecting the Connect option, then selecting the target node. You can create different types of edges: Association, Generalization, Composition, Dependency. In the edge creation menu, you have the option of setting a label, as well as any eventual source/target label or multiplicity. You can right-click an edge and then select Edit in order to change all of these properties.

You may be in the situation of having to reposition edges in order to avoid overlaps that can make the label, multiplicityes or edge type indistinguishable. You can drag the circular endpoints to reposition the edge. You can also add bending points by double-clicking a specific spot on the edge. These points are also draggable. If you wish to delete a bending point, you can do so by right-clicking it.

Removing and Deleting

When removing an edge, you have similar options as for a node:

  • Remove from Diagram: only removes the edge from the current diagram.
  • Delete Completely: removes the edge from any diagram in your project.

Once again, this distinction is important when you have imported the same nodes to multiple systems, which can lead to imported edges that reoccur in multiple diagrams.

Use Case Diagrams

Nodes

Similarly to the class diagram, you can right-click anywhere to have the option to Create a Node. You can then select between several types:
  • Actor nodes
  • Use Case nodes
  • One System Boundary per diagram. After adding it, you have the option to add other nodes to the system by right-clicking them. This means that their position respective to the system boundary is fixed. If you move the system boundary, the added nodes will move with it. You can also remove nodes from the system in the same way.

Edges

To create an edge, right-click on a source node and select Connect. Then select between the following edge types: Interaction, Extension, Inclusion, and Generalization.

☝️ Node imports are not yet available in Use Case diagrams. Because of this, there is no distinction between deletion and removal for nodes and edges, you only have the Delete option.

Activity Diagrams

Activity diagrams are a central component of AI4MDE. They describe the dynamic behavior of your system and directly influence how web application prototypes are generated. The following sections explain the main elements used to create activity diagrams.

Nodes

To create a node, right-click anywhere on the canvas and select Create Node. You can choose from the following types:

  • Swimlane Swimlanes organize Action nodes according to the Actor responsible for performing them. When creating a Swimlane, you must select an Actor from the Actors defined in your Use Case diagrams. If no Actors exist yet, this list will be empty.
  • Action Action nodes represent tasks performed within the workflow. When creating an Action, you must provide a name. You can also configure its Execution Type, which affects prototype generation:
    • UI Task: performed manually by the user associated with the Swimlane.
    • Automatic: executed automatically in the background. You can define custom code for this behavior.
    The Execution Type does not affect diagram logic, only the generated prototype.
  • Control nodes Control nodes manage the flow of execution. Available types include: Initial, Final, Fork, Decision, Join, and Merge.
  • Object Object nodes represent instances of Classes defined in your Class diagrams. When creating an Object node, you must select a Class. You may optionally specify a State. If no Class diagrams or Classes exist yet, the selection list will be empty.
  • Event Event nodes represent Signals defined in your Class diagrams. When creating an Event node, you must select an existing Signal. If no Signals exist yet, the list will be empty.

Edges

To create an edge, right-click a source node and select Connect, then choose the target node. For most edges, you can configure the Guard and Weight.

Decision Nodes and Conditional Flows

Edges originating from a Decision node use structured conditions instead of simple guards. These conditions determine which path is taken at runtime.

When connecting from a Decision node, you can select between two options:

  • Condition allows you to set a condition for the parsing of this edge based on a value of a selected attribute of a chosen Class node from your system. In the Class field, you can select one of these existing classes. If there are no Class diagrams or Class nodes in your system yet, this list will be empty. With the Aggregate Function option, you can choose whether you want to aggregate all the instances of this class that will exist in your future prototype, for example by considering the SUM, AVG, MIN, MAX, or COUNT of the values for the selected attribute. This attribute can then be set using the Target Attribute field, that shows a list of all the attributes of the selected Class node. With the Operator field, you can choose the operator used in your condition: ==, !=, <, <=, >, or >=. Some of these operators, such as <, <=, >, and >=, can only be used with numeric target attributes. Finally you can set the Condition Value field, which corresponds to the value that your expression will be compared to, be it a string or numeric type.
  • Else Condition means that this edge is parsed whenever none of the conditions of the other edges originating from the same Decision node are met.

See this example of how to create a loan approval decision flow.

☝️ Node imports are not yet available in Activity diagrams. Because of this, there is no distinction between deletion and removal for nodes and edges, you only have the Delete option.

Component Diagrams

Nodes

The following node types are available:

  • System
  • Container
  • Component
In order to add further internal nodes for a Component Diagram node, right-click it and enter the Edit menu. Here, you can add, edit or remove internals. Internal elements have a user-defined name, and a type. The type can be any Class from the Class Diagrams in your current project, or any System, Container or Component from the Component Diagrams in your project. To further model the way in which these internals are connected to each other inside the parent node, you should create another Component Diagram with the name of the parent node and define the internal nodes and their connections there. See the example below.

Edges

You can create edges of the types Interface, and Dependency. In the case of Interface connections, you have to select Interface nodes from the Class Diagrams in your project to serve as Required, and Provider. The two can be the same or different Interface nodes.


Project and System Versioning

The Versions Tab

You can save snapshots of your project under the Versions tab. This is a place to store and manage checkpoints in your project’s history.

For any existing version, you can read its Release Notes, Download it as a JSON file, Load its full state to your project or Delete it.

To create a new version, click on the New version button. Select the From project option, choose a name, and, optionally, write some notes about the version (press Add to add individual notes). Then, press Create version. You will see a new row in the list of available versions.

☝️ Caution: Creating a new version deletes your existing prototypes.

The Exports Tab

You can use this tab to export projects or systems. You have two options:

  1. Export full project: includes everything in your project.
  2. Export selected systems: allows you to choose one or more systems from your project to export.

By pressing the Export button, you will download your selection in the form of a JSON file. You can share the file with your teammates, and they can use it to import your project/system(s) in their AI4MDE instance by following the instructions in the next section.

Importing from a JSON File

To import an entirely new project, go to the Projects page, and use the Upload button. Provide the JSON file of the project (obtained from the Export tab, with the Export full project option), and press Upload.

To import a version or system from a JSON file into an existing project, go to that project’s Versions tab and press New version. You can make use of the following options:

  • From file: use this when importing from a JSON file containing a version of a project that already exists in your AI4MDE instance, such as one obtained by you or your colleague from pressing the Download button next to a version in the Versions tab. Any existing systems in your project will be overwritten with the ones in this version.
  • Add systems: use this when importing from a JSON file containing one or several systems, such as one obtained from the Export tab, with the Export selected systems option. When using this option, your current systems will be kept in your project, and the systems from the JSON file will appear as new systems alongside them.

In both cases, you will need to choose a version name, and upload the JSON file in question, then press Create version.