|
| 1 | +--- |
| 2 | +title: "Creating an Integration" |
| 3 | +url: /appstore/modules/siemens-plm/teamcenter-extension/create-an-integration/ |
| 4 | +description: "Describes Teamcenter Extension from the Mendix Marketplace. Teamcenter Extension facilitates a low-code approach to integrating with Siemens Teamcenter." |
| 5 | +weight: 1 |
| 6 | +--- |
| 7 | + |
| 8 | +## Main Menu {#main-menu} |
| 9 | + |
| 10 | +To open Teamcenter Extension in Studio Pro, go to **Extensions** > **Teamcenter Extension** > **Teamcenter Extension**. If you use Studio Pro versions 10.7 or lower, Teamcenter Extension is available under **View** > **Teamcenter Extension**. |
| 11 | + |
| 12 | +{{% alert color="info" %}} |
| 13 | +For details on the version dependencies between Studio Pro and Teamcenter Extension, refer to the [Dependencies](/appstore/modules/siemens-plm/teamcenter-extension/#dependencies) section in *Teamcenter Extension*. |
| 14 | +{{% /alert %}} |
| 15 | + |
| 16 | +The landing page has with three tabs: **Menu**, **History**, and **Settings**. |
| 17 | + |
| 18 | +### Menu Tab {#menu-tab} |
| 19 | + |
| 20 | +The **Menu** tab displays use cases or actions you can create artifacts for using Teamcenter Extension. |
| 21 | + |
| 22 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/menu-tab.png" >}} |
| 23 | + |
| 24 | +### Settings Tab {#settings-tab} |
| 25 | + |
| 26 | +The **Settings** tab allows you to change the **Teamcenter configuration**. |
| 27 | + |
| 28 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/teamcenter-configuration.png" >}} |
| 29 | + |
| 30 | +The tab indicates whether you currently have an active Teamcenter session, or whether the session is inactive. |
| 31 | + |
| 32 | +There are two buttons: |
| 33 | + |
| 34 | +* **Edit** – Allows you to change the settings. |
| 35 | +* **Sign in** – Signs you in to Teamcenter if **Authentication** is set to *Credentials*. For details, refer to [Signin Configuration](#signin-configuration). |
| 36 | + |
| 37 | +#### Editing Settings {#editing-settings} |
| 38 | + |
| 39 | +Click **Edit** to change the settings. |
| 40 | + |
| 41 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/edit-configuration.png" >}} |
| 42 | + |
| 43 | +You can set up the following information. It will be saved when you click **Save**: |
| 44 | + |
| 45 | +##### Teamcenter Instance |
| 46 | + |
| 47 | +While building your app and using Teamcenter Extension you need to provide the details of the Teamcenter instance to connect to. To do this provide the following information under **Teamcenter instance**: |
| 48 | + |
| 49 | +* **TC URL** – The URL to which calls will be made to sign in and retrieve data. Teamcenter Extension supports both HTTP and HTTPS connections. |
| 50 | +* **Certificate Path** – The path to certificates that have .crt and .pfx file extensions. The path should be relative to the app directory. |
| 51 | + |
| 52 | +##### Signin Configuration {#signin-configuration} |
| 53 | + |
| 54 | +Set **Authentication** to one of the following methods: |
| 55 | + |
| 56 | +* **Credentials** – Select this if your Teamcenter instance supports logging in using provided credentials. You will be prompted for your Teamcenter credentials when you click the **Sign in** button on the **Settings** tab. This method prevents sharing of credentials among developers through versioning. |
| 57 | +* **Teamcenter SSO** – Allows you to use SSO if your Teamcenter instance is configured to use it. You can get these settings from your Teamcenter administrator. |
| 58 | + |
| 59 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/teamcenter-sso.png" >}} |
| 60 | + |
| 61 | +You need to fill in the following: |
| 62 | + |
| 63 | +* **SSO Login Server URL** – the endpoint where your authentication request is sent. It acts as the main entry point for users trying to log in using SSO. This URL is typically associated with the Identity Provider (IdP) and is responsible for handling login requests and directing users through the authentication process |
| 64 | +* **SSO Identity Server URL** – the URL of the Identity Server where the Teamcenter Extension application should be registered |
| 65 | +* **Teamcenter Application ID** – the existing Teamcenter Application ID obtained from the Teamcenter Security Services Identity Service configuration. |
| 66 | +* **Studio Pro Application ID** – the registered ID of the Teamcenter Extension at the Identity Server. |
| 67 | +* **Callback Port**: The port of the callback URL. For the registration, the callback URL should be set to http://localhost:[PortNumber]/, for example, http://localhost:12345/. |
| 68 | + |
| 69 | + {{% alert color="info" %}}Although these settings generally align with those required to log in using SSO with the Teamcenter Connector in your Mendix application, the last two settings depend on the application registration with your Identity Server. Mendix recommends having a separate registration for the Teamcenter Extension on your Identity Server, distinct from your Mendix application’s registration. If you do not do this, conflicts might arise if your Mendix application is running.{{% /alert %}} |
| 70 | + |
| 71 | +* **Teamcenter X SSO** – Allows you to use the SSO credentials of your Teamcenter X instance. |
| 72 | + |
| 73 | + {{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/teamcenter_sso.png" class="no-border" max-width=75% >}} |
| 74 | + |
| 75 | +Please work with your Siemens CApS representative to fill out the following: |
| 76 | + |
| 77 | +* **TcX Client ID** |
| 78 | +* **SAM Auth Base URL** |
| 79 | +* **SAM Auth Client ID** |
| 80 | +* **SAM Auth Client Secret** |
| 81 | +* **Token Exchange Client ID** |
| 82 | +* **Token Exchange Client Secret** |
| 83 | +* **Callback URL** |
| 84 | + |
| 85 | +## Import Mapping {#import-mapping} |
| 86 | + |
| 87 | +Clicking any one of the actions opens an empty [import mapping](/refguide/import-mappings/) page. Here you can define what data you want to retrieve from Teamcenter and how to handle this data in Mendix. Depending on the action, the import mapping page starts with one or multiple entities or objects to configure, one per business object that needs to be configured. |
| 88 | + |
| 89 | +During configuration, the import mapping page will build up a preview of the Mendix domain model involved in the integration. In addition, the import mapping page shows the corresponding business objects on the Teamcenter side. For this, Teamcenter Extension displays both the display names of the objects and their properties, references, relations, and the corresponding technical names, as they will end up in the Mendix domain model. |
| 90 | + |
| 91 | +In Teamcenter Extension, the import mapping consists of the following steps: |
| 92 | + |
| 93 | +1. Object mapping: As Teamcenter works with many layers of specializations of its business objects, in the import mapping page, you need to configure which object type you want to retrieve from Teamcenter and what Mendix objects need to be created, when retrieving these business objects. This is called object mapping. |
| 94 | +2. Selection of properties, references, and relations: Configure which properties, references, and relations you want to retrieve from Teamcenter and include in your Mendix model . |
| 95 | + |
| 96 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/domain-model.png" max-width=80% >}} |
| 97 | + |
| 98 | +### Object Mapping {#object-mapping} |
| 99 | + |
| 100 | +Clicking any one of the empty boxes in the import mapping page opens the object mapping dialog. On the left side of the dialog, a tree with all relevant business objects available from the configured Teamcenter instance is displayed. If you have created any custom business objects in Teamcenter BMIDE, those objects will be shown as well. The right side shows a tree of all relevant entities in your Mendix app. |
| 101 | + |
| 102 | +The relevant objects and entities are dependent on the actions you are configuring. For example, for the action to get `ItemRevisions` from Teamcenter, the Teamcenter tree has an `ItemRevision` as its root object. That means that, for this action, you can only select `ItemRevisions` or its specializations. Similarly, in this example, the Mendix tree has the `TcConnector.ItemRevision` entity as its root entity. |
| 103 | + |
| 104 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/select-objects.png" >}} |
| 105 | + |
| 106 | +When retrieving a tree of objects, relevance can also be based on the type of the relation or reference. When working with typed relations o references, the type of Teamcenter business object is dictated by the relation or reference. By limiting the list of Teamcenter objects and Mendix entities to those that are relevant, Teamcenter Extension guides you to select Teamcenter business objects that make sense in the context of the action you want to perform. |
| 107 | + |
| 108 | +To configure which type of Teamcenter business object you are interested in and what type of Mendix entities this should be mapped to, select a business object in the Teamcenter tree on the left side and an entity on the Mendix tree on the right side and click **OK**. |
| 109 | + |
| 110 | +It is also possible to create new entities for your integrations. This new entity needs to be a specialization of the root entity in the Mendix tree or one of its specializations. When you want to use a new entity, click your generalization of choice, click the **Create new specialization of selected entity** check box and provide an entity name. Once finishing the configuration for the actions, Teamcenter Extension will create a new entity with the given name and the selected entity as its generalization. You can also reuse or create the specialization of the generated entities in subsequent actions. |
| 111 | + |
| 112 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/new-entity.png" >}} |
| 113 | + |
| 114 | +Once you click **OK**, you will return to the import mapping tab with a sidebar open for you to configure which Teamcenter properties, references, and relations to include when retrieving data for this business object. |
| 115 | + |
| 116 | +### Teamcenter Properties, References, and Relations {#teamcenter-properties} |
| 117 | + |
| 118 | +In the import mapping sidebar, you can configure which Teamcenter properties, references, and relations to include when retrieving data from Teamcenter. The import mapping sidebar is launched automatically after the completion of object mapping. When you are on the import mapping page and the sidebar is closed, you can double-click a previously configured entity to open the sidebar for that entity. |
| 119 | + |
| 120 | +The sidebar shows all properties, references, and relations for the configured Teamcenter object. Depending on the use case, each one of them is accompanied with check boxes for reading ({{% icon name="view" %}}) and writing ({{% icon name="pencil" %}}) for you to configure what to include when retrieving data from or creating data in Teamcenter. |
| 121 | + |
| 122 | +{{% alert color="info" %}} The Teamcenter Extension currently does not display compound attributes from Teamcenter. A compound attribute is a property defined on one object but displayed on a different object.{{% /alert %}} |
| 123 | + |
| 124 | +You often see that check boxes are selected by default or grayed out. In general, the following rules apply: |
| 125 | + |
| 126 | +1. Properties that are already available on the Mendix entity or one of its generalizations are selected by default and cannot be unchecked. |
| 127 | +2. Properties, references, and relations for Marketplace entities are disabled by default, as it is not good practice to change Mendix marketplace content. |
| 128 | + |
| 129 | +As an example, if a check box for reading ({{% icon name="view" %}}) is selected and grayed out, it means that property already exists as an attribute on the selected object or one of its generalizations. Similarly, if a check box for writing ({{% icon name="pencil" %}}) is selected and grayed out, it means the property is required during creation or revision of the selected object. |
| 130 | + |
| 131 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/attributes-associations.png" max-width=60% >}} |
| 132 | + |
| 133 | +You can select and deselect the properties, references, and relations depending on the data you need from Teamcenter. When you select a reference or relation, a new placeholder entity will be added to the object mapping tree. You will need to perform the import mapping for these referenced or related objects in a subsequent step (business object mapping and selection of Teamcenter properties, references, and relations). |
| 134 | + |
| 135 | +## Generating Artifacts {#generating-artifacts} |
| 136 | + |
| 137 | +Once you have finished import mapping, click **Generate** to create microflows for the selected use case and its corresponding domain model. These artifacts can be used in your app logic. |
| 138 | + |
| 139 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/microflow.png" >}} |
| 140 | + |
| 141 | +## History {#history} |
| 142 | + |
| 143 | +The **History** tab displays the history of all actions (also referred as integrations) carried out in Teamcenter Extension. |
| 144 | + |
| 145 | +{{< figure src="/attachments/appstore/platform-supported-content/modules/teamcenter-extension/history-tab.png" >}} |
| 146 | + |
| 147 | +On the **History** tab, you can view details of each action, such as entities and microflows created, Teamcenter URL used to connect with, the preview of the import mapping, and much more. |
| 148 | + |
| 149 | + You can also edit, duplicate or delete an action using the buttons in the upper-right corner: |
| 150 | + |
| 151 | +* **Delete** – This deletes the selected action from the list. However, it does not delete the corresponding entities and microflows, since they may impact pages or other integrations. |
| 152 | +* **Duplicate** – This allows you to create a new action based on an existing one. When you click **Duplicate**, it clones the selected action and takes you to the import mapping page, where you can modify your mapping and subsequently create new domain model and microflows. This operation does not modify any of existing actions. |
| 153 | +* **Edit** – This allows you to modify an existing action and updating existing domain model and microflows. When you click **Edit**, it takes you to the import mapping page, where you can add or edit entities, attributes, and associations, subsequently updating the domain model and microflows. |
| 154 | + |
| 155 | +It is not recommended to make specific adjustments to artifacts generated by Teamcenter Extension outside of Teamcenter Extension. Doing so may result in breaking the integration. Instead, you should make adjustments inside Teamcenter Extension using the **Delete**, **Duplicate** or **Edit** operations, wherever possible. Examples of adjustments that are not advisable outside Teamcenter Extension are as follows: |
| 156 | + |
| 157 | +* Modifying the **CreateInput** and **CompoundCreateInput** entities generated from The **Create Item** action |
| 158 | +* Modifying any entity generated from the **Revise Item Revision** action |
| 159 | +* Deleting attributes or associations generated by Teamcenter Extension |
| 160 | +* Deleting or editing microflows generated by Teamcenter Extension |
| 161 | + |
| 162 | +However, you can make the following adjustments outside Teamcenter Extension: |
| 163 | + |
| 164 | +* Adding attributes or associations |
| 165 | +* Moving microflows |
| 166 | +* Renaming microflows |
| 167 | + |
| 168 | +If you select an item in the **Action** list, Teamcenter Extension performs a validation check to see if the Teamcenter objects, entities, and microflows still exist and are valid. The results are reported in the **Validation** section. |
0 commit comments