CameoDataHubTutorial PDF
CameoDataHubTutorial PDF
CameoDataHubTutorial PDF
1
tutorial
No Magic, Inc.
2015
All material contained herein is considered proprietary information owned by No Magic, Inc. and is not to be
shared, copied, or reproduced by any means. All information copyright 2008-2015 by No Magic, Inc. All Rights
Reserved.
CONTENTS
4 . USEFUL SCENARIOS 67
4.1 Working with CSV Data Source 67
4.1.1 Retrieving New Data from CSV File 67
4.1.2 Saving New Data into CSV Data Source 69
4.2 Working with DHLink Summary Report 70
4.2.1 Working with the Report Template 72
4.2.2 Copying Data with Custom Types and Properties 74
You can copy text-based requirements and requirement objects between the above mentioned applications.
1.2 Installation
The recommended way to install the Cameo DataHub plugin is via the MagicDraw® Resource/Plugin Manager.
1. From MagicDraw® main menu, click Help > Resource/Plugin Manager. The Resource/Plugin
Manager dialog will open, Figure 1.
2. Select the Cameo DataHub check box under the Plugins(Commercial) option.
3. Click the Download/Install button.
4. Restart MagicDraw® once download/install process completes.
1.2.2 Installing Cameo DataHub from the plugin source zip file
Cameo DataHub can also be installed from the source zip file of the plug-in if you have downloaded it to your local
file system.
1. From the MagicDraw® main menu, click Help > Resource/Plugin Manager. The Resource/Plu-
gin Manager dialog will open, Figure 1.
2. Click the Import button to browse the local file system to locate the file.
3. Click the Close button of Resource/Plugin Manager dialog to close it.
4. Restart MagicDraw®. The installation will complete after MagicDraw® starts up again.
NOTE After the installation of DataHub, the DataHub menu items will not be
enabled by default. They become enabled only when a new or existing
project is opened in MagicDraw®. The Create OSLC query menu item
is enabled only after you add an IBM® Rational® DOORS® Next Gen-
eration data source.
1. From the MagicDraw® main menu, click Tools > DataHub > Driver Deployment, Figure 2.
2. The driver deployment dialog appears as in Figure 3. Choose a version of IBM® Rational®
DOORS® for which you would like to add the driver from the version drop-down, Figure 3. Click the
Add button and a browse dialog will appear, Figure 4, which prompts you to choose your DOORS
installation directory. Locate it and then click Open.
3. The DOORS driver will be deployed and you can now add a DOORS data source.
NOTE It is important to choose the DOORS version before you click the Add
button.
The current release of DataHub does not support data migration for Requisite Pro, Cameo Requirements+, and
MagicRQ plugin data sources. The current release only supports data migration from DOORS and CSV data
sources to MagicDraw® and vice versa, or from MagicDraw® to DOORS and CSV data sources. Either the source
or target must be a MagicDraw® data source.
2. Start DataHub explorer. Then, add all the data sources you would like to migrate and connect
them.
3. Click Tools > DataHub > Migrate DataHub from MagicDraw® main menu. The migration dialog,
Figure 5, will appear.
4. Choose either the first or second option. If you chose the first option, select the DataHub version
to migrate from the list. If you chose the second option, click the Browse button to locate the Data-
Hub directory. In Windows, this is C:\Users\userdirectory\.datahub, and under Linux, it is /home/
userdirectory/.datahub
5. Click the Migrate button on the migration dialog.
6. The DHLink from the older version of DataHub will be migrated to the current DataHub version.
Once you have the data sources in DataHub open, you can then begin to explore the more advanced features of
DataHub, like copying data and DHLink relations between data sources. The synchronization features of DataHub
will also be illustrated.
1. Click the Add Data Source button on the DataHub explorer toolbar. The Add Data Source dialog
will open, Figure 7.
2. Select CSV from the driver drop-down.
3. Enter the CSV information in the following fields:
• Save Option: if you select the Save automatically whenever changes are made check box,
DataHub will make changes to the CSV file once the CSV Data Source is changed.
4. Click the Create button. Figure 8, shows the results of adding the CSV data source.
NOTE A CSV file must contain names of attributes in the first row and data in
the following rows.
1. Click the Add Data Source button on the DataHub Explorer tab. The Add Data Source dialog will
open, Figure 9.
2. Choose IBM® Rational® DOORS® driver from the driver drop-down, Figure 9.
3. Click the Create button and your DOORS data source should now appear in the DataHub
explorer tab, Figure 10.
NOTE Before you can add an IBM® Rational® DOORS® data source, you
need to start the DOORS client on your machine and then log on to
DOORS, otherwise MagicDraw® will generate an error dialog.
1. Click the Add Data Source button on the DataHub explorer toolbar. The Add Data Source dialog
will open, Figure 11.
2. Select IBM® Rational® DOORS® Next Generation from the driver drop-down and you will be pre-
sented with Figure 11, where you will need to fill in the Service Provider URL, Authentication
URL, and the username and password for the DOORS Next Generation database server. The
service provider URL is of the form https://host:port/rm/rootservices. The Authentication URL will
populate by itself and is of the form https://host:port/jts/j_security_check. An example might be
https://dng.th.nomagic.com:9443/rm/rootservices/
3. Click the Test Connection button to ensure that the connection succeeds. Then click the Create
button and a DOORS Next Generation data source will appear in the DataHub explorer tab.
4. Figure 12, shows the newly created data source.
Figure 12 -- Result of adding an IBM® Rational® DOORS® Next Generation data source
By default, MagicDraw® data sources are not shown in the DataHub explorer tab. DataHub can work directly with
the MagicDraw® containment tree. If, however, you wish to see MagicDraw® data sources in the DataHub explorer
tree, then follow the steps below.
Data can be copied into the MagicDraw® containment area from other data sources. Data can also be moved from
MagicDraw® into other data sources like DOORS and CSV repositories. While moving the data, the DataHub
Copy Data dialog will prompt you to map the source and target types as well as their attribute types. After the
source and target types have been mapped, the data can be copied.
1. Drag and drop the data node from another data source like DOORS, Figure 15.
2. The Copy Data dialog opens and you need to map the source and target types, Figure 16.
3. There are a few points to note while mapping the source and target nodes.
• Mapping mode - this can be either Individual Type mapping or Group Type
mapping. Individual type mapping lets you map the individual nodes themselves while
Group type mapping, Figure 17, lets you map the node type as a whole.
• Set as Default Target Type - If you select this check box, the source nodes are
mapped to the selected stereotype element type, as a default. The Copy Data dialog will
not open the next time you copy the same type of data.
• Define target Type from Attribute value - This mapping option is only available for
group mapping mode. In this mapping mode - node values and their target types may
specified, Figure 18.
•. Exclude all unmapped nodes from DHLink - unmapped nodes are marked with a red
circle beside them and mapped ones have a green circle. If this check box is selected,
unmapped nodes will not be copied and the source nodes will be marked as excluded
with an ‘X’ symbol.
• Sync Direction - Two-way sync, Source to target and Target to source. Two-way
sync will change the nodes on both ends, while a Source to Target or Target to Source
sync will only change a single side.
4. Choose a mapping type, either group or individual, then map the source types to target types, and
map source attributes to target attributes. When the nodes have all been mapped, the red circles
beside them will change to green. Optionally, you can select the Exclude all unmapped nodes
from DHLink check box to exclude nodes which have not been mapped from being copied.
5. After the mapping is completed, a confirmation dialog appears, asking you to confirm the copy.
After confirmation the nodes are copied to MagicDraw® containment area.
This DataHub operation type supports copying data between CSV repository, MagicDraw®, IBM® Rational®
DOORS®, and IBM® Rational® DOORS® Next Generation data sources. This operation does not allow for
synchronization, so data changes will not be tracked. Copying data is achieved simply by dragging and dropping
the node from source to target.
1. First select the operation mode from the DataHub explorer operation drop-down as in Figure 19.
2. Drag any node from DataHub explorer to MagicDraw® containment area, Figure 21. If the node
contains sub-nodes, a confirmation dialog, Figure 20, asking you whether you want to recursively
copy them will appear. Click the Yes button to copy all child nodes recursively, or the No button to
copy only the top level nodes.
3. The Copy Data dialog will open so that source objects may be mapped to target objects, and
source attributes to target attributes.
4. In our case, some Test Items are being dragged from DataHub explorer to MagicDraw® contain-
ment area. The Test Items node has been mapped to a MagicDraw® package type and the sub-
nodes have been mapped to a MagicDraw® business requirement type.
5. The result of the copy operation is as shown in Figure 21.
NOTE The Copy Data operation mode will not create any DHLink, thus,
when either the source or target objects change, the changes will not
propagate and the synchronization option will be unavailable.
This DataHub operation type allows for data copy along with synchronization capabilities. Again, it is simply a
matter of dragging a source node to a target.
1. First select Copy Data with Sync option from the DataHub explorer operation drop-down.
2. In this case, we will be copying some requirement objects from DOORS to MagicDraw’s contain-
ment area. We will choose Group Type Mapping mode.
3. Then, drag any node from DataHub explorer tree to the MagicDraw® containment area.
4. The Copy Data with Sync dialog will appear so that you can map the source node types to target
node types and source attributes to target attributes.
5. The Formal Module is mapped to a MagicDraw® Package type and the sub-nodes are mapped to
a business requirement object type.
6. The result of the copy operation is as shown in Figure 22.
NOTE Data type mapping is normally required when moving data across tools. If any data
copying does not contain the DataHub pre-mapped template, DataHub will ask for addi-
tional mappings.
The third DataHub operation is Create OSLC Link. OSLC links and queries can be created once you have an
IBM® Rational® DOORS® or IBM® Rational® DOORS® Next Generation data source open in DataHub.
OSLC Links can be created to IBM® Rational® DOORS® Next Generation artifacts repository.
1. Select Create OSLC link from the DataHub operations drop-down on the DataHub explorer tab.
2. From an IBM® Rational® DOORS® Next Generation data source, drag and drop a node into the
MagicDraw® containment area.
3. A popup, Figure 23, will prompt you to choose a type of link. Select one from the list and a link of
that type will be created.
4. Figure 24 shows the newly created OSLC hyperlinks in the MagicDraw® containment tree. Fig-
ure 25 shows the OSLC hyperlink’s Properties and Figure 26 shows the OSLC hyperlink in the
DHLink panel.
There are two types of OSLC queries you can construct to query an artifacts repository - simple or basic query and
a more advanced query based on SQL or SPARQL, details of which can be found on the OSLC Specification web-
site - http://open-services.net/.
1. Click Tools > DataHub > Create OSLC Query from MagicDraw® or click the Create OSLC
query icon in DataHub explorer. The OSLC query editor window should appear, Figure 27.
2. The OSLC query editor has two tabs - Basic Query and Query Editor
3. Basic queries are simple text search queries. You can search from the Title, Description, Cre-
ator, Created Date and Last Modified Date fields. Type your search term into the appropriate
check box and click the Run button.
4. The results will appear, Figure 27.
5. After the query results appear you can click the Save as alias button to save the results as the
alias.
1. Click the Create OSLC Query button on the DataHub explorer toolbar.
2. Click the Query Editor tab, see Figure 28 below. In the Query String text box, type your query
which might look like https://host:port/rm/views?oslc.query=true or https://host:port/
bugs?oslc.select=dcterms:created,dcterms:creator{foaf:familyName}&oslc.where=cm:sever-
ity="high"
3. If the query returns any results, they will be displayed on the lower half of the OSLC Query Edi-
tor, Figure 28.
4. You can click the Save as Alias button to save the results as an alias.
5. More examples of queries and their syntax can be found on the OSLC Specification website.
To copy OSLC query results into MagicDraw® as SysML requirements, first you need to set up an IBM® Rational®
DOORS® Next Generation data source and then query the data source using OSLC query syntax. Once you have
the query results you can copy them into MagicDraw® as SysML requirements.
1. From OSLC Query result pane, drag and drop the matched tree onto the MagicDraw® contain-
ment tree, Figure 29.
2. When the Copy Data dialog opens up, choose a Target type from the target type list as shown in
Figure 30. Click OK.
3. The result of the copy is as shown in Figure 31.
Figure 31 -- Result of copying OSLC query result into MagicDraw® containment tree as SysML requirement
Note The OSLC Query Editor only supports Copy Data and Create OSLC
Link as shown in Figure 32.
The Conflict Dashboard appears with all changes that need to be synchronized, Figure 34.
A simple color scheme exists for differentiating between different type of node changes. The following table
explains the meaning of the different colors.
NOTE The Conflict Dashboard will be displayed if you perform Check Node
Changes or Check Node Changes Recursively at any data source,
except MagicDraw® data source.
The Conflict Dashboard allows you to resolve node changes by either synchronizing a node from source to target
or from target to source.
1. Select one of the check boxes on the left hand side, Figure 34. That side will become the master
data source and the other side will pick up the changes from it.
2. A single node can be synchronized from either source to target or target to source, but not both.
Different nodes, however, can have different synchronization directions. For example, one node
could be synchronized from source to target and another node could by synchronized from target
to source.
3. Click the Synchronize button when you are done selecting the appropriate check boxes.
®
• From MagicDraw context menu, Figure 38. Choosing this option will render the selected node in
®
the MagicDraw containment area as the Master.
Here is a sample scenario that involves the use of MagicDraw® and DOORS:
1. Package Requirements that contains nodes “General Description”, “Introduction”, and “Specific
requirements” is created.
2. All nodes are copied from DOORS to MagicDraw® with associated DHLink.
3. Node "Introduction" from DOORS is updated to "Introduction Edit".
Figure 39 -- Synchronization from the Containment Tree with the Sync Button Indicated
4. If the synchronization is to be done from MagicDraw®, click the Sync button on the MagicDraw
Containment tree toolbar, Figure 39.
5. If the synchronization is to be done from Data Sources of other tools in the Cameo DataHub
Explorer, select any nodes then click the Sync button located next to the Operation list (Figure
40). The Data Source that contains the selected node(s) will be synchronized. If the target is differ-
ent from source, the target will be overwritten.
6. In this case, there is no updated data in MagicDraw®, so the operation will show that no change is
found.
7. However, if the synchronization is chosen to be done from DOORS (represented by DOORS Data
Source), right-click DOORS updated data or DOORS Data Source, and then select Synchronize.
8. DataHub will see the updated data "Introduction Edit" in DOORS and apply this updated data to
the related element in MagicDraw®.
Figure 40 -- Synchronization from the DataHub Explorer with the Sync Button Indicated
NOTE In the case of synchronization from the Source to the Target, the data of the
target node is always replaced and updated even though both of them contain
their own updated data.
1. Select node(s).
2. Right-click the selected node(s) and select Synchronize > Synchronize Node.
1. Select node(s).
2. Right-click the selected node(s) and select Synchronize > Synchronize Node Recursively.
• Select a particular Data Source node or any nodes under that Data Source. Click the
Synchronize button on the top-right of the Cameo DataHub Explorer.
• Right-click a particular Data Source node in the Cameo DataHub Explorer. Select Synchronize >
Synchronize Node Recursively, Figure 41.
• Click the Synchronize button on the top-right of the MagicDraw® Containment tree to
synchronize the MagicDraw® Data Sources in the current project.
One-way synchronization updates data only in the direction specified in the Sync Direction option. For example,
if the sync direction is from the source to target, DataHub will synchronize updates that come from the source to
the target data. Therefore, if there are updates on the target side, they cannot be detected and a message saying
there are no changes to synchronize will appear.
1. Drag a source node to a target data. The Copy Data with Sync dialog will appear, Figure 43.
2. Choose the direction of data for synchronization from the Sync Direction options Figure 43. The
selected sync direction will be applied to all nodes to copy.
3. Complete the schema mapping then click OK to start copying data.
1. Double-click the root node of the DHLink hierarchy or right-click it and select Properties. The
Cameo DataHub DHLink panel will open.
2. Right-click the relation to which you want to apply one-way synchronization.
3. Select Change Direction, Figure 44 and click the Sync Direction that you want. The selected
sync direction will be recursively applied to all child nodes.
NOTE The Check Node Change command also checks for changes in the hierarchy of the
node that has the DHLink.
Figure 46 -- Check Node Changes Recursively Command in the DataHub Action Menu
NOTE • The Check Node Changes Recursively command will be enabled only when the
selected node has hierarchy.
• The Pending Delete status can be detected in the Check Node Changes operation
by selecting the Data Source of deleted node(s) to perform the Check Node
Changes command.
1. Double click a node marked with an "X". The DHLink Panel will appear.
2. Right-click over the relation table and select Include Node, Figure 49.
3. The next time you synchronize data, DataHub will recognize it as a newly added node to target
side.
1. Select Copy Data or Copy Data with Sync from the DataHub operations drop-down.
2. Select Group Type Mapping from the Mapping Mode option in the Copy Data dialog, Figure 53.
7. Choose a target node type for that value from the Target Type box on the right-hand side.
8. Continue mapping the attributes.
NOTE: • The functionality to map between Attribute value and Target type is
available only in Group Type Mapping.
• At least 2 values have to be identified for mapping.
• The attribute that is used to define a target type will be dedicated
only for this purpose. It will bound to the target type and will no
longer be available for the schema mapping.
• The mapping can be edited or deactivated in the Schema Map
Manager dialog.
An alias is a reference to a particular node within a particular data source, or OSLC query result. When you create
an alias a short cut is created to the contents of the node and it becomes available separately in an explorer tab, to
view only that node.
You can create an alias for a data source, node, or OSLC query result.
To create an alias
1. Right-click the node or data source and select Create Alias, See Figure 59.
2. The Alias will be created for that node and it will become available in a separate Alias explorer tab,
Figure 60.
1. Click Tools > DataHub > Alias Manager, Figure 61, to open up the Alias Manager dialog.
2. The Alias manager lets you manage all aliases. You can either remove or open them, Figure 62.
1. Click Tools > DataHub > DHLink Panel. The DHLink Panel will open, Figure 63.
2. Right-clicking a node in the DHLink panel yields a context menu, Figure 64.
3. The menu items in the context menu are
• View Schema Map - this opens the Schema Map dialog, Figure 65.
• Change Direction - Two-way Sync, Source to Target only and Target to Source
only - this option changes the current direction of synchronization.
• Remove DHLink - removes the DHLink.
• Select in Application - selects the node in the original application window - if the node
was originally from DOORS - this option will open the node in the DOORS client
application.
• Select in DataHub/Alias Explorer - this selects the node in the DataHub/Alias explorer
4. If you right-click the last column in the DHLink panel, a different context menu opens up. The
items in this menu are View Schema Map, Change direction, and Remove DHLink.
While copying data with Sync from various data sources in DataHub, the DataHub creates DHLink to be used for
synchronization. As you work with more data - the DHLink will keep building up within the DataHub project in
MagicDraw® containment area. If some of these DHLink are deleted from DataHub explorer, the references will
still exist within MagicDraw’s project space. Clean Up DataHub Database will remove these unused references
from the MagicDraw® project.
1. Click Tools > DataHub > Schema Map Manager from MagicDraw® main menu.
2. The schema map manager dialog will appear as shown in Figure 68.
3. The schema map manager enables you to view all of the schema maps available in the system
and it also allows you to edit a schema map, import a new schema map, or copy the current
schema map.
1. Source Type and Target Type - these are all the source and target types from all data sources
currently in the system.
2. Set as Default - clicking this button will set the current schema configuration as the default one.
As soon as you click this button, the button’s text will change to Remove Default. Clicking the
Remove Default button will remove the schema configuration from the selected source and target
types.
3. Deactivate - Activates or de-activates the selected Define Target Type From Attribute Value
schema. This only applies to Define Target Type From Attribute Value mapping option.
4. Delete - clicking this button will delete the current schema configuration.
5. Edit, Save and Cancel buttons - these are used to edit a schema map, and save it, or cancel the
editing of the schema map.
6. Import - clicking this button will open a file browsing dialog which will let you choose a schema
map file for import.
7. Export - clicking this button will open the schema export wizard which will guide you to export the
current schema to a file on your file system. Step one of the wizard shown in Figure 69, lets you
choose the source and target types. Step two of the export schema map wizard is shown in Figure
70, this step lets you choose a schema map for export. Select a check box from the right and click
the Next button. The third screen of the export schema map wizard is shown in Figure 71. This
step lets you choose a schema name and the schema file to export to. Optionally you can even
add a short description of the schema.
8. Close - clicking this button will close the schema map manager dialog.
Figure 69 -- Schema Map Manager’s export wizard - step one - choosing source and target types
Figure 70 -- Schema Map Manager’s export wizard - step two - choosing an existing schema to export
Figure 71 -- Schema Map Manager’s export wizard - step three - choosing a schema name and file name and path
For example, new data Importing Module from Teamwork is added to a CSV file Figure 72. But, it does not show
in DataHub Explorer because DataHub needs to reload it first into its memory in order to include it in a treeview in
the DataHub Explorer tab.
1. Right-click the CSV Data Source in the DataHub Explorer tab, Figure 73.
2. Select Reload to reload the CSV Data Source. New data from the CSV file will appear in DataHub
Explorer, Figure 74.
Figure 74 -- The CSV Data Source Includes New Data in DataHub Explorer after Reloading
NOTE: • Reloading a CSV Data Source will refresh the treeview in DataHub
Explorer.
• You need to save your work on the nodes you are currently editing
before reloading the CSV Data Source. Otherwise new data will
overwrite your unsaved work.
Now if you change or update some data in the CSV Data Source through the treeview, DataHub will not save that
piece of information automatically into the CSV file. You need to save it manually through the Save context menu
in order to save those updates on the CSV Data Source into the CSV file.
For example, we have deleted nodes Category Types and Creating New Teamwork Projects from the CSV
Data Source through the treeview. But, they are still present in the corresponding CSV file because DataHub does
not save updates on the CSV Data Source to the CSV file automatically, and vice versa, Figure 75.
To save updates on the CSV Data Source into the CSV file:
• Right-click the CSV Data Source in the treeview in DataHub Explorer and click Save, Figure 76.
DataHub will update the CSV file with new data from the CSV Data Source, Figure 77.
Figure 76 -- Saving Data on the CSV Data Source to the CSV File
Figure 77 -- The CSV File is Updated with New Data from the CSV Data Source
1. On the main menu, click Tools > DataHub > DHLink Summary. The Cameo DataHub DHLink
Summary dialog will open.
2. Select a Relation Type and a scope of Data Source.
3. Click the View button to preview the selected data.
To save the relations that you want to include in a report and/or create a report in HTML format:
1. On the main menu, click Tools > DataHub > DHLink Summary. The Cameo DataHub DHLink
Summary dialog will open, Figure 78.
2. Select either DHLink or No DHLink check boxes. Select the Data Source check boxes you want.
3. Either click (i) Save to save the selected data or (ii) Generate to produce an HTML report, Figure
79.
You can edit the template file in order to add more information into the report template.
Figure 82, shows how to add the attributes Object Heading into the report template file in order to include them in
the relation summary report.
Figure 83, shows the DHLink summary report that is created by customizing the report template.