Report Definition Examples

Example 1: Report for Feature and Bugfix Packages

Main Type: Package

Custom Types: Feature, Bugfix

You might create a report as shown in the following Resulting Table after importing the following type definitions.

Report Definition

<?xml version="1.0" encoding="utf-8"?>
<Report mainType="Package"
        includeHistoricData="true"
        tableName="myPackageReportTableName"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="report.xsd">
  <Type customType="Feature" typeVersion="1.0">
    <Property name="health_status" columnName="Health"/>
    <Property name="system_release.system_name" columnName="Release_Name"/>
    <Property name="system_release.system_state" columnName="Release_State"/>
  </Type>
  <Type customType="Bugfix" typeVersion="2.0">
    <Property name="system_release.system_name" columnName="Release_Name"/>
    <Property name="system_name" columnName="Name"/>
  </Type>
</Report>

(line breaks for formatting purposes only)

Resulting Table

When creating the report via the create report CLI command, a new table is created in the reporting database as defined in the report definition XML.

For example, the sample report definition above would lead to the creation of a table myPackageReportTableName with the following columns:

  • ID

    Generated unique ID inside a reporting table

  • system_id

    Internal ID, unique inside, but may appear more than once if historical data is included in your table.

  • system_related_id

    When reporting a N:M relation, the ID of the related entity.

  • system_date_changed

    The date and time this entity was changed.

    When not including historical data, this column reflects the last time when this entity was changed.

  • system_deleted

    Whether the entity was deleted with this change.

    When not including historical data, this column will not be inserted.

  • system_custom_type

    The custom type of the entity.

  • system_custom_type_version

    The custom type version of the entity.

  • Health

    Custom property as defined in the report definition XML file.

  • Release_Name

    System property of the entity as defined in the report definition XML file.

  • Release_State

    System property of the entity as defined in the report definition XML file.

  • system_name

    System property of the entity as defined in the report definition XML file (no column name given explicitly).

The data in the table is changed whenever a property of an entity changes that is included in the report. If the reporting database is down, the changes are applied once the database is up again.

Example 2: Using the Parameter includeHistoricData

This example attempts to highlight the difference that the parameter includeHistoricData makes to the reporting table data.

Scenario

For this example, the following two steps are performed:

  1. Install the WebUI component (Automic\Release.Manager\WebUI) (application: CRM) to the CRM_TEST environment
  2. Rename the component to Admin WebUI
  3. Delete the installation record for the component WebUI from the CRM_TEST environment

Report Definition

In the report definition, set the parameter includeHistoricData either to False (case 1) or True (case 2).

<?xml version="1.0"?>
<Report tableName="InstallationHistory"
        includeHistoricData="False|True"
        mainType="InstalledPackageComponent">
   <Type>
      <Property columnName="Application_Name"
                name="system_application.system_name"/>
      <Property columnName="Component_Name"
                name="system_component.system_name"/>
      <Property columnName="Component_Type"
                name="system_component.system_custom_type"/>
      <Property columnName="Agent"
                name="system_deployment_target.system_deployment_agent_name"/>
      <Property columnName="Environment_Name"
                name="system_execution.system_deployment_profile.
                      system_environment.system_name"/>
      <Property columnName="Install_Date"
                name="system_execution.system_actual_to"/>
      <Property columnName="Install_User_Name"
                name="system_execution.system_owner.system_name"/>
      <Property columnName="Install_State" name="system_state"/>
   </Type>
</Report>

(line breaks for formatting purposes only)

Result: Structure of the Reporting Table InstallationHistory

After activation via CLI (Configuring Reporting Data, step 2), the structure of the created reporting table in the Microsoft SQL Server looks as follows:

Result: Data Changes in the Reporting Table InstallationHistory

Content after the component was successfully installed (step 1) when includeHistoricData = False (case 1)

Id system_id system_date_changed system_is_deleted Application_Name Component_Name Component_Type Agent Environment_Name Install_Date Install_User_Name Install_State
11040 11030 2015-05-02 08:37:54.433 0 CRM WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed

When the execution starts, CDA creates a record with state InProgress. When the installation is complete, CDA inserts a new record with state Installed and deletes the record with state InProgress.

Note: The Id changes with each update. The field system_id keeps its value.

Content after the component was successfully installed (step 1) when includeHistoricData = True (case 2)

Id system_id system_date_changed system_is_deleted Application_Name Component_Name Component_Type Agent Environment_Name Install_Date Install_User_Name Install_State
11031 11030 2015-05-02 08:37:15.303 0 CRM WebUI IIS IIS_SERVER CRM_TEST NULL 1000/DEV/DEV InProgress
11040 11030 2015-05-02 08:37:54.433 0 CRM WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed

When the execution starts, CDA creates a record with status InProgress. When the installation is complete, CDA adds another record with status Installed.

Note: The Id changes with each update. The field system_id keeps its value.

Content after the component was successfully renamed (step 2) when includeHistoricData = False (case 1)

Id system_id system_date_changed system_is_deleted Application_Name Component_Name Component_Type Agent Environment_Name Install_Date Install_User_Name Install_State
11046 11030 2015-05-02 08:47:15.303 0 CRM Admin WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed

Note: Id, system_date_changed and Component_Name fields are updated.

Content after the component was successfully renamed (step 2) when includeHistoricData = True (case 2)

Id system_id system_date_changed system_is_deleted Application_Name Component_Name Component_Type Agent Environment_Name Install_Date Install_User_Name Install_State
11031 11030 2015-05-02 08:37:15.303 0 CRM WebUI IIS IIS_SERVER CRM_TEST NULL 1000/DEV/DEV InProgress
11040 11030 2015-05-02 08:37:54.433 0 CRM WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed
11046 11030 2015-05-02 08:47:15.303 0 CRM Admin WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed

A new third row has been inserted. Compared to the preceding row (second row), the fields with differences are: Id, system_date_changed, and Component_Name.

Content after the component was successfully removed (step 3) when includeHistoricData = False (case 1)

Id system_id system_date_changed system_is_deleted Application_Name Component_Name Component_Type Agent Environment_Name Install_Date Install_User_Name Install_State
no record available

When you delete the component, the record is removed from the reporting table.

Content after the component was successfully removed (step 3) when includeHistoricData = True (case 2)

Id system_id system_date_changed system_is_deleted Applicaction_Name Component_Name Component_Type Agent Environment_Name Install_Date Install_User_Name Install_State
11031 11030 2015-05-02 08:37:15.303 0 CRM WebUI IIS IIS_SERVER CRM_TEST NULL 1000/DEV/DEV InProgress
11040 11030 2015-05-02 08:37:54.433 0 CRM WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed
11046 11030 2015-05-02 08:47:15.303 0 CRM Admin WebUI IIS IIS_SERVER CRM_TEST 2015-05-02 08:37:43.000 1000/DEV/DEV Installed
11052 11030 2015-05-02 08:53:59.247 1 NULL NULL NULL NULL NULL NULL NULL NULL

When you delete the component, another record is added to the reporting table with system_is_deleted = 1.

Note: The Id changes with each update. The field system_id keeps its value.