The built-in configurable Graphs view can be configured to enable users to not only visualize the data in the graph, but also graphically work with the data directly in the graph. And because it is a generic view, it can be used with all models and use cases in SystemWeaver.For example, if working with cyber security and an attack tree, you could start from an attack, add input and "or" and "and" gates, events and then add requirements. Or if working with a safety case, you can create your argumentation tree starting with a goal and then proving in your analysis that you have completed all the needed actions to prove your system is safe.
This article describes how to use the Edit mode to modify data directly in the graph view in the same way you would edit data in the structure tree. Any edits made via the graph are reflected in the item structure in the tree view.
- Basic Functionality
- Activating the Edit Mode
- Creating New Parts
- Adding Existing Parts
- Removing Existing Parts
- Connecting Objects
- You must have "Write" access rights to the data to be modified
- An SW Architect has the view for editability using the Graph specific XML tags
- An installation of SystemWeaver version R37 or later
When planning to use the graph view to edit data, you should first be familiar with the basic functionality that the view offers since many of the available tools are helpful when working in the Edit mode.
Copy and Paste
With the Edit mode turned on, users can utilize both the Copy and Paste operations. It is possible to, e.g.,:
- Copy and paste within the graph
- Copy from a grid and paste in the graph
- Copy from the structure tree and paste in the graph
In the below example, an "Actor" is being copied from a grid and pasted into the model.
Secondary Item View
Combined with the use of the Secondary item view, you can make edits to, e.g., attributes, description, etc., to an individual item selected in the graph using, e.g., the Overview or Grid view, while keeping the graph locked in view.
When doing changes via the Secondary Item view or the structure tree, you will need to refresh the graph to view the changes.
Activating the Edit Mode
To work with the data directly in the graph, you must first activate editability. To do this, click Edit.
|Note: If the Edit option does not exist, the graph is not configured to allow editability. Contact your SystemWeaver Architect to inquire about turning on the option.|
When the Edit mode is activated, users can perform the following operations directly in the graph if the configuration supports them:
- Create new parts and their resulting graph nodes
- Add parts and their resulting graph nodes
- Remove existing parts and their graph nodes (single or list)
- Update nodes (name and attribute)
- Connect nodes
The data modifications that you can make via a graph view will always be in accordance with the meta model and your access rights, in the same way as they are when working in the structure tree. When data is modified using the graph right-click menus, or upon a Refresh that results in new/modified data in the graph, the currently displayed layout is used as a reference point rather than any saved layout. Note that some further manual adjustments may be needed to make room for newly added data, e.g., grandchildren. Alternatively, Relayout can be used.
|Tip: Multi-select of nodes and ports in the view is supported by holding down the Ctrl key and selecting the nodes.|
Creating New Parts
Creating a new part via the graph creates a new item in the structure and its resulting node in the graph. To create a new part, right-click on the parent node and select New. Then, select the part type from the list provided. In the below example, a "Use case" or an "Actor" can be created and added to the "Use Case Diagram".
A New item dialog will then display in the same way as it would if you were to create the new part via the structure tree.
Enter a Name, etc. for the part and click OK.
The new "Use Case 7" created above now displays in the graph (and in the structure tree).
Adding Existing Parts
There are two options for adding an existing part to the structure via the graph view.
One option is to use Copy and Paste as described above, e.g., to paste from a grid you have loaded in a secondary item view. The other option is to use the Add option in the right-click menu. Either way, this will add the part to the structure and its resulting graph node.
To use the Add option, right-click on the owning node and select Add. Select the part type from the list provided in the menu.
The Open items of type XXX will display. Select the item and click Open item. Multi-select is supported as shown below.
The added parts selected above now display in the graph (and in the structure tree).
Removing Existing Parts
To remove an existing part and its graph node in the structure via the graph, simply select the node, right-click and select the Remove option. The Remove option menu labels are configurable so you will need to select the appropriate one to complete the removal. The Remove options provided in the example here will differ from the ones found in your installation. Below is one example of a configured Remove option.
A Confirm dialog will display. Click Yes to confirm the removal. The selected node(s) will be removed from the graph and from the structure tree view. If the part is not used in any other models in the database, you will be provided with a prompt to delete it.
To create connections/relations, select the objects, e.g., nodes, ports, right-click and select the appropriate Connect option. The connect options in the menu are configurable so the ones provided in the example here will differ from those found in your installation.
Below are examples showing how to connect nodes.
This configured menu presents four different connect options per the meta model for connecting "Use Cases".
Here, two different connect options for connecting and "Actor" and a "Use Case" are available per the meta model.
Below is an example showing how to connect a node with a port. With a node and a port selected, a "Connect Ports" connect option is available.