Enlighten - Information - How to identify cyclical calls when Escalated links are activated

Purpose

Situation

Case 1: Dot Net: Dashboard shows violations for the rule Avoid cyclical calls and inheritances between namespaces content. Need to understand the details of cyclic calls in Enlighten.

Case 2: J2EE: Dashboard shows violations for the rule Avoid cyclical calls and inheritances between packages content. Need to understand the details of cyclic calls in Enlighten

Expectation

Identify cyclical calls in Enlighten

Figure 1

Figure 2

Applicable in CAST Version

ReleaseYes/No
8.3.x
8.2.x
8.1.x
8.0.x
7.3.x
7.2.x
7.0.x

Observed on RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS2

Details

Steps

  1. Launch Enlighten and select corresponding LOCAL base

  2. Launch dashboard from CAST MS and navigate to Investigation View. Please click on the violating rule “Avoid cyclical calls and inheritances between namespaces content” (Hightlighted and marked as 1 in below image)

  3. In the “OBJECTS WITH VIOLATION” section,List of objects violating the rule will be displayed. We need to identify which of these objects are involved in cyclical calls.

  4. Click on the first object name (Highlighted and marked as 2 in below image)

  5. In the “OBJECT DETAILS” tab, Right Click on the displayed object name and open it in new tab (Highlighted and marked as 3 in below image)

(Note: In higher version, Right click on technical context)

  1. The object’s URL will display object # (Highlighted and marked as 4 in below image), which is OBJECTID. To identify the next object in cyclical call, we need to run few queries on central database. So launch respective query browser 
    1. We need to identify SNAPSHOT ID and METRIC ID, which is required to identify the next object in cyclical call
      1. To identify METRICID, run this query

select metric_id from dss_metric_types where metric_name = ‘Avoid cyclical calls and inheritances between namespaces content’


         **Note: For java Metric is :'**Avoid cyclical calls and inheritances between packages content**'**
      2. To identify **SNAPSHOTID**, run this query

         ```java
select snapshot_id from dss_metric_results where object_id = OBJECTID and metric_id = (METRICID+1).
     Choose the **SNAPSHOTID** from the displayed list
  1. After collecting OBJECTID, METRICID, SNAPSHOTID, run this query

    Select dos1.object_id as cur_namespace_id, dos1.object_full_name as cur_namespace_name, dos2.object_id as next_namespace_id, dos2.object_full_name as next_namespace_name from dss_metric_results dmr join dss_objects dos1 on dos1.object_id = dmr.object_id join  dss_objects dos2 on dos2.object_id = dmr.metric_object_id where dmr.metric_id = (METRICID+1)and dmr.object_id = (OBJECTID)and dmr.snapshot_id = (SNAPSHOTID).

  2. Above query will output cur_namespace_id,cur_namespace_name, next_namespace_id and next_namespace_name. Please note down the result values

  3. In Enlighten, from the Object Browser, select the project, right click and open “Find object in Browser”

  4. Search for the value of cur_namespace_name. It will be displayed inResult section. Add it to Enlighten View

  5. Search for the value of next_namespace_name. It will be displayed inResult section. Add it to Enlighten View. An escalated link will be formed between the two objects

  6. To search for the next object in cyclical call, we have next OBJECTID, which is the value of next_namespace_id. Use the value as OBJECTID in (b) query and repeat (c),(d),(e) and (f) until a cyclical link is formed (refer image in Expectation Section)

Figure 3

Alternate & Quick Solution

  1. Launch Dashboard

  2. Go to Investigation - Application Drilldown view

  3. Select the target application from LHS

  4. Select “BY VIOLATION” tab on RHS

  5. in the “BY VIOLATION” tab, Sort the list by “Rule Name”

  6. From the sorted list, navigate to the section having rule “Avoid cyclical calls and inheritances between namespaces content

For java, metric is : “Avoid cyclical calls and inheritances between packages content