Summary: this page explains how to use the standalone GUI based or CLI based tools to manually manage data for the Engineering Dashboard.

Introduction

You can either launch the GUI tools that provide you with an interface to launch the process, or you use the CLI application in a batch file to launch the processes:

 

Synchronize data for component investigation in ED

This action populates SQL tables needed to see the component browser information in the ED. If data is not synchronized, this module will display no data in the portal. The data is historized for each snapshot.

Synchronize data for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed Synchronize snapshot data" radio button.
  2. Input the parameters to connect to the Dashboard Service schema and choose the snapshot ID.
  3. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -synchronize -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 2

Synchronize data for all Applications in one Dashboard Service schema or if you don't know the snapshot ID

Set the snapshot ID = -1 to force the tool to synchronize data for the latest snapshot of all Applications that exist in the Dashboard Service schema.

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed Synchronize snapshot data" radio button.
  2. Input the parameters to connect to the Dashboard Service schema.
  3. Set the snapshot to "-1".
  4. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -synchronize -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1

Delete data for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed Delete snapshot data" radio button.
  2. Input the parameters to connect to the Dashboard Service schema and choose the snapshot ID.
  3. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -delete -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 3

Delete data for all Applications in one Dashboard Service schema

Set the snapshot ID = -1 to force the tool to truncate all tables involved.

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed Delete snapshot data" radio button.
  2. Input the parameters to connect to the Dashboard Service schema.
  3. Set the snapshot to "-1".
  4. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -delete -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1

Upload source code for viewing violations in source code viewer of ED 

The upload source code action not only transfers the source code of objects from the Analysis Service schema into the Dashboard Service schema, but it also uploads the positions and bookmarks found by the Quality Rules. Only the latest snapshot of the application is taken into account. Source code is not historized. The implication of this is if you delete the latest snapshot in the CAST Management Studio, you will lose the source code. As source code is not historized in the Analysis Service schema, even the consolidation of the previous snapshot cannot upload source code - as such you would normally have to generate a new snapshot to get the source.

If source code has not been uploaded, source code for violations will not be available in the Engineering Dashboard.

Upload source for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed upload sources in central schema" radio button.
  2. Input the parameters to connect to the Dashboard Service schema and choose the snapshot ID.
  3. Input the parameters to connect to the Analysis Service schema.
  4. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -uploadsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 3 -local_driver org.postgresql.Driver -local_url jdbc:postgresql://localhost:2280/postgres -local_schema my_local -local_user operator -local_password CastAIP 

Upload source code for all Applications in one Dashboard Service schema or if you don't know the snapshot ID

Set the snapshot ID = -1 to force the tool to upload source code for the latest snapshot of all applications that exist in your Dashboard Service schema.

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed upload sources in central schema" radio button.
  2. Input the parameters to connect to the Dashboard Service schema
  3. Set the snapshot to "-1".
  4. Input the parameters to connect to the Analysis Service schema.
  5. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -uploadsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1 -local_driver org.postgresql.Driver -local_url jdbc:postgresql://localhost:2280/postgres -local_schema my_local -local_user operator -local_password CastAIP 

Delete source code for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed delete sources in central schema" radio button
  2. Input the parameters to connect to the Dashboard Service schema and choose the snapshot ID.
  3. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -delsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 3

Delete source code for all Applications in one Dashboard Service schema

Set the snapshot ID = -1 to force the tool to truncate all source code from your Dashboard Service schema.

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed delete sources in central schema" radio button
  2. Input the parameters to connect to the Dashboard Service schema
  3. Set the snapshot to "-1".
  4. Click Run Application.

CLI : use AedConsolidation.exe

AedConsolidation.exe -delsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1

Transfer exclusions from legacy CED to ED

If you have excluded objects with violations from the next snapshot using the legacy CAST Engineering Dashboard (CED) and you want to transfer these excluded objects into the Engineering Dashboard, then you can do so as follows:

