Syntax for the Expand Businessobject Command

Depending on the form of the command that you use, you can list the objects that lead to an object, from it, meet selected criteria, or are of a specific type. Then you can place the list of objects into/onto a set, or output the information to a file.

The Expand Businessobject command also allows you to select properties of either connected business objects or the relationship which links them. To expand a business object use the following syntax:

expand businessobject BO_NAME [from [relationship PATTERN] [type PATTERN] to [relationship PATTERN] [type PATTERN]; 
fixedpoints ID{,ID}

withroots |
| activefilters [reversefilters] |
| filter PATTERN [reversefilters] |
| preventduplicates [expression EXPRESSION] |

[recurse [to | N |]] [| [ into|onto ] set NAME |]
| all |
| end |
| rel |

[SELECT_BO] [SELECT_REL]

[DUMP [RECORDSEP] [tcl][output FILENAME]
terse 
limit N
size N

Use of the clauses that specify criteria is like applying a filter in one of the relationship browsers. In addition to a list of connected business objects that meet the specified criteria, the Expand Businessobject command provides information about the connections. The level number of the expansion and the relationship type of the connection are provided along with the business object name, type, and revision.

Using a size of 0 is the same as not using the Size clause; the expand is streamed using the value of MX_QUERY_PAGE_SIZE, if set. For information on query page size, see Live Collaboration Server: Optional Variables.

The following example shows basic use of the Expand Businessobject command. It tells us that there is one drawing attached to a component (with the relationship of “Drawing to”), a comment (with the relationship of “Comment from”) and a markup (with the relationship of “Markup from”). The number “1” on each line indicates the expansion level.

expand businessobject Drawing 726592 A;
   1 Drawing to Component 726592 A
   1 Comment from Comment 012528 1
   1 Markup from Markup 002670 1

When using the Expand Businessobject command you must provide a business object specification as your starting point. Depending on the keyword (and values) that follow, you will expand in one direction only or in both. In addition, you can use the recurse argument to indicate that you also want to expand the business objects connected/related to the initially specified business object.

The expansion happens one level at a time, and any relationships/business objects that do not satisfy the Where clause are removed from the list and those expansion paths are abandoned. Consider the following example:

Assembly -> Part -> Doc

The command expand bus Assembly from recurse 2 where 'type == Doc' will return nothing, since the first level expansion finds Part, which is not of type Doc, so the second expansion is not performed at all.