Create a part, classify it and delete classification

Note:

Classification has to exist in Teamcenter. Demonstratet classification “Cuboid” is not ootb Teamcenter.

This example pipeline demonstrates how to create a part, classify it, and then delete the classification.


Pipeline consisting of seven snaps to demonstrate usage of classification create and delete snaps.

Note:

Classification has to exist in Teamcenter.

Steps

1: Create a JSON document which contains type and attribute of the part. The JSON Generator is a placeholder for external system which could send a JSON message to Snaplogic. On validation, the Snap displays the json in output.

[
  {
    "object_type": "Part",
    "attributes": {
      "object_desc": "Test Create with Snap",
      "object_name": "Classification_delete_Test",
      "fnd0CurrentLocationCode": "55"
    },
    "expandAttributes": [
      "object_type",
      "object_name",
      "object_desc",
      "item_id",
      "item_revision_id",
      "uom_tag",
      "creation_date",
      "fnd0IcsClassNames",
      "is_modifiable",
      "ics_classified",
      "owning_user",
      "fnd0CurrentLocationCode",
      "checked_out"
    ]
  }
]

2: Configure the Tc Create and Update Snap to pass the data. On validation, the Snap displays the part revision created for the input.


Settings of Tc Create and Update Snap using properties from JSON input document to fill fields e.g. 'Object Type' and 'Object attributes Path'.


JSON output document of Tc Create and Update Snap including metadata of created object.

3: Configure the Tc Classification Create Snap to create classification information and add it to the part revision. On validation, the Snap displays the newly created classificiation information.


tcClasCreateNewSnap_example2Pipeline.jpg


JSON output document of Tc Classification Create Snap with metadata of newly created classification object.

4: Configure the Tc Classification Get Snap to read classification of the part revision. On validation, the Snap displays the classification information.


Settings of Tc Classification Get Snap using property 'UID' of original object from JSON input document to fill field 'Object ID'.


JSON output document of Tc Classification Get Snap including result list with one classification object.

5: Configure a router to route message to Tc Classification Delete Snap in case classification exists.


Router Snap with logic to ga to first branch in case result list object is empty and to second branch otherwise.

6: Configure the Tc Classification Delete Snap to delete classification information. On validation, the Snap displays result message including “deletedUid”.


Settings of Tc Classification delete Snap using property 'UID' of first object of result list from JSON input document to fill field 'Object ID'.


JSON output document of Tc Classification delete Snap including property 'deletedUID' in case of success.

7: Configure again a Tc Classification Get Snap to read classification of the part revision. On validation, the Snap displays the remaining classification information in a result list.


Settings of Tc Classification Get Snap using property 'UID' of original object from JSON input document to fill field 'Object ID'.


JSON output document of Tc Classification Get Snap including empty result list.