Working with MassConfig
This section will guide you through the use of the
MassConfig display and how it can help you to create, delete and modify multiple objects in system:inmation.
MassConfig sheets like workspaces can be saved or exported and shared with other users.
Firstly, create a new workspace for this How-to example by selecting(shortcut Ctrl+N), saving your current workspace if needed.Figure 1. Create New MassConfig Training Workspace
Open a new
MassConfigdisplay by selecting (shortcut Ctrl+M).Figure 2. MassConfig Display
Click on the New Object wizard icon in the main menu bar of the
MassConfigdisplay.Figure 3. Open New Object Wizard
The first step in the Create Object wizard is to choose the type of object, its path and the Model Panel that it will be created in. For this Example select from the drop down menus to create a Folder in the I/O Model. The path will include the object name in your system and, for this example, the
MassConfigTraining folder is created under the Core object. Click Begin to go to the next step.Figure 4. Create Object in MassConfig Wizard - Object Type
Remember to change the Core name from "MasterCore" in the Object path to match the name of the Core object in your system!.
In the Common properties step, confirm the object name and add an object description if you wish. The rest of the options can be left as default. Click Finish to add the object to the
MassConfigdisplay.Figure 5. MassConfig Wizard - Common Properties
The object appears in the
MassConfigsheet as shown below.Figure 6. First Object in MassConfig Display
Once present in the
MassConfigdisplay, the object properties can be edited before actually creating it on the server side (and in the I/O Model tree). One way is to right click on the object in the
MassConfigdisplay to open the context menu and select Edit object. This reopens the wizard where the properties can be edited.Figure 7. Edit Object in MassConfig Display - Context Menu
Alternatively, the object properties can be edited directly in the table of the
MassConfigdisplay by double clicking on the respective column entry.Figure 8. Edit Properties in MassConfig Display Table
Click Simulate to check that all the object properties are syntactically correct before executing the object creation.
Although not mandatory it is strongly recommended to always execute a simulation of the
MassConfigchanges, before actually applying them. This allows to see configuration errors, before they actually go live on the server.Figure 9. MassConfig Display - Create Object Simulation Result
The simulation result is displayed in the message box. Successful simulation will be indicated in the message and the object will have a green tick by it in the
MassConfigdisplay table.Training Task: Simulate a configuration errorEdit the object path so it points to a non existent location in the tree. Simulate the object creation and check the result Once the simulation returns no errors, click Apply to send the configuration to the sever. A similar message box like above will show the result of the actual change. Also the I/O model tree will be updated automatically and show the new folder.Training Task: Create a Generic Item below the new "MassConfig Training" folderClose any open
MassConfigdisplays and open a new empty one. Create a Generic Item object from the I/O model below the
MassConfigTraining folder using the Create Object wizard. Name the object GenItem and use Numeric Value Generator as Generation Type. Change the other settings to your choosing.
Existing objects in the Model Panels can be edited by dragging and dropping them
from the Model Panel into the
MassConfig display. You can also use the context
menu to edit multiple objects or even whole sub-trees below objects.
In this example we will edit the objects that were created in the last section.
Right click on the
MassConfigTraining folder in the I/O Model tree that you created in the previous example and select .Figure 10. Adding Subtree to MassConfig Display
The currently selected folder and all its successors in the tree are added to the
MassConfigdisplay. Notice that there are 2 Tabs at the top of the display. One for Folder and one for Generic Item. Each different system:inmation object type is placed under a separate tab (multiple objects of the same type are placed under the same tab).Figure 11. MassConfig Display - Object Type Tabs
|To complete this part of the How-to you need to have MS Excel 2007 or higher installed on your host machine.|
Open a new
MassConfigdisplay, and add the GenericItem created above to it (or create a new Generic Item in the wizard).
Click the Export to File icon TIP: in the menu bar of the
MassConfigdisplay (shortcut Ctrl+Shift+E).Figure 12. MassConfig - Export to File
The content of the
MassConfigdisplay is exported to an .xlsx file which is automatically opened in MS Excel (or whatever the default application for .xlsx files on your system is).Figure 13. MassConfig Exported to MS Excel
Each different object type tab from the
MassConfigdisplay will be exported to a different tab in the Excel sheet and each worksheet contains the same rows and columns as the
We will use this worksheet to create 10 more generic items in the I/O Model tree.
Copy the second row of the MS Excel worksheet ten times in the rows below
Rename the Basepath and ObjectName with unique names (or add sequential numbering) so it looks similar to the example below:Figure 14. Multiple Generic Item Objects in MS Excel worksheet
All properties can be set/changed in MS Excel. Some property’s values are limited to predefined constants though. Since MS Excel allows for setting any value, they might be invalid, however, the
MassConfigsimulation will reveal this after importing into the
MassConfigdisplay. Check the properties page for details about object properties and their allowed values.
Save the MS Excel workbook (default save location is your documents folder), keeping note of the filename and return to the
MassConfigdisplay in DataStudio.
Click the import from file icon in the menu bar of the
MassConfigDisplay to bring up the Open file dialogue.Figure 15. Import File into MassConfig Display
In the Open dialogue, navigate to the MS Excel worksheet file you just saved and click Open. The Extra Items you created in the Excel worksheet will populate the
MassConfigdisplayFigure 16. New Objects in MassConfig Display
Click Simulate to check if the configuration information is valid. You should see that all changes are successful and a green tick is displayed by each object in the
MassConfigdisplay.Figure 17. Successful Simulation of New Objects in MassConfig Display
If there are any errors reported during the simulation they will be indicated in the errors. It should be possible to fix the configuration problems. Common problems encountered are invalid file paths (orphaned paths) due to a change in the Core or Connector name from machine to machine. Also, an invalid property value could have been entered in the MS Excel sheet and flagged in the
MassConfigdisplay; in this case allowed values for the property will be indicated in the error message.
Click Apply to create the objects in the I/O Model tree and check in the Object Properties Panel that the GenericItemsare generating numeric values.Figure 18. GenericItems Created from MassConfig Display in the I/O Model TreeTraining Task: Add multiple subfolders and itemsUse the MS Excel worksheet export/import to create more folders and subfolders. Create multiple new folders and Generic Items in the same
MassConfigdisplay and vary their properties.
A common use of
MassConfig is to create duplicate sub-sections of Model trees
that might only differ in the name of a root node. This can be achieved quickly
and easily by changing the base path of the object paths using the Rebase
Create a namespace with a node folder with children below it (in the example shown the DemoData namespace is used).
Right-click on the node folder and selectfrom the context menu.Figure 19. Namespace in MassConfig
Click on the Rebase button in the menu bar to open the Rebase dialog.Figure 20. Rebase button in Menu Bar
The Rebase dialog displays the longest common path of the objects in the
MassConfigsheet in the Base path field. In this case it is the path of the node folder "Examples".
We will create a new copy of the "Examples" subtree by changing the new base path to "Examples 2".Figure 21. Rebase Dialog
The Rebase references checkbox is ticked meaning that the paths of any referenced objects will also be changed to the new base path. A total of 9 references will be changed.
Click Change to make the changes to the paths.
The changed paths are now visible in the
MassConfigsheet.Figure 22. Rebase Completed
Click Close to close the Rebase Dialog and return to the
Before we can create the duplicate tree, we need to change the Object Name of the Examples node.
Click on the Folder (IO) tab in the
MassConfigsheet and select the ObjectName field of your top node folder.
Change the ObjectName to match the new base path.Figure 23. Change ObjectName of Node
Click Apply to create the objects in the
The results of the mass configuration will be displayed and the new "Examples 2" duplicate namespace should be visible in the I/O model.Figure 24. Mass Config results
You might have noticed in the above steps, that the Mass operation results sometimes shows that some of the objects to be configured will not be changed.
This happens when these two conditions are met:
The mass operation contained an object, whose properties are 100% identical with an already existing object.
The Operation mode is set to Upsert.
Upsert is the default operation mode, and allows to create and update existing items with the same mass operation. This means, if an object’s path specified in the display already exists, it will be updated with the configuration values in the display (if they differ from the server side). Should the specified path not be found, the object will be created.
There are other operation modes available, allowing for executing different actions on the specified object.