Tc Create And Update Item

This Snap create any Teamcenter element of type item or derived types, such as document, part, design or ME Process. The Snap is processing the data input and can automatically call Teamcenter update for those attributes, which are not able to be processed with the create input definition in Teamcenter.

Supported Accounts


Settings tab of snap to show example values.

Prerequisites

  • A valid Teamcenter account with the required permissions.

Snap views

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 the Object type, attributes, Parent ID, parent relationship that needs to be created / linked in Teamcenter.

Output

This Snap has exactly one document output view.

The output of the snap is the newly created object in Teamcenter.

Learn more about Error handling.

Examples

  1. Tc Create And Update Item: Simple create example
  2. Create Teamcenter elements based on data from Excel sheet

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 Create And Update Item

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 Type*

String/Expression/ Suggestion

Specify the type of the object to be created in Teamcenter.

In JSON document the content for path can look like this:

[
  {
    "object_type": "Part"
  }
]

Name of the JSON property has to be the technical name of a valid type in Teamcenter datamodel.

Default value: Item

Example: Item

Object Attributes Path

String/Expression

Specify the list of attributes and values for the object from JSON input of the Snap. In JSON document the content for path can look like this:

"attributes": {
		"object_desc": "Test Create with Snap",
		"object_name": "Doku_Test"
	}

Name of the JSON property has to be the technical name of a valid property in Teamcenter datamodel for the given Object Type.

Default value: N/A

Example: $.attributes

Compound Object

String/Suggestion

Specify the compound object of the object to create element in Teamcenter. A compound object is used when there is a need to group related attributes or sub-objects together to represent a coherent concept or entity. It allows for better organization, clarity, and reusability of data.

Default value: N/A

Object Attributes

Specify the table of attributes to set on the Object you want the Snap to create in Teamcenter. Each attribute must be specified as a new row. Click :add: to add a row.

In case Object Attributes Pathis configured to use attributes given in JSON input document these Object Attributes are used additionally. If an attribute is in the input document and the List given in Snap, the value of Snap attribute is taken.

Name*

String/Expression/ Suggestion

Specify the name of the attribute.

Default value: N/A

Example: object_desc

Value*

String/Expression

Specify the value of the attribute.

Default value: N/A

Example: a simple description

Include localized properties

Checkbox/Expression

Include localized properties to give values for multiple localizations of attributes.

Relate to Newstuff

Checkbox

Select this checkbox to establish a relationship between the new created object and the users Newstuff folder.

Default value: Unselected

Example: Unselected

Parent ID

String/Expression

Appears when Relate to Newstuffis deselected.

Specify the UID (unique identifier) or the Teamcenter adapter ID of the object to which the new element shall be related to.

Default value: N/A

Example: $.parent_uid

Use named reference

Checkbox

Appears when Relate to Newstuffis deselected.

Create a named reference to parent dataset.

Default value: Unselected

Example: Unselected

Parent Relation

String/Expression

Appears when Relate to Newstuffis deselected.

Specify the relation between the created object and the specified parent element.

Default value: N/A

Example: $.parent_rel

Return revision

Checkbox/Expression

Select this checkbox to return the created revision instead of item element.

Default value: Unselected

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: reference related fields for suggestion.

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.