Return to the Top of the Tutorial (⇧) or Go back to the Prior part of the Tutorial (⇦)
- If you are performing this exercise while referencing a Neo4j graph that already has Nodes and Edges, then:
- Confirm that you have the right to alter that graph's content
- "Drop" all content from that graph (to make it easier to understand what content is getting created by Syndeia)
- Go to the Neo4j browser and enter this Cypher to delete all nodes and edges in the graph.
MATCH (n) DETACH DELETE (n); - Review the Cypher reference card for the details on this and other Cypher queries.
- Go to the Neo4j browser and enter this Cypher to delete all nodes and edges in the graph.
- If the modeling tool is not yet installed or if the Syndeia Plugin is not yet installed, revisit the tool installation guides.
- Obtain a local copy of the sample model used for this tutorial
- Retrieve UAV_Graph.mdzip from SysML Models, Profiles and Mappings
- after completing the tutorials, you may attempt this process with your own models but the tutorial assumes that the models have the necessary Profiles referenced.
- Retrieve UAV_Graph.mdzip from SysML Models, Profiles and Mappings
- In the modeling tool,
- Select File::Open Project...
- Open the model UAV_Graph.mdzip.
- Observe that the System package in the model includes child packages named Activity, Interactions, Requirements, State Machines, Stereotypes, Structure, and Use Cases, as shown in the figure below.
The UAV structure is shown in the SysML BDD "UAV Structure".
Packages include behavior, structure, and requirement representations of the example UAV system. The elements in these packages are interconnected. You will run Neo4j queries that illustrate the interconnections in the next section. - Enter the Connection settings for the Neo4j service (from Download, Install, and Setup Neo4j) in Syndeia's Settings dialog:
- Select any element in the Containment Browser on the left (for this step, it does not matter which one is chosen)
- Right click on that element and select Syndeia > Settings from the context menu.
- Specify the settings to connect to Neo4j, as shown below
- Use graph service: Checkmark Enabled
- Select graph database: Neo4j
- Protocol: bolt
- Hostname: hostname of the server running Neo4j service (e.g. "localhost" or "my.host.com" or similar. Note that the scheme and port are excluded here)
- Port: network port of the Neo4j service (e.g. 7687, without the shown comma)
- Username: the Neo4j username (not your PC or MagicDraw identity unless they happen to be the same)
- Password: the Neo4j password for the Neo4j username
- The default password is neo4j (unless you changed it during Neo4j installation).
- Click outside any of the changed Settings, then click Apply to save the new Settings values
- For troubleshooting: these settings are saved to your user settings file "syndeia.settings"
- Save your work, exit the modeling tool, restart it, reopen the saved model, and resume with the next steps.
- This reinitializes the Syndeia Plugin to use the newly set connection settings.
- Right click on the A_without_connections::System package in the MagicDraw containment tree and select Syndeia > Utils > Neo4j Utils > SysML → Neo4j to to recursively visit all supported SysML elements (recursively) and to export an appropriate collection of Neo4j Nodes and Edges into the Neo4j graph.
- Click Yes when prompted to confirm.
- Choose No or Cancel if you prefer not to complete this exercise and to alter the target Neo4j graph.
- After processing completes, a graph will be available in the Neo4j graph database. You will see a confirmation message as below. Click OK.
Return to the Top of the Tutorial (⇧) or Continue to the Next part of the Tutorial (⇨)