GUI : launch AedConsolidation-GUI.exe

  1. Activate the "Aed transfer local exception into central exclusions" radio button.
  2. Input the parameters to connect to the Dashboard Service schema
  3. Set the snapshot to "-1".
  4. Input the parameters to connect to the Analysis Service schema.
  5. Click Run Application.

To view all the excluded violations in the Engineering Dashboard, you must take a new snapshot after manually transferring all the exclusions (violations) from CED to ED.

CLI : use AedConsolidation.exe

AedConsolidation.exe -transferlocalexceptions -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema trsf2_central -user operator -password CastAIP -local_url jdbc:postgresql://localhost:2280/postgres -local_schema trsf2_local -local-user operator -local_password CastAIP

Troubleshooting

Out of memory from Java Virtual Machine (JVM)

If you have a large volume of source code in your Application you may encounter JVM issues when running the tool in GUI or CLI mode. In this situation you should create a launch4j.ini file to configure the heap size of the JVM. This file should be created in the same folder as the CAST tool you are using and should be named as the exe file: for example, if you are using AedConsolidation.exe, then the file should be named AedConsolidation.l4j.ini, for AedConsolidation-GUI.exe it should be named AedConsolidation-GUI.l4j.ini.

Its content should be similar to the example below, depending on the heap size needed (you may need to experiment with different values):

# Launch4j runtime config
# -Xms<size>        set initial Java heap size
# -Xmx<size>        set maximum Java heap size
-Xms512m
-Xmx1024m

SQL queries to verify the contents of SQL tables for component browser

To get the results for your snapshot:

select * from DSS_TREE_RANKING2 where snapshot_id = ?

To get the results grouped by snapshot_id:

select snapshot_id, count(*) from DSS_TREE_RANKING2 group by snapshot_id

If you have no results, verify that your Dashboard Service schema is not corrupted. If the following request have no results, you should reconsolidate your snapshot:

select SNAPSHOT_ID, count(*) from DSS_VIOLATION_STATUSES group by SNAPSHOT_ID order by SNAPSHOT_ID desc
select SNAPSHOT_ID, count(*) from DSS_SNAPSHOT_RANKING group by SNAPSHOT_ID order by SNAPSHOT_ID desc
select SNAPSHOT_ID, count(*) from DSS_TREE_INFO group by SNAPSHOT_ID order by SNAPSHOT_ID desc

SQL queries to verify the contents of sql tables for source code viewer

To find Applications and their latest snapshot in your Dashboard Service schema:

select o.object_name, d.application_id, d.snapshot_id
from dss_objects o
join adg_delta_snapshots d on d.application_id = o.object_id and d.latest = 1

To find source code in your Analysis Service schema corresponding to your Application's snapshot:

select distinct SOURCE_ID from local.DSS_SOURCE_POSITIONS where OBJECT_ID in (
select t.SITE_OBJECT_ID from central.DSS_TRANSLATION_TABLE t
join central.DSS_OBJECT_INFO o on t.OBJECT_ID = o.OBJECT_ID and o.SNAPSHOT_ID = ?)

To verify that the source code have been uploaded, run the following queries. The first twoshould return data. The others may not, depending on your Application.

select APPLICATION_ID, count(*) from DSS_SOURCE_TEXTS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_SOURCE_POSITIONS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_CODE_BOOKMARKS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_CODE_PATHS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_CODE_GROUPS group by APPLICATION_ID;

Activate debug mode

debug mode will log all sql queries in the specified log file, and write more information in the log.

Drivers for Dashboard Service schema hosted on Oracle Server

If your CAST AIP schemas are hosted on Oracle Server, select the Oracle driver in the list, and format the URL as follows:

jdbc:oracle:thin:@{server}:{port}:{instance}

Drivers for Dashboard Service schema hosted on Microsoft SQL Server

If your CAST AIP schemas are hosted on Microsoft SQL Server, select the jtds driver in the list, and format the URL as follows:

jdbc:jtds:sqlserver://{host};instance={instance}