The ‘Package Diagram’ is a structure diagram showing packages and their relationships. Use this Innoslate diagram to describe how a model is organized.
Using Package Diagrams
Function | Description |
---|---|
Creating Package Diagrams | Using ‘Diagrams View’ in Innoslate, you can create a new ‘Package Diagram.’ |
Package Diagram Constructs | The ‘Package Diagram’ supports one unique diagram construct: a ‘Package.’ |
Adding a Package | A ‘Package’ construct can be added to a ‘Package Diagram’ via drag-and-drop. |
Assigning Containment | You can assign containment within a ‘Package Diagram.’ |
Assigning Import | You can assign import within a ‘Package Diagram.’ |
Removing a Construct | A construct can be easily removed from a ‘Package Diagram.’ |
The ‘Package Diagram’ is a structure diagram showing packages and their relationships. This diagram is used to describe how a model is organized
Creating Package Diagrams
Within the ‘Diagrams Dashboard,’ users can create a new diagram by clicking the ‘ Create Diagram’ button in the top right corner of the page.
Clicking the ‘ Create Diagram’ button will open the Create Diagram dialog where you will be directed through the process of creating a new diagram.
Create a Package Diagram
- Choose Which Type of Diagram to Create
In step 1, select ‘Package Diagram,’ under ‘SysML,’ as your diagram type.
Click the ‘Next’ button.
- Specify New Root Action Information
In step 2, you will be prompted to input a diagram ‘Name,’ ‘Number’ (optional), and ‘Description’ (optional). Then, click the ‘Finish’ button to save and automatically open your new Package Diagram.
Package Diagram Constructs
The ‘Package Diagram‘ supports one unique diagram construct: a ‘Package.’
-
Package
In the system model, a package is a construct that enables you to organize entities into groups. Packages define namespaces for packageable entities. Entities from one package can be imported and/or contained by another package. In the diagram, this construct is represented as a rounded box with a top tab (similar to the shape of a file folder) and contains the name of the ‘Package’ in the top section.
Adding a Package
A ‘Package’ construct can be added to a ‘Package Diagram‘ via drag-and-drop.
-
Within a ‘Package Diagram,’ click the ‘Package (Asset)’ icon in the ‘New’ tab of the left sidebar and continue to hold down the left mouse button.
-
Drag the ‘Package (Asset)’ icon over to the adjacent diagram canvas.
-
Release the left mouse button while over the diagram canvas to drop the new ‘Package’ and add it to the diagram.
Notice the ‘Package’ stays selected once it has been dropped. Since it is selected, the toolbar changes to include buttons for functions that can be used on the construct. The sidebar also changes to include additional ‘Metadata,’ ‘Attributes,’ and ‘Relationships’ tabs.
-
Once added to the diagram, enter a meaningful ‘Name’ for your new ‘Package’ via the ‘Attributes’ tab of the left sidebar (focused automatically for convenience).
-
Click the ‘Save’ button located on the toolbar to persist your changes to your project’s database.
* Note: The above process describes using the ‘New’ tab of the left sidebar, which automatically generates a new entity to represent each new diagram construct. If you would like to reuse existing entities from your database to represent a new construct, use the ‘Existing’ tab instead.
Assigning Containment
‘Containment’ can be assigned within a ‘Package Diagram‘ via drag-and-drop. Both the “to-be” parent and child ‘Package’ constructs must be added to the diagram first before containment can be assigned.
- Within a ‘Package Diagram,’ select the ‘Package’ construct you would like to assign as the parent.
- Click the green circle and continue to hold down the left mouse button.
- Drag the green circle over to the child ‘Package’ of your choice.
- When the child ‘Package’ box highlights green, release the left mouse button over the ‘containment’ section to add a decomposed by relationship.
- Once added to the diagram, the new relationship should appear as a circle with a plus sign, with a solid line from the parent to the child ‘Package’ construct.
- Click the ‘Save’ button located on the toolbar to persist your changes to your project’s database.
Method #2
Containment can also be assigned within a ‘Package Diagram’ via drag-and-drop over an existing ‘Package’ construct. In this method, the “to-be” parent must be added to the diagram first, before containment is assigned.
1. Within a ‘Package Diagram,’ create a new or select the ‘Package’ construct that you would like to assign as the child.
2. Click and drag the previously selected “child” ‘Package’ over to the desired “parent” ‘Package’ of your choice.
3. When the desired “parent” construct highlights green, release the left mouse button over the ‘containment’ section to have the “child” construct be enveloped by the “parent” construct. This will also automatically create a decomposed by relationship.
4. Click the ‘Save’ button located on the toolbar to persist your changes to your project’s database.
Assigning Import
‘Import’ can be assigned within a ‘Package Diagram‘ via drag-and-drop. Both the “to-be” parent and child ‘Package’ constructs must be added to the diagram first before the import can be assigned.
- Within a ‘Package Diagram,’ select the ‘Package’ construct you would like to import into another ‘Package.’
- Click the green circle and continue to hold down the left mouse button.
- Drag the green circle over to the child ‘Package’ of your choice.
- When the child ‘Package’ box highlights green, release the left mouse button over the ‘import’ section to add a related to the relationship.
- Once added to the diagram, the new relationship should appear as a dotted line with a directional arrow from the parent to the child ‘Package’ construct.
- Click the ‘Save’ button located on the toolbar to persist your changes to your project’s database.
Removing a Construct
A construct can be easily removed from a ‘Package Diagram.’
- Within a ‘Package Diagram,’ select the construct you wish to remove. This will make the toolbar appear with applicable functions which can be used on the selected construct.
- Click the ‘Remove’ button to remove the construct from the diagram (as the default action).
* Note: The ‘Remove’ button also includes a drop-down menu where you can select ‘Delete from Database’ or the default option of ‘Remove from Diagram.’
To continue learning about SysML Diagrams, Click Here.
(Next Article: Package Diagram Modifications & Settings)