Chapter 16. Dashbuilder runtimes

Dashbuilder Runtime is an add-on application for Red Hat Decision Manager that you can use to run dashboards in standalone installations without requiring to use Business Central for business metrics. Dashbuilder Runtime is available as a WAR file that you can run on Red Hat JBoss EAP. To use Dashbuilder Runtime, you first author dashboards in Business Central, export the assets from Business Central, and run them on a web application. For more information about exporting Dashbuilder data, see Exporting and importing Dashbuilder data in the Configuring Business Central settings and properties guide.

Users with access to Dashbuilder Runtime are able to import the assets and explore the dashboards without using Business Central. If no static dashboards are configured then Dashbuilder Runtime prompts the user to upload a dashboard. When the dashboard is uploaded the runtime will only use that dashboard until the runtime is restarted.

The navigation between pages is the same as the configuration in Business Central. This means that if "page 1" is in "group1" and "page 2" is in "group2", then the same group will be imported and will remain as the navigation in Dashbuilder Runtime. If a page is not in the navigation tree the page is added to the "dashboards" menu group. If there is no navigation exported then all pages are added to the "dashboards" menu group.

16.1. Installing Dashbuilder Runtime

Dashbuilder Runtime is a Java web application and it is distributed in the form of a WAR that can be deployed in a Wildfly 18 installation.

Prerequisites

  • Wildfly 18 is installed on the system.

Procedure

  1. Download the Dashbuilder Runtime WAR file dashbuilder-runtime.war.
  2. Move dashbuilder-runtime.war to {WILDFLY_HOME}/standalone/deployments.

    Note

    By default this uses the root web context / and the other security domain, making it protected by default.

  3. To create a user with the admin role using the add-user.sh utility, perform the following tasks:

    1. In the terminal, enter the following:

      /wildfly/bin/add-user.sh
    2. Select the type of user you want to add: Application User (application-users.properties).
    3. Enter the username: admin.
    4. Select Update the existing user password and roles.
    5. Enter a password.
    6. To confirm the password, enter yes.
    7. Re-enter the password.
    8. Enter the groups you want the user to belong to: admin.
    9. Enter no

      The admin user is created.

16.2. KIE Server datasets on Dashbuilder Runtime

KIE Servers use Business Central as a controller. This means KIE Server containers are created by using Business Central. If other services need to retrieve KIE Server information then they should use the KIE Server REST API. Dashbuilder Runtime uses the KIE Server REST API to run queries from the imported datasets.

When a KIE Server dataset is created in Business Central the server template information is provided and it is used by Runtime to look for the KIE Server information. For example:

org.dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.location={LOCATION}
org.dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.user={USER}
org.dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.password={PASSWORD}
org.dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.token={TOKEN}

It is also possible to setup KIE Server per dataset. For example:

org.dashbuilder.kieserver.dataset.{DATA_SET_NAME}.location={LOCATION}
org.dashbuilder.kieserver.dataset.{DATA_SET_NAME}.user={USER}
org.dashbuilder.kieserver.dataset.{DATA_SET_NAME}.password={PASSWORD}
org.dashbuilder.kieserver.dataset.{DATA_SET_NAME}.token={TOKEN}

Notice that token authentication is not used if credentials are provided. One may also want to run the dashboard against another KIE Server installation. Let’s say that datasets were created on a KIE Server in DEV environment, it means that the datasets queries were created on the DEV KIE Server. When the dashboards are exported go, let’s say, to PROD, with another KIE Server. In that KIE Server the queries you created in DEV won’t be available, so an error will be thrown. In such cases it is possible to port queries from a dataset to another KIE Server by using the replace query functionality. It can also be set by dataset or by server template. For example:

org.dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.replace_query=true

Alternatively:

org.dashbuilder.kieserver.dataset.{DATA_SET_NAME}.replace_query=true

It needs to be set only one time so Runtime creates the queries. Once the queries are created you can remove this system property.

16.3. Customizing Dashbuilder Runtime

You can customize Dashbuilder Runtime by using the system properties.

Dashboards Path

When a dashboard is uploaded it is stored in the filesystem. The path where it is stored is controlled by the system property org.dashbuilder.import.base.dir. The default is /tmp/dashbuilder.

The system property is the root path for any dashboard model. For example, if there are multiple files on this path, the file can be imported by accessing Dashbuilder Runtime and passing a query parameter import with the name of the file that should be loaded. For example, if you want to load the sales_dashboard, execute runtime_host?import=sales_dashboard and Dashbuilder Runtime will try to load the file /tmp/dashbuilder/sales_dashboard.zip.

Static Dashboard
If you want the runtime instance to load a specific dashboard, you can change the system property dashbuilder.runtime.import. Setting the property to a local file path will cause that specific dashboard to be loaded during Runtime startup.
Controlling upload size
Application servers control POST request size by default. You can control the allowable size of uploaded dashboards by using the system property dashbuilder.runtime.upload.size. The size should be in KB and by default the value is 96kb, meaning that if someone tries to upload a file larger than 96kb then an error will be displayed and the dashboard won’t be installed.
Loading external dashboards

A Dashboard that is located at an accessible URL can be accessed by Dashbuilder Runtime. You can access the URL by passing the URL with the import query parameter such as runtime_host?import=http://filesHost/sales_dashboard.zip.

Note

For security reasons this option is disabled by default. You can enable it by setting the system property dashbuilder.runtime.allowExternal as true.