This page provides assistance with problems that might happen when packages are not being included in the user defined module content. This is when an explicit content query needs to be used.
The following documentation pages provide further information in this area:
User defined modules - CMS - User Defined Module editor
Explicit Content information - CMS - Information about Object Filters/Explicit Content in a User Defined Module
Release | Yes/No |
---|---|
8.3 |
RDBMS | Yes/No |
---|---|
CSS |
- Create User defined module using explicit content
- Packages are not included
Perform the below actions
- Use the following explicit content query to add packages in a specific path to your module in addition to other objects already defined for that module in the object filters ( you need to modify the below with your specific source code path):
INSERT INTO §CI_OBJECTS_SET ( SET_NAME , OBJECT_ID, ERROR_ID ) SELECT DISTINCT '$(ModuleName)', p.IdKey , 0 FROM §Keys p JOIN §KeyPar kp ON p.IdKey = kp.IdParent AND p.ObjTyp = 99 /*Java Package*/ JOIN §Keys k ON kp.IdKey = k.IdKey JOIN §ObjFilRef r ON k.IdKey = r.IdObj JOIN §RefPath rp ON r.IdFilRef = rp.IdFilRef WHERE rp.Path LIKE ('%YOUR PATH%')/
The following query run on the local database can be used to verify the specific paths for each package to verify the module content results:
SELECT p.IdKey AS "JAVA PACKAGE ID" , p.keyNam AS "JAVA PACKAGE NAME" , p.ObjTyp AS "TYPE" , 'package' AS "TYPE NAME" , FullName AS "PACKAGE FULL NAME" , k.IdKey AS "PARENT ID" , k.Keynam AS "PARENT NAME" , k.ObjTyp AS "PARENT TYPE ID" , TypDsc AS "PARENT TYPE NAME" , rp.Path AS "PATH OF THE PARENT OBJECT" FROM Keys p JOIN KeyPar kp ON p.IdKey = kp.IdParent AND p.ObjTyp = 99 /*Java Package*/ JOIN ObjFulNam of1 ON p.IdKey = of1.IdObj JOIN Keys k ON kp.IdKey = k.IdKey JOIN ObjFilRef r ON k.IdKey = r.IdObj JOIN RefPath rp ON r.IdFilRef = rp.IdFilRef JOIN Typ ON IdTyp = k.ObjTyp
- If you want to have a module with just packages, then you could do a delete followed by the insert in your explicit query:
DELETE FROM §CI_OBJECTS_SET WHERE SET_NAME = '$(ModuleName)' / INSERT INTO §CI_OBJECTS_SET ( SET_NAME , OBJECT_ID, ERROR_ID ) SELECT DISTINCT '$(ModuleName)', p.IdKey , 0 FROM §Keys p JOIN §KeyPar kp ON p.IdKey = kp.IdParent AND p.ObjTyp = 99 /*Java Package*/ JOIN §Keys k ON kp.IdKey = k.IdKey JOIN §ObjFilRef r ON k.IdKey = r.IdObj JOIN §RefPath rp ON r.IdFilRef = rp.IdFilRef WHERE rp.Path LIKE ('%YOUR PATH%')/
For a Generic query to add packages to .NET or Java analysis, please see below (this query needs either a substitution for object_fullname or another filter criteria):
DELETE FROM §CI_OBJECTS_SET WHERE SET_NAME = '$(ModuleName)' ; INSERT INTO §CI_OBJECTS_SET ( SET_NAME , OBJECT_ID, ERROR_ID ) WITH recursive ParentPackages AS ( SELECT DISTINCT co.PARENT_ID FROM §CSV_OBJECTS co WHERE co.PARENT_TYPE IN ('Java Package', '.NET Namespace') AND lower(co.OBJECT_FULLNAME) LIKE '%xxx%' -- adapt filter criteria here UNION SELECT DISTINCT co.PARENT_ID FROM ParentPackages pp JOIN §CSV_OBJECTS co ON co.OBJECT_ID = pp.PARENT_ID AND co.OBJECT_TYPE IN ('Java Package', '.NET Namespace') AND co.PARENT_TYPE IN ('Java Package', '.NET Namespace') ) SELECT '$(ModuleName)', PARENT_ID , 0 FROM ParentPackages ;
- If the above steps do not solve your issue contact CAST Technical Support with the following Relevant input in order to help Support to reproduce the issue.
Ticket # 19516, 30931