Controlling the Relationships Shown for an Item
While creating a record and associating it with other records, you can control which relationships apply at a specific step or level.
For example, for the main record, all relationships may be valid but for the associated child record, only some of the relationships may apply. You can also control the order in which relationships are listed.
Procedure
- For each relationship type you include for an item, define a constraint in the catalogvalidation.xml file. This file shows relationships for items in all repositories.
- To include a relationship type that is different from relationships in the rest of the repositories, add a constraint (specific to the repository) to the CatalogValidation.xml file. The file is located in the MQ_COMMON_DIR/ <enterprise IternalName>/catalog/master/<specific repository ID> directory.
-
To define this constraint:
- To show a relationship that is specific to RECORD_ACTION ='EDIT', define the constraint as "a general constraint that applies to RECORD_ACTION = 'ADD' or 'COPY.
Result
<constraint> <name>contains</name> <description> Default relationship if Record Action is "ADD" or or "COPY" </description> <condition> <or> <eq> <var>RECORD_ACTION</var> <const type="string">ADD</const> </eq> <eq> <var>RECORD_ACTION</var> <const type="string">COPY</const> </eq> </or> </condition> <action> <assign> <var>RELATIONSHIP_LIST</var> <const type="string">CONTAINS</const> <const type="string">CONTAINEDBY </const> </assign> </action> </constraint>
The following constraint is specific to the EDIT action:
<constraint> <name>containsforEdit</name> <description> Default relationship if Record Action is "EDIT" </description> <condition> <eq> <var>RECORD_ACTION</var> <const type="string">EDIT</const> </eq> </condition> <action> <assign> <var>RELATIONSHIP_LIST</var> <consttype="string">CONTAINS</const> </assign> </action> </constraint>
Copyright © Cloud Software Group, Inc. All rights reserved.