14.5. Import and Export

Dashboard Builder provides the ability to export and import workspaces, KPIs, and data sources between two Dashboard Builder installations.

In general, it is possible to export the mentioned assets only using the Dashboard Builder web user interface. However, you can import the assets either in the web user interface, or by using the deployment scanner.

The deployment scanner is a subsystem of Red Hat JBoss Enterprise Application Platform that allows you to place the exported assets into the given folder inside the web application. Once the application has started, it scans the deployment folder and imports all the available assets. Note that the assets can be imported only during the deployment and not during the runtime.

14.5.1. Importing and Exporting Workspaces

By importing or exporting workspaces, you can move a set of pages between two Dashboard Builder installations. The procedure moves an envelope being currently used by the workspace, all the sections that compose the workspace and all the panels used in the workspace sections.

Procedure: Exporting Workspaces

  1. In Business Central, go to DashboardsBusiness Dashboards.
  2. In the menu on the left, click AdministrationImport and export.
  3. Choose the Export Workspaces tab.
  4. In the list of all existing workspaces that opens, select the ones you want to export and click Export.

    export workspaces
  5. Click Download to download a single XML file containing the workspace definitions.

Procedure: Importing Workspaces Using Web UI

  1. In Business Central, go to DashboardsBusiness Dashboards.
  2. In the menu on the left, click AdministrationImport and export.
  3. Choose the Import Workspace tab.

    import workspace
  4. Upload an XML file that contains one or more workspace definitions. Uploading a ZIP archive is supported as well for backward compatibility.
  5. Click Import.

Procedure: Importing Workspaces Using Deployment Scanner

  1. Make sure that the XML workspace definition file has the extension .workspace.
  2. Move the file into the /jboss-eap-6.4/standalone/deployments/dashbuilder.war/WEB-INF/deployments directory.

    If the workspace already exists (there is a workspace with the same logic identifier), the file will be overwritten. Note that these two files do not have to have the same name in order to be replaced.

The workspaces are imported once during the application deployment.

14.5.2. Importing and Exporting KPIs

By importing and exporting KPIs, you can move key performance indicator definitions (the KPI type, its columns and display configuration) and their data providers between two Dashboard Builder installations.

Procedure: Exporting KPIs

  1. In Business Central, go to DashboardsBusiness Dashboards.
  2. In the menu on the left, click AdministrationImport and export.
  3. Choose the Export Dashboards tab.

    A list of all KPI definitions in your application opens. You can export one or more of them into a single XML file.

    export dashboards
  4. Select the KPIs you want to export and click Export .

    export dashboards selected

Procedure: Importing KPIs Using Web UI

  1. In Business Central, go to DashboardsBusiness Dashboards.
  2. In the menu on the left, click AdministrationImport and export.
  3. Choose the Import dashboards tab.

    import dashboards
  4. Upload an XML file that contains one or more KPI definitions and click Import.

Procedure: Importing KPIs Using Deployment Scanner

  1. Make sure that the XML KPI definition file has the extension .kpis.
  2. Move the file into the /jboss-eap-6.4/standalone/deployments/dashbuilder.war/WEB-INF/deployments directory.

    If the KPI or the data provider already exists (there is a file that contains a KPI or a data provider with the same logic identifier), the file will be overwritten. Note that these two files do not have to have the same name in order to be replaced.

The KPIs are imported once during the application deployment.

14.5.3. Importing Data Sources

Note

At present, it is not possible to export data sources.

By importing and exporting data sources, you can move one or more external data source connection configurations between two Dashboard Builder installations.

Since the data sources definitions consist of a very small number of attributes, it is possible to create them in your target environment manually by using the External connections panel.

Procedure: Creating Data Sources Manually Using Web UI

  1. In Business Central, go to DashboardsBusiness Dashboards.
  2. In the menu on the left, click AdministrationExternal connections.
  3. Select the type of a new data source (either the JNDI or a Custom DataSource) and fill in the data source details.

    new jndi data source
  4. Click Check DataSource to validate the details.

    If the validation ends up successfully, the following message appears:

    The DataSource is well configured.
  5. Click Save.
list of data sources

Procedure: Importing Data Sources Using Deployment Scanner

  1. Create the data sources definition files with the following supported properties:

    • common properties:

      • type: the type of the data source (JNDI or JDBC),
      • name: the data source name,
      • testQuery: a definition of a query used for testing the data source during the instantiation.
    • JNDI data source properties:

      • jndiPath: the data source bean path.

        Example 14.1. JNDI Data Source Descriptor

        type = JNDI
        name = myCompanyDataSource
        testQuery = SELECT count(*) FROM CUSTOMER
        jndiPath = java:comp/env/jdbc/mycompany
    • JDBC data source properties:

      • jdbcUrl: the JDBC URL for the connection,
      • driverClass: a fully qualified class name of the used driver,
      • user: the connection user name,
      • password: the connection password.

        Example 14.2. JBDC Data Source Descriptor

        type = JDBC
        name = myCompanyDataSource
        testQuery = SELECT count(*) FROM CUSTOMER
        jdbcUrl = jdbc:postgresql://mydomain.com:5432/mycompany
        driverClass = org.postgresorg.postgresql.Driver
        user = system
        password = dba
  2. Make sure that the data source definition file has the extension .datasource.
  3. Move the file into the /jboss-eap-6.4/standalone/deployments/dashbuilder.war/WEB-INF/deployments directory.

    If the data source already exists (there is a file that contains a data source with the same logic identifier), the file will be overwritten. Note that these two files do not have to have the same name in order to be replaced.

The data sources are imported once during the application deployment.