Import and export assets (censhare Client)
Import and export assets in the censhare Client. Server actions transfer assets or asset structures between censhare systems.
Target group
Power users
Solution developers
Prerequisites
The server actions for export and import are configured in the censhare Admin Client. For more details on available server actions, contact your administrator.
Introduction
Assets and their relationships form asset structures and represent the data world in censhare. For example, an issue asset can have several layout assets. Image and text assets are placed on the layouts and author assets are assigned to images and texts. To transfer assets or asset structure to other censhare systems, use the server actions for asset export and import im the censhare Client.
About export
To export an asset structure, censhare starts from the selected asset and follows the relationships to the neighbour assets. censhare continues to follow the relationships to neighbour assets until there are no more relationships to follow. During this journey, censhare includes all assets and related asset files in the export file.
Asset structures can vary in many ways:
the number of the assets
the number of assets with attached asset files
the number of relationships
the number of different relationship types
For some use cases, it is not desirable to export the entire asset structure:
The size of the export file is too large.
Only part of the asset structure is needed.
Certain assets or parts of the asset structure must not be exported.
censhare allows you to tailor export functions for different use cases. You can define which assets to include and which relationship types to follow in different export server actions.
At the end of the asset export, censhare creates a ZIP file with .censhare-assets extension. The ZIP file contains the asset XML of the exported assets and their related content. Based on the configuration of the server action, the ZIP file can also contain the asset information in the JSON format.
Export assets
In the censhare Client:
Select the assets that you want to export. To export an asset structure, select the top-level asset only.
Click the Server action icon on the top bar of the censhare Client.
Select the desired asset export server action. Based on your system configuration, there can be several options. If you are not sure which server action to choose, contact your administrator. The file selector dialog of your local system opens.
Do not change the .censhare-assets suffix.
A dialog window shows the number of successfully exported assets. When you export an asset structure, the dialog shows number of assets that were exported from that structure.
About import
The Import assets server action imports files with the censhare export format. Typically, these files have the suffix .censhare-assets. For each asset in the import file, censhare creates a new asset. It does not matter if the asset to import already exists in censhare or not.
There is one exception for assets that are referenced by their resource key in an asset structure during the export. During the import, censhare checks for assets that are referenced by a resource key. Next, censhare verifies whether an asset with the same resource key already exists on the destination system.
If an asset with the same resource key is found, censhare references to that asset and does not import the asset stored in the import file. The existing asset is not updated. If no existing asset is found, censhare creates a new asset with the provided resource key.
When you import assets from another system, the assets can contain master data definitions that do not exist on the destination system. During the import, censhare can create the master data definitions. To finish the import, you must allow creation of the necessary definitions.
Import options
censhare provides several import options.
Assign to a selected asset
During the import, you can assign the imported assets to another asset. For example, a Group asset. The assignment makes it easier to access the imported assets.
Attach all assets: Assigns each asset of the imported assets to the selected asset. You immediately see all assets that have been imported. If the import file contains many assets, it can be difficult to get an overview. This option is useful when there is no top-level asset.
Attach only top-level assets: Assigns only the top-level asset of an asset-structure to the selected asset. Especially with many assets, this option allows you to easily access the top-level assets after the import. However, you cannot use the selected asset to view a list of all imported assets. If there is no top-level asset, no assignment relation is created.
Import calculated features
Values of a feature can be entered directly, mapped from another place, or calculated. Features are called properties in censhare Web. The definition of calculated features contains a formula to calculate the value. Each time an asset with calculated features is stored, censhare calculates the values of these features. censhare can also calculate the values when it imports an asset.
The formula can reference other features of the same asset, features from other assets, or other information in the censhare system. To keep the original values that were calculated in the export system, do not choose the recalculate option.
Depending on the formula of the feature, the calculated values of the export system can be irrelevant to the import system. To discard the values from the export system, choose the recalculate option.
Reset features
Certain features of an asset are related to the system where they have been created. For example, modified by stores the ID of the last user who edited the asset. This information is not always relevant when you import an asset to another system. In censhare, you can reset specific features while the import:
Feature | Comment |
modified by | The last user who edited the asset |
created by | The user who created the asset |
owner | The user or user group that owns the asset |
non-owner-access | The level of access for non-owners |
workflow | The assigned workflow |
workflow step | The assigned workflow step |
workflow target | The assigned workflow target |
1. domain | The assigned domain |
2. domain | The assigned second domain |
keywords | Keywords selected from a keyword tree |
categories | Categories assigned to the asset |
asset messages | Error messages attached to an asset |
If the value of a feature on this list does not exist on the import system, censhare creates it. For example, users and domain entries are then available on the import system and can be selected. If this behavior is not desired, reset the respective features.
Import assets
In the censhare Client, click the Server actions icon on the top bar.
Select Import Assets. The Import Assets dialog opens.
Select the desired options and click OK. For the options, see The Import Asset dialog. The file selector dialog of your local system opens.
Select the asset import file and confirm. A dialog window opens that shows the number of assets to import.
To start the import, click OK.
If the asset import file contains master data definitions that are not present in the import system, a dialog opens. The dialog lists the definitions that must be created during the import.
To create the master data definitions and start the import, click OK.
If you do not want to create the definitions, click CANCEL. The import process stops. No assets are imported.
The Import Asset dialog
The Import Asset Dialog provides several import options:
Attach with Assignments to selected asset: Assigns the imported assets to the selected asset in the censhare Client. If no asset is selected, censhare does not create any relations. Activate this option to see the two choices for the option: censhare can attach only top-level assets or attach all assets of an asset structure to the selected asset.
Import calculated features: Recalculates the values for all features which use a formula.
Reset features: Displays a list of features that you can reset for all imported assets. Select the features that you want to reset.
Result
You know how to export and import assets in the censhare Client.