CAST Engineering Dashboard - Violations - Critical Violations - Inconsistent value - The sum of Critical violations at module level and at application level do not match

Purpose (problem description)

This page helps you to troubleshoot the problem where there is difference in number of critical violations at application level and at module level.

The dashboard views which display the critical violations at module level and at application level are -

For instance -

You can see that in the below screenshot the number of critical violations in the left hand side under STATISTICS is not the same as sum of critical violations by module.

Observed in CAST AIP
Observed on RDBMS

Step by Step scenario

  1. Launch Dashboard.
  2. Go to Assessment Application Level.
  3. Sum of critical violations per module is not equal to the value displayed in the left hand side.

Action Plan

  1. If the objects are shared between modules then this explain why the sum of violations at module level are more in number than at application level, please refer to the following page to check if it's your case SQL Queries - CAST Central Base - Queries on Objects - How to check if objects are shared among modules.
  2. If the objects are not shared then check if there exists a union content module linked to application . If the union content does not exist and is not linked to application then apply the solution provided and contact CAST Technical Support with Relevant inputs  for the issue to be permanently fixed.
  3. If the union content module is linked correctly please contact CAST Technical Support with Relevant inputs 

Relevant inputs

  1. CAST Support Tool (CST) - alias Sherlock by checking all the options except "Allow Export of source code"
  2. Complete screenshot of the dashboard with URL pointing to the difference in Critical violation.


Check if there exists a union content module linked to application

Run the below query to list all the modules -

select *
from dss_objects
where object_type_id = 20000
Example Result -
4;20000;"Ez Extensions";"";"Ez Extensions"
52;20000;"ABC IFPUG objects";"";"ABC IFPUG objects"

You can see that there is no module with name - __<applicationname> union content__

Check if the modules are linked to the application by running the below query -

select *
from dss_links
where link_type_id = 0


Example Result -

Interpretation -

Get the application ID by using the page SQL Queries - CAST Central Base - Queries on applications - How to get the ID of the application You can see that the module with ID 4 is linked to Application with ID 3 with link_type_id = 0. This is incorrect and we can conclude that there is no union content module and one of the functional module is considered as the Union content module.

To solve this issue apply the below workaround -

  1. delete the existing snapshot with mismatch in the critical violations
  2. Close CAST-MS
  3. Get the object_id of module in mngt -

    select dos.OBJECT_ID,
     from <central_DB>.DSS_OBJECTS dos
     join <mngt_DB>.CMS_Sync_Translation cst
     on cst.IdObjService = dos.OBJECT_ID
     and cst.AdapterClass = 'com.castsoftware.pmc.actions.centralservice.ModulePortfolioCentralAdapter'
     join <mngt_DB>.CMS_DynamicFields cdf
     on cdf.Field_GUID = 'entry'
     and cdf.Field_Value = cst.EntryObjPMC
     join <mngt_DB>.CMS_PORTF_Module cpm
     on cpm.Object_Id = cdf.Object_Id
     order by dos.OBJECT_ID;

    Result -

    4;"Ez Extensions";52282;"2017-04-23 17:21:52";52246;"__ABC union content__";"UnionContentModuleType"
    4;"Ez Extensions";52255;"2017-04-21 08:08:25.383";52181;"Ez Extensions";"UserDefinedModuleType"
    5;"Bundles";52256;"2017-04-21 08:08:25.383";52184;"Bundles";"UserDefinedModuleType"
    6;"Databases";52257;"2017-04-21 08:08:25.383";52197;"Databases";"UserDefinedModuleType"

    Interpretation -
    the same module in central base with ID #4 is synchronized with two modules in management database (IDs #52246 and #52181):
  4. On the MNGT base run the queries below:

    <object_id> refers to the object_id in the third column above in bold.
     from CMS_DynamicFields
     where Object_Id = <object_id>;
     from CMS_Sync_Translation
     where Object_Id = <object_id>;

5. On the central base run the queries below
delete from dss_links
where link_type_id = 0
6. Run a new snapshot by skipping the analysis.

This issue is fixed in 8.1.4 and 8.2.5

Here is an alternative method which has also worked to resolve this issue:

1. Delete all modules.
2. Drop the analysis results
3. Drop the latest (and only) snapshot
4. Re-create the user defined modules
5. Re-run full analysis and snapshot.


Related Pages