Tc Relation Expand All

This Snap get all related or referenced objects from Teamcenter for multiple objects. The Snap will expand all types of relation and references. The purpose of this Snap is to investigate an object. In normal integration scenarios this Snap shall not be use because of potential performance issues.

Supported Accounts


Settings tab of snap to show example values.

Prerequisites

  • A valid Teamcenter account with the required permissions.

Snap views

The result will consist of two main documents for

  • outgoing
  • incoming

when checkboxes for incoming and outgoing inclusion are active.


JSON output document including object wtih child objects named 'incomming' and 'outgoing'.

[
  {
    "incoming": {
      "withoutResult": {
        "3DMarkup": {
          "display": "3D Markup",
          "results": [
          ]
        },
        "Arm0DerivedFrom": {
          "display": "Derived From",
          "results": [
          ]
        },
        "VISTopLevelRef": {
          "display": "VISTopLevelRef",
          "results": [
          ]
        }
      },
      "withResult": {
      }
    },
    "outgoing": {
      "withoutResult": {
        "3DMarkup": {
          "display": "3D Markup",
          "results": [
          ]
        },
        "VISTopLevelRef": {
          "display": "VISTopLevelRef",
          "results": [
          ]
        }
      },
      "withResult": {
        "IMAN_based_on": {
          "display": "Based On Relation",
          "results": [
            {
              "_id": "TC*Part Revision*null***ASLAwUmW7hAnmD",
              "checked_out": " ",
              "fms_tickets": [
              ],
              "fnd0IRDCUsed": "",
              "has_variant_module": null,
              "is_IRDC": false,
              "is_vi": false,
              "items_tag": "TC*Part*null***AONAwUWe7hAnmD",
              "items_tag_DISPLAY": "052191-Doc_Test",
              "last_mod_date": "2025-08-01T10:15:28Z",
              "object_desc": "test create and update",
              "object_string": "052191/C;1-Doc_Test",
              "object_type": "Part Revision",
              "object_type_DISPLAY": "Part Revision",
              "owning_group": "TC*Group*null***QBFAAAA47hAnmD",
              "owning_group_DISPLAY": "Engineering",
              "owning_site": null,
              "owning_site_DISPLAY": "",
              "owning_user": "TC*User*null***A6CAAAx07hAnmD",
              "owning_user_DISPLAY": "ecs1 (ecs1)",
              "process_stage_list": [
              ],
              "release_status_list": [
              ],
              "revision_number": 0,
              "UID": "ASLAwUmW7hAnmD",
              "view": [
              ],
              "_rel": {
                "_id": "TC*IMAN_based_on*null***QCAAwUmW7hAnmD",
                "UID": "QCAAwUmW7hAnmD"
              },
              "_rel_role": "secondary"
            }
          ]
        },
        "IMAN_master_form": {
          "display": "Item Masters",
          "results": [
            {
              "_id": "TC*Part Revision Master*null***A_LAwUmW7hAnmD",
              "checked_out": " ",
              "last_mod_date": "2025-08-01T10:15:28Z",
              "object_desc": null,
              "object_string": "052192/A",
              "object_type": "Part Revision Master",
              "object_type_DISPLAY": "Part Revision Master",
              "owning_group": "TC*Group*null***QBFAAAA47hAnmD",
              "owning_group_DISPLAY": "Engineering",
              "owning_site": null,
              "owning_site_DISPLAY": "",
              "owning_user": "TC*User*null***A6CAAAx07hAnmD",
              "owning_user_DISPLAY": "ecs1 (ecs1)",
              "process_stage_list": [
              ],
              "release_status_list": [
              ],
              "revision_number": 0,
              "UID": "A_LAwUmW7hAnmD",
              "_rel": {
                "_id": "TC*IMAN_master_form*null***A_PAwUmW7hAnmD",
                "UID": "A_PAwUmW7hAnmD"
              },
              "_rel_role": "secondary"
            }
          ]
        }
      }
    },
    "original": {
      "_id": "TC*Part Revision*null***A_HAwUmW7hAnmD",
      "object_string": "052192/A;1-Doc_Test",
      "UID": "A_HAwUmW7hAnmD"
    }
  }
]
Type Description Examples of upstream and downstream Snaps
Input

Optional.This Snap has at the most one document input view.

