Generate Graph from SysML Model

  1. Open the model UAV_Graph.mdzip.

  2. The System package in the model includes sub-packages named Activity, Interactions, Requirements, State Machines, Stereotypes, Structure, and Use Cases, as shown in the figure below. The UAV structure is shown as a SysML BDD in the figure. As the name suggests, the packages include behavior, structure, and requirement representations of an example UAV system. The elements in these representations are interconnected, as you will see when you run the queries in the next section.




  3. Go to the Neo4j browser and run the following command to delete all nodes and edges in the graph.
    MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r

  4. Right click on any element in MagicDraw model tree and select Syndeia > Settings. Specify all the settings to connect to Neo4j, as shown below, including the password. The default password is neo4j (unless you changed it during Neo4j installation). Ensure that the "Use graph service" option is checked. Then, click on the Apply button to save your settings.



  5. Right click on the A_without_connections::System package in the MagicDraw containment tree and select Syndeia > Utils > Graph Utils > SysML → Graph to generate a graph in Neo4j for all SysML elements (recursively) in the context of the System package.

  6. Click Yes when prompted to confirm. 



  7.  After a few seconds, a graph will be generated in the Neo4j graph database from the SysML model and you will see a confirmation message as below. Click OK.