You can define a relationship filter by setting conditions for either side of the relationships defined in a scope you own. You might want a scope to be restricted to programs that have a cyclomatic complexity greater than 300 and that are defined in COBOL source files, for example. The example below shows you how to do that step by step.
Condition definitions are based on the Repository Exchange Protocol (RXP), an XML-based API that you can use to interact with application-level information in the workspace repository.
In the Scope Editor, relationships and entities for which a filter has been defined are color-coded magenta. A tool tip over the filtered entity displays the text of the condition.
<attr name="..." op="..." arg="..." negate="..."/>
<attr name="Cyclomatic Complexity" op=">" arg="300" negate="..."/>
In a condition definition, negate means “not the specified criterion.” Programs that do not have a cyclomatic complexity greater than 300, for example. Click the ellipsis (…) in negate="…" to set its value to true. Ignore the field otherwise.
<hasrelated negate="...">
<rel name="..." negate="..."/>
- <hasrelated negate="..."> - <reltype> <rel name="IsDefinedInCobol" negate="..."/> </reltype> </hasrelated>
- <cond> <and negate="..."> <attr name="Cyclomatic Complexity" op=">" arg="300" negate="..."/> - <hasrelated negate="..."> - <reltype> <rel name="IsDefinedInCobol" negate="..."/> </reltype> </hasrelated> </and> </cond>