The CAST Management Studio has a feature (the Dynamic Link Manager) that enables you to review "dynamic links" between objects following an analysis (as part of a Snapshot or as a standalone analysis). Dynamic links are links that have been identified between objects (usually based on search strings - see Dependencies - Rules tab) and saved to the Analysis Service but their authenticity cannot be absolutely determined by CAST.

Using the Dynamic Link Manager you can consult the code that constitutes the link between the objects and you can then choose to either:

  • ignore these links (if they prove to be incorrect or false) and thus save them as irrelevant in the Analysis Service.
  • validate these links (if they prove to be correct) and thus save them as legitimate in the Analysis Service.

Notes

- You can also open the Dynamic Link Manager in CAST Enlighten.

- The Dynamic Link Manager displays the unverified links in "batches" of 5000 - use the drop down list box in the top right hand corner of the dialog box to move through the links:



- The Dynamic Link Manager will retrieve ALL "dynamic links" that exist in the current Application.

- You can close the Dynamic Links Manager in the middle of a review session and changes will persist.

  • Right click the Analysis Service in the Services view and select Review Dynamic Links (all links in the Analysis Service will be displayed)
  • Open the Analysis Service editor and select Review Dynamic Links (all links in the Analysis Service will be displayed)

The following GUI will then be displayed:

Upper Section

This section contains two drop down lists:

  • Use the left hand list to select the analysis result you want to work with. This list only contains job results that the Dynamic Link Manager has determined contain unverified links.
  • The right hand list will only be displayed if you have over 5000 dynamic links and it allows you to scroll through the links in batches of 5000

Middle Section

This section contains the list of unverified links for the job results you selected in the upper section. Column headings (Calling Name and Called Name etc.) will help you to identify the unverified links.

If you select a link, the code that forms this link (i.e. the calling object's code) will be displayed in the Lower Section.

Column Headers You can click each column header to sort the list of links - it is also possible to sort on two columns simultaneously: consecutively click the two columns you want to sort on.
Check boxes The check boxes to the immediate left of an unverified link enable you to permanently Ignore the link i.e. it is an erroneous link that you do not want to be displayed in CAST Enlighten or taken into account by Quality Rules.
Reset Filter/Filter Selection The Filter Selection button will list only those entries in the list that you have selected (marked in blue) - all other entries are hidden temporarily. This can help "declutter" the list if you need to specifically work on one particular entry. Note that you can incrementally hide entries:
  • select multiple entries you wish to display
  • click Filter Selection to display only the selected entries
  • repeat to hide further entries

To reset the list (i.e. to display all entries), use the Reset Filter button

Hide Reviewed Links By default this option is already activated when you launch the Dynamic Link Manager. If this is the first time you have used this dialog box, then clicking this button will make no difference, i.e. all unverified links will be displayed in the Upper Section.

When activated, this button will hide any links that you have already reviewed (a message will be displayed when you close the dialog box asking whether you want to mark all entries as "Reviewed"), i.e. from a previous analysis.

Hide Parametrized Links By default this option is already activated when you launch the Dynamic Link Manager. If this is the first time you have used this dialog box, then clicking this button will make no difference, i.e. all unverified links will be displayed in the Upper Section.

This button will only hide unverified links for which you have already created a parametrization rule (see Lower Section). When you create a parametrization rule, all links created from a source code line that refer to the same method will automatically be hidden to facilitate this process progression. Note that this does not take into account all cases - as such you may find that in some case a link will appears while an existing parametrization rule will automatically remove it.

Lower Section

This section has two main uses:

Profile for Parametrization drop down list This drop down list enables you to select a J2EE/VB Environment Profile that will be used to store the Parameterization rules you create. By default no Environment Profile will be available when you first launch this dialog box. As such, if you want to create Parametrization rules, you need to select an existing Environment Profile, or first create a new blank J2EE/VB Environment Profile (according to the language you need to parametrize), which involves closing the Dynamic Link Manager and then right clicking the relevant Analysis Service in the Services view and selecting Environment Profile > Manage (see the Using the Environment Profile Manager for more information).

When you have created your new blank Environment Profile, re-open the Dynamic Link Manager. You should now see the profile listed in the drop down list:

Select the profile - you are now ready to create Parametrization rules for the unverified links listed in the Middle Section.

Creating parametrization rules

To create a Parametrization rule for an unverified link that has been detected by the analyzer:

  • First select the link in the Upper Section.
  • Then select the Environment Profile you want to add the rules to in the drop down list box
  • In the displayed code, scroll through until you find the hyperlink:
  • Right click the hyper link and select either Set as No Link (i.e. ignore) or Set as Link (i.e. validate) depending on the what you want to do for this particular link type.
  • Regardless of what you want to do, the Parametrization Add Rule dialog box will be displayed and part of the rule information will be automatically entered. This dialog box is explained in more detail in Parametrization Environment Profiles (J2EE / VB).
  • You will then need to add an indexed parameter to specify which method parameter index uses the String from which the link has been created.
  • Repeat this process for all links in the Upper Section.
  • Now that you have parametrized all possible unverified links for your analysis, CAST recommends that you rerun the associated analysis (ensuring that the J2EE/VB Environment Profile containing your Parametrization rules is added to your Analysis Unit by adding in a Custom Environment Profile), this will force the analyzer to either create the link or discard the link as defined in your parametrization rules. The links you parametrized will no longer be displayed in the Dynamic Link Manager (i.e. they will either be verified as links and stored in the Analysis Service or they will be removed from the Analysis Service).
  • Finally you may have to verify links that cannot be handled via Parametrization.

Please remember that although the list of unverified links is updated when you create a new Parametrization rule (i.e. when the Hide Parametrized Links button is activated the link for which you created a Parametrization rule will no longer be visible); however, when you remove a Parametrization rule, the link will NOT be re-displayed automatically in the Dynamic Link Manager. You can either deactivate the Hide Parametrized Links button, or rerun the associated analysis to ensure that the link is once again displayed in the Dynamic Link Manager.

Source Code window The Source Code window displays the source code that creates an unverified link listed in the Upper Section (select the link to display the source code). Within the source code, Bookmarks and Links are highlighted as follows:
  • Bookmarks:
  • Links:

- You can use the Prev. Bookmark and Next Bookmark buttons to jump between bookmarks.

- You can use hyperlinks to see the source code of a method and decide which is the best method to parametrize (the method that appears when you select the link or a deeper called method).

- You can use the right-click Find option to search for the method which uses the String from which the link has been created: select the String, use right-click Copy, then select right-click Find and paste in the copied String.

Please see the following pages for more information about reviewing links, creating filters to Ignore/Validate links during an analysis etc:


CAST Website