Making Connections Between Business Objects

Relationship admin types can be used to link business objects.

A relationship type is specified when making a connection or an instance of that relationship type between two business objects. One business object is labeled as the TO end and one is labeled as the FROM end. When the objects are equivalent, it does not matter which object is assigned to which end. However, in hierarchical relationships, it does matter. Apps use the TO and FROM labels to determine the direction of the relationship.

The direction you select makes a difference when you examine or dissolve connections. When you examine an object's connections, you can specify whether or not you want to see objects that lead to or away from the chosen object. When you disconnect objects, you must know which object belongs where. You should always reference the relationship definition when working with connections.

For more information, see Relationships.

This page discusses:

DesignSync Connections

Connections are also used to make associations between files, folders, and modules in DesignSync and business objects in Collaboration and Approvals, if you use DesignSync stores for source control. These types of connections are generally made in apps using MQL commands in implementation. For more information, see About DesignSync File Access.

Preserving Modification Dates

By default when connections are created or deleted (with connect bus or disconnect bus commands), the modification dates of the objects on both ends of the connection are updated, during which time they are locked. You can use the preserve option on both the MQL connect and disconnect commands to avoid this update and the locking of the business objects.

Working with Saved Structures

After you save a structure using the structure clause of the Expand Businessobject command, you can list, print, delete, and save it to another user's workspace using the following commands:

list structure;

print structure NAME;

delete structure NAME;

copy structure SRC_NAME DST_NAME [fromuser USER_NAME] [touser
USER_NAME] [visible USER_NAME{,USER_NAME}] [overwrite];

The print structure command displays the results in the same manner as expand bus does. For example, after running the above command (which outputs the data to the MQL window, as well as saving it as a structure), you could execute the following to generate the output again:

print structure "Assigned Parts";

Within the print structure command, you can also use select clauses on either the business object or the relationship, as well as use the output/dump or terse clauses.

The copy structure command lets you copy structures to and from any kind of user. Including overwrite will replace the copied structure with any structure of the same name that was in the to user's workspace.

If an object has been disconnected or deleted, it is no longer listed as part of the structure. If other objects were connected since the structure was saved, they do not automatically appear in the output of the print structure command. Another expand command would need to be executed with the structure clause to update the structure.

For more information, see MQL Command Reference: Structure Clause for the Expand Businessobject command.