Just as the predefined internal checks provided by IBM® Rational® Rhapsody®, you can define if external checks are called from code generation or not. In addition, you can define on which metaclasses external checks will be executed.
You can implement user‑defined external checks through the Rational Rhapsody API and use the GUI already in place in Rational Rhapsody to run them. Whether it is an internal check or an external check, the checks are performed and their results displayed through the same GUI in the product.
Rational Rhapsody provides an API for registering, enumerating, and removing user-defined external checks through the use of the COM API for C++ and VB users, and the Java API for Java users. COM callbacks (connection points) allow you to open user-defined code when checks are executed. This capability is available for those users who use the COM API or Java API so that you can add, execute, or remove user-defined checks.
You decide which metaclasses (or new terms) you want to check, and your checks are called to check elements of whichever metaclasses you decided upon.
For example, for COM API users to create a user-defined check:
The following table lists the methods in the interface that you must implement for a user‑defined check.
You provide the code in a COM client.
IBM Rational Rhapsody uses the plug-in mechanism to load your code, typically with a HEP file or INI file. Typically, you added the HEP file next to the relevant project or file. For example, a user wanting to write a Java plug-in would write the plug-in using the Rational Rhapsody Java API and provide a HELP file like the one in the following example.
[Helpers]
numberOfElements=1
name1=ExternalChecks
JavaMainClass1=JavaPlugin.ExternalChecks
JavaClassPath1=$OMROOT\..\DoDAF
Sample check projects are provided for Java and VB in the ExternalChecksSample subfolder of your Rational Rhapsody installation path (for example, <product installation folder>\Samples\ExtensibilitySamples\ExternalChecksSample).