Working with relationships in Relationship Manager

After you have started Relationship Manager and connected it to an InterChange Server Express, you can use Relationship Manager to work with relationship data as described in the following sections:

Steps for opening a relationship

Steps for retrieving relationship instances

Steps for creating relationship instances

Steps for deleting relationship instances

Deactivating and activating participants

Steps for copying participants

Steps for loading and unloading business object files

Steps for opening a relationship

Perform the following steps to open a relationship definition in Relationship Manager after it is already connected to the server:

  1. In Relationship Manager, click File > Open.
  2. In the Open Relationship dialog box, select the name of the relationship that you want to open.

    Figure 37 shows the Open Relationship dialog box.

    Figure 37. Opening Relationship dialog box


  3. Click OK.

    When you open a relationship, Relationship Manager displays the Retrieve Relationship Instances window, described in Steps for retrieving relationship instances.

Steps for retrieving relationship instances

Perform the following steps to retrieve relationship instances or to return a count of how many instances there are for a relationship:

  1. In Relationship Manager, click File > Retrieve.
    The Retrieve Relationship Instances dialog box opens (see Figure 38).

    Figure 38. Retrieving Relationship Instances dialog box


  2. You can perform the following operations with the Retrieve Relationship Instances window:

The Retrieve Relationship Instances window is also displayed when you specify a relationship to open when connecting to InterChange Server Express.

Depending on the number of participants in the relationship definition and the number of participant instances in each relationship instance, these retrieval queries may take some time.

Steps for retrieving all instances

Perform the following steps to retrieve the first 500 instances for a relationship:

  1. At the Retrieve Relationship Instances window click Retrieve All.
  2. Click Get Instances.

    Relationship Manager displays the first 500 instances for the relationship.

Steps for retrieving instances by relationship ID

Perform the following steps to retrieve a range of up to 500 instances by relationship ID:

  1. At the Retrieve Relationship Instances window click Retrieve by ID.
  2. Type the ID of the first instance in the range you want to retrieve in the From field.
  3. Type the ID of the last instance in the range you want to retrieve in the To field.
  4. Click Get Instances.

    Relationship Manager displays up to 500 instances in a range of the IDs specified.

Steps for retrieving relationship instances by participant data

Perform the following steps to retrieve a relationship instance based on values for key or non-key attributes of selected participants:

  1. At the Retrieve Relationship Instances window click Retrieve by Value.
  2. Select the participant whose value you want to search on from the Participants list.

    For identity relationships, participant names are followed by the business object definition with which the participant is associated.

    For lookup relationships, participant names are followed by the word "Data".

  3. Type one of the types of values listed in Table 12 in the Value column in the Attributes pane.


    Table 12. Supported values for retrieving relationship instances by participant data

    Value Description
    Participant data The data of the selected participant.

    For example, if the relationship is an identity relationship you would specify the ID of the participant instance that you know to find the relationship instance in which it exists.

    If the relationship is a lookup relationship you would specify the non-key data value of the participant instance.

    %

    Any string of characters. This option is case-sensitive; numbers are included in the character set.

    For example, if %A were specified for a participant that stores abbreviated forms of the names of the United States, the values CA, GA, IA, LA, MA, PA, VA, and WA would be returned.

    _

    Any single character.

    As an example, _00 would retrieve 100, 200, a00, b00, and so forth.

  4. Click Get Instances.

    Relationship Manager displays the first 500 relationship instances that match the specified value.

Steps for returning a count of relationship instances

Perform the following steps to return the number of relationship instances that satisfy a retrieval criteria:

  1. Select the options for the criteria as described in Steps for retrieving all instances, Steps for retrieving instances by relationship ID, or Steps for retrieving relationship instances by participant data
  2. Click Get Count (instead of Get Instances).

Steps for creating relationship instances

