MySQL tables_rows → SysML Blocks_Instances
The objective of this exercise is to generate Rhapsody SysML blocks and instances from a MySQL database. Many organizations store data about products in such databases and it is desirable to be able to import this data into the SysML model. In this exercise, we will use the MySQL table created in the previous example and import this information back into an empty model in Rhapsody.
...
- Create a new package in the SysML project and drag some MySQL records into it. They will still be treated as instances (or specializations) of the component block even if they are not in the same package.
- In the Filter query box (upper left corner) of the Connection Manager., enter a valid MySQL syntax query, for example, Select * from test_demo.component where Mass < '3'. Only those records satisfying the query will be displayed and can be dragged into the SysML model.
- Erase the current contents of the Tutorial_2_07 package in Rhapsody, including all connections. Drag some MySQL records into it. Note that a component block is created automatically, along with the specializations corresponding to the individual records.
...
Figure 64Modify contents of database in MySQL Workbench
...
Figure 66 Updated values from MySQL
...
SysML Blocks_Instances → MySQL tables_rows
The objective of this exercise is to generate a table in a MySQL database from a collection of blocks in Rhapsody and then update that table when values change in the SysML model. The following exercise shows this process in reverse. We will use the collection of blocks in the Tutorial_2_06 package in the Rhapsody model supplied, Syndeia Tutorial Testbed. We see a component block with 12 specializations. We will use the parent component block to generate the table structure, using the value properties as column headers, and the specialized blocks to generate the table rows, with the default values as the column entries in each row.
The same process works if the 12 blocks are instances rather than specializations of the component block. Whether the modeler uses instances or specializations to capture actual parameter values is a methodology question; Rhapsody and Syndeia support both.
...
Figure 49 Contents of Tutorial_2_06 package in Syndeia Tutorial Testbed
Figure 50 Confirming table generation
...
Figure 52 Connection Summary tab shows link between SysML block and MySQL table
...
Page Tree | ||
---|---|---|
|