The required input of the snap is an array of objects identified by attribute UID or _id.

Output

This Snap has exactly one document output view.

The output of the snap is dependend on configuration incomming and/or outgoing lists of relations or rather related objects for the given ID.

Learn more about Error handling.

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description
Label

String
Specify a unique name for the Snap. Modify this to be more appropriate, especially if there are more than one of the same Snap in the pipeline.

Default value: Tc Relation Expand All

Configure policy

Checkbox

Select this checkbox to run the Snap with a specific named Teamcenter policy. A policy determines the set of object properties that Teamcenter returns.

Learn more: Configure policy.

Default status: Deselected

Configure session context

Checkbox

Select this checkbox to run the Snap with a group, role, or project other than the one configured in the account.

Learn more: Configure session context.

Default status: Deselected

Object ID*

String/Expression

Specify the ID of the object whose relations shall be expanded in Teamcenter.

Default value: _id

Example: $.UID

Include outgoing

Checkbox/Expression

Enable the check of all relation and references from element to others. It creates an outgoing document in JSON output with sub document for relation and references withoutResult and withResult.

Default value: unselected

Example: unselected

Include incoming

Checkbox/Expression

Enable the check of all relation and references from others to selected element. It creates an incoming document in JSON output with sub document for relation and references withoutResult and withResult.

Default value: unselected

Example: unselected

Include results

Checkbox/Expression

Include result element for relation and reference. Each JSON object in resultsrepresents an object in Teamcenter related to the defined object by input Object ID. The JSON object includes one element "_rel" that itself includes properties of the relation which connects both Teamcenter objects. Additionallye a "_rel_role" JSON object contains information about the direction side of the related object (usually secondary or primary).

Default value: selected.

Example: selected

Configure error handling

Checkbox

Select this checkbox to define how the Snap behaves when Teamcenter returns an error. Use these settings for analysis and debugging.

Learn more: Configure error handling.

Default status: Deselected

Simplified expand

Checkbox

Select this checkbox to make the Snap look for the name given in Expand Attributes Path in the input document (for example, $expand) or in the Pipeline parameters (for example, _expand), and use that content. Expand Attributes Path then changes to a String field with the default value $.expand. In Pipeline parameters, separate the attribute names with commas.

When deselected, configure Expand Attributes Path as a string or an expression.

Default status: Deselected

Expand Attributes Path

String/Expression

Specify the JSON path to the expand attributes in the input document. Expand attributes are the list of attributes that the Teamcenter response must contain. Each name must be the technical name of a valid property in the Teamcenter data model for the expected objects. For example:

"expandAttributes": [
  "item_id",
  "item_revision_id",
  "last_mod_date",
  "object_string",
  "items_tag.uom_tag"
]

Learn more: Configuring Expand Attributes.

Default value: N/A

Example: $.expandAttributes

Build reference/lov documents

Dropdown list/Expression

Select how the Snap represents references and lists of values (LOVs) that Teamcenter returns. The Snap can return them as nested JSON objects instead of flattened IDs and internal values with additional _DISPLAY attributes:

  • References become {"_id": …, "UID": …, "_display": …} or null, including inside reference arrays.
  • LOVs become {"_value": …, "_display": …} or null, including inside LOV arrays.

The available options are:

  • Yes. The referenced object or LOV is a separate JSON object in the result. For example:
    "owning_user": {
      "_id": "TC*User*null***AgKAUUYTZLWoZA",
      "object_string": "user111 (user111)",
      "UID": "AgKAUUYTZLWoZA"
    }
  • No. The referenced object or LOV is flattened into attributes on the current result object, and synthetic attributes such as those ending in _DISPLAY are added. For example:
    "owning_user": "TC*User*null***AgKAUUYTZLWoZA",
    "owning_user_DISPLAY": "user111 (user111)"
  • Use Default. The Snap uses the default configured for the Snap Pack, which is Yes or No depending on the adapter.tc.snaplogic.expandReferencesAndLovs setting in the teamcenter_snappack.properties file.

Default value: Use Default

Example: Yes

Configure output

Checkbox

Select this checkbox to specify the Teamcenter properties that the Snap includes in the output.

This Snap offers the output settings described in Variant: type field in configuration settings.

Default status: Deselected

Snap execution

Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.