Perform the following steps to create a new instance for a relationship:

  1. Create the new relationship instance by doing one of the following:

    Relationship Manager displays the new relationship instance.

    Highlighted at the top of the hierarchal relationship tree, on the entry line with the relationship icon is the placeholder for the relationship instance ID, which displays three question marks (???). After you save the relationship instance or any of its participants, InterChange Server Express automatically generates the new relationship instance ID and Relationship Manager replaces the question marks with this instance ID.

  2. Expand the new relationship instance by clicking on the plus (+) sign next to the ??? placeholder icon.

    The relationship tree displays participant definitions, participant instances, and participant key and non-key attributes beneath the relationship instance in descending order.

  3. Do the following to create a new participant instance in the relationship instance:
    1. In the relationship tree, select the participant definition for which you want to create an instance.
    2. Do one of the following to add an instance for the participant:
      • Right-click a participant definition in the listing and click Add Participant.
      • Click Add Participant on the toolbar.
    3. Expand the new participant instance by clicking the plus (+) sign next to it.
    4. Select the new participant instance.
    5. Click the Value column for the participant instance, then type a value into the cell.
      Note:
      If the Value field for the attribute displays three question marks (???), the participant is managed by InterChange Server Express. You cannot enter values for these participants because InterChange Server Express automatically generates them when you save the relationship instance. The value is the same value as the relationship instance ID.
  4. Do any of the tasks listed in Table 13.

Table 13. Tasks for participant data

Task Action
Save the participant instance. To save the new participant instance, right-click the participant instance and click Save Participant. Relationship Manager saves in the appropriate relationship table the data for this participant. The Modified column for the participant instances displays the date the participant was saved, which is the create date, in this case.
Note:
After the participant data has been saved, it cannot be changed. To change its data, the participant must be deleted and another created.
Add more participant instances. Repeat repeat step 3 in the previous list.
Note:
If you are working with an identity relationship, you cannot create more than one participant instance for a participant definition.
Delete a participant. If necessary, you can delete a saved participant instance by right-clicking the participant instance and selecting Delete Participant. Relationship Manager removes the participant instance from the relationship table. If you do not want to remove the participant instance from the database, use the Deactivate Participant option (see "Deactivating and activating participants"). A deactivated participant retains its instance ID and its values.
Save the relationship instance. Save the relationship instance by performing one of the following tasks:
  • Click File > Save.
  • Right-click the relationship instance and select Save Relationship.
InterChange Server Express generates the relationship instance ID and Relationship Manager replaces the ??? placeholder with this new ID. Relationship Manager updates the modified date on all saved participant instances to this date.
Note:
At least one participant instance and all key attribute data must be created before the relationship instance can be saved.
Save all relationship instances. Click File > Save All. InterChange Server Express generates the relationship instance IDs for any relationship instances that do not have one. Relationship Manager replaces any ??? placeholders with the new IDs. Relationship Manager updates the modified date on all saved participant instances to this date.

Steps for deleting relationship instances

Perform the following steps to delete a relationship instance from the relationship tables:

  1. Select the relationship instance that you want to delete.
  2. Do one of the following in Relationship Manager:

The relationship instance and its data are deleted from the relationship tables for the current relationship.

Deactivating and activating participants

A participant instance can be deactivated, or made inactive. Deactivating a participant instance removes it from the relationship instance and prevents it from displaying in the Relationship Manager window, but its record remains in the relationship table so it can be re-activated in the future.

Steps for deactivating a participant

Perform the following step to deactivate a participant instance:

Steps for activating a participant

Perform the following steps to activate a participant instance:

  1. Select View > Show Deactivated Participants.

    The Deactivated Participants window appears as shown in Figure 39.

    Figure 39. Deactivated Participants window


  2. Select the relationship instance that contains the deactivated participant you want to activate from the list.
  3. Expand the relationship instance until the deactivated participant instances appear in the list.
  4. Right-click the participant instance that you want to reactivate and select Activate.
  5. Click Edit > Refresh.

    The activated participant instance appears in its relationship instance in the Relationship Manager window.

    Note:
    If a participant instance in an identity relationship is deactivated and another participant is added in its place (that is, assigned the same instance ID), the original participant is removed from the Deactivated Participants listing, but remains in the database.

Steps for copying participants

You can create a new participant instance by copying an existing participant instance.

Perform the following steps to copy a participant instance:

  1. In the relationship instance, right-click the participant definition and click Add Participant.
  2. Right-click the participant instance that you want to copy and click Copy Participant.
  3. Right-click the newly created participant instance and click Paste Participant.

Steps for loading and unloading business object files

You can load a business object file of the same type into a participant. Perform the following steps to load a business object data file into a participant:

  1. Right-click the participant instance where you want to load the business object file and click Load Participant with Business Object.

    The Load Participant with Business Object dialog box displays the business object associated with that participant instance, as shown in Figure 40.

    Figure 40. Load Participants with Business Objects dialog box


  2. Click Load.
  3. Navigate to and open the business object file that you want to load.
  4. Click OK.

Note:
Only the first instance of a relationship is loaded if more than one instance exists in the file.

Copyright IBM Corp. 2004