Export and Import the model configuration
Export and Import of the model configuration is an operation that must be performed manually whenever you need to publish a SFHub Display on a different server and database.
The publish of a 'display' requires the alignment of the target model with the source model if changes were made in terms of elements, connections, or layers.
This operation can be performed manually using the standard features made available by PI System Explorer (Import/Export utility).
SFHub Visualizer doen't yet make available this feature.
The target model alignment can be performed before or after the Display Publish.
Before the Display Publish
You can create a new version of the target model:
- Using the Create a New Model Version feature or,
- Using PI System Explorer (New Version button in the Version tab of the model properties)
In both the cases, you must take care to assign the correct Effective Date to the model version.
- As final step, you must align the configuration of the target with the source model.
- Perform the Display Publish at the end.
After the Display Publish
The new version of the target model is created by the Display Publish (see Publish Display). As final steps, you must:
- Align the configuration of the target with the source model
- Perform the Sync Display with Model in order to synchronize the new published display with the aligned target model configuration.
As an example cosider the following scenario where we have two Sigmafine servers (development and production):
- The Development server is used to build and test the Sigmafine model and the SFHub display
- The Production server is where the model and the display are released
The aim of this paragraph is to go throught the possible scenarios.
The below examples use the export and import of the model element with the objective to align the target model confuguration. It is understood that it will be the system administrator's discretion to decide whether to export and import the entire database or rather export single entities (elements, templates, tables, models).
Target database and model are empty
This is the scenario where the Sigmafine model and the SFHub display have been configured and build on the development server and now we want to make them available on the production server.
Before to publish the display, we must copy the Sigmafine configuration from the source server, database and model to the target server, database and model.
On the Development server:
- Open PI System Explorer and select the Server and database to export,
- Select the root node of the Library folder,
- Select 'Export to File' and export the entire database.
Do not select the export Include Security Settings option,
On the Production server
- Open PI System Explorer and select the target Sigmafine Server
- Select or create the target database
- Select the root node of the Library folder
- Select 'Import from File' and select the .xml file exported from the development server
After the target database and model have been created, you are ready to publish the SFHubDisplay:
Target database and model have a configuration
This is the scenario where the Sigmafine model and the SFHub display have been changed on the development server (e.g. new assets have been added in the model and the display) and now we want to align the modified model and display in the production environment.
We must align the Sigmafine configuration on the target server, database and model with the changes made on the development server.
No model versioning
This is the case where the model versioning is not used.
On the Development server:
- Open PI System Explorer and select the source Server and database.
- Open the Elements folder and select the Model you want to export.
- Select 'Export to File' to export the model configuration.
Do not select the export Include Security Settings option,
On the Production server
- Open PI System Explorer and select the target Sigmafine Server and database.
- Open the Elements folder
- Select 'Import from File' and select the .xml file exported from the development server
Basicly you will override the configuration of the production server with the development server.
In case the assett configuration contains references to a PI Data Archive different from the PI Data Archive used by the production Enviroment, then the export and import will override the PI Point configuration as well
With model versioning
This is the case where the model versioning is used to manage changes in the model. In such case you have to take care to export and import the database and model configuration in a proper way.
On the Development server:
- Open PI System Explorer and select the source Server and database.
- Set the Query Date exactly equal to the Effective Date of the model version you want to export.
- Open the Elements folder and select the Model you want to export.
- Select 'Export to File' to export the model configuration.
Do not select the export Include Security Settings option,
On the Production server
Open PI System Explorer and select the target Sigmafine Server and database.
Set the Query Date exactly equal to the Effective Date of the model version where you want to import the configuration.
infoIt is assumed that the target model version has alredy created.
Open the Elements folder
Select 'Import from File' and select the .xml file exported from the development server