Prev | Next |
Creating Diagrams Elements and Relationships
Once a model structure has been set up and the application has been tailored to suit your needs, including the selection of the DMN Perspective and an appropriate workspace, you are ready to start creating diagrams and elements. While it is possible to create an element without first creating a diagram it is common practice to begin by creating a diagram as a canvas for how the elements will be visualized. The first thing you will need to do is choose a location for the diagram in the Browser window. For example, you might be working on a project and have defined a Package called 'Fraud Detection' under the Decision Modeling Package. By selecting the 'Fraud Detection' Package you are telling Enterprise Architect that this is where you want a new Decision Requirements diagram to be inserted.

In the next few sections we will learn how to create a diagram and add elements, relationships (requirements) and artifacts that will define the model that describes the important decisions, their input data and knowledge sources.
Creating and Viewing Diagrams
The Decision Modeling Notation is effectively a visual grammar, and while there are invisible syntactic items much of the grammar is expressed and viewed visually with diagrams. Thus it is important to be able to create and view the diagrams as these will effectively define the sentences that express the content of decisions. Enterprise Architect is a flexible tool and provides a number of ways of opening an existing diagram and creating a new diagram, including:
- Selection from the ribbons:
- Selection from the Browser window header bar:
- Selection from the Browser window context (right click) menu:
Regardless of the method you choose you will be able to select the DMN diagram type from the 'Diagram Types' panel of the 'New Diagram' dialog.

To open an existing diagram, you locate it in the Browser window and then double-click, or right-click and select Open from the diagram's context menu.

Let's continue on to create a Decision Requirements diagram (DRD) to represent the 'Fraud Detection' decision model. Select the Decision Requirements diagram as the diagram type and enter an appropriate name (note the name of the Package will be used as a default). Once you click on the , a new (blank) DRD diagram will be created and opened and the DMN Toolbox will be displayed ready for you, or a member of your team, to create elements and relationships. As shown in this illustration, a new node will be added to the Browser window, underneath the selected Package, representing the diagram. The diagram can at any point be renamed, or moved to an alternative location, and properties of the diagram can be added or updated.

Enterprise Architect will create a diagram canvas with an invisible frame that represents the border of the diagram. The header information is contained at the top of the canvas and displays the diagram name and the diagram type. The diagram frame can optionally be displayed in documentation and other output as required

Adding Elements to a Diagram
With the new (or existing) diagram opened you are ready to start creating elements and relationships to describe the decisions. There are essentially two types of object that can be added to a diagram:
- New elements - Created by dragging an item from the Toolbox and dropping it onto the diagram canvas
- Existing elements - Placed on the diagram by dragging-and-dropping an element from the Browser window
If you are starting a new project and have just set up your repository, you will not typically have elements in the Browser window so you will make more use of the first option and create elements from the Toolbox. As your project progresses it will become more common to use the second option and drag existing elements from the Browser window onto the diagram.
We will create a new Decision, so we will drag and drop a Decision item from the Toolbox onto the diagram canvas. The element will be given a default name of 'Decision1'. Now using the Properties window, typically docked on the side of the diagram, change the element's name to 'Fraud Level' by typing over the default name 'Decision1'.

This will change the element's name in the Browser window and the diagram. Returning to the diagram you will see the newly added Decision with the name 'Fraud Level'.

We could now use the same method to add any number of other elements, including other Decisions, Input Data, Business Knowledge Models and more. These other elements are all available from the Toolbox.
Adding Relationships to a Diagram
Once you have added two or more elements you can connect them with relationships, which provide the semantic glue between the different elements in the model. For example, an Input Data element is connected to a Decision element using an Information Requirement relationship. There are two primary ways that connectors can be added to a diagram:
- Quick Linker - an intuitive diagram device initiated by dragging a link between the Quick Linker arrow (at the top right of the element) and another diagram object.
- ToolBox Items - connectors can be selected in the Toolbox and then dragged between two diagram objects.
Either method will result in the specified connector being drawn between the two elements. Care needs to be exercised to ensure you are dragging in the right direction - a DMN Information Requirement connector shows that client A requires information from supplier B, so you drag from A to B; but the flow of information is from supplier B to client A, so the resulting arrow points from B to A. The same logic applies to the Knowledge Requirement connector.

Regardless of the method that is used the result will be an Information Requirement relationship connecting the two Decisions. The direction and style of the connector can be altered and any number of way-points can be added to route it differently as the model is developed. This diagram shows the result of adding the connector, if a modeler were to inadvertently add the connector in the wrong direction it can be conveniently reversed by accessing options from the Advanced submenu of the connector's context menu.
