Document Mendix inside Teamcenter (public Beta, 11.12)#11384
Conversation
|
Jonathan Diehl seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
wanchoorohan
left a comment
There was a problem hiding this comment.
Provided few suggestions.
|
|
||
| ## Introduction | ||
|
|
||
| Mendix inside Teamcenter lets you embed a Mendix web app as a native component inside Siemens Teamcenter Active Workspace (AWC). The Mendix app runs directly in the AWC page as a micro-frontend using the [Embedded Client](/refguide/mendix-client/embedding-the-client/) feature. |
There was a problem hiding this comment.
AWC is not the correct acronym. We use it internally but its not correct. AW is the correct one but its not used externally. It should be Active Workspace.
|
|
||
| | | Mendix | Teamcenter | Teamcenter Connector | | ||
| | --- | --- | --- | --- | | ||
| | **Beta** | 11.12 | 2512 | 2512.1.0 or above | |
There was a problem hiding this comment.
Don't you need TcC 2606 for the login enhancements? - https://mendix.slack.com/archives/C0B6TMJ3SUC/p1781199462908459
There was a problem hiding this comment.
Yes indeed, the user should use TcC 2606 with the latest changes (which is compatible with 2512 if I understood correctly)
| 2. Install the component into your Active Workspace stage repository under `src/repo`. | ||
| 3. Configure the component with the URL of your Mendix runtime. | ||
| 4. Optionally, set up context passing. For more information, see [Passing Context from Teamcenter](#passing-context). | ||
| 5. Rebuild Active Workspace. |
There was a problem hiding this comment.
Can we provide the command to do this? Is it awbuild?
There was a problem hiding this comment.
Yes indeed, it is awbuild.cmd. I would assume the user to know this already though, not sure if we need to add it to the docs
| 4. Optionally, set up context passing. For more information, see [Passing Context from Teamcenter](#passing-context). | ||
| 5. Rebuild Active Workspace. | ||
|
|
||
| To verify the component was picked up correctly, check that its view model entry exists in the `pathMap.json` registry file in the build output. |
There was a problem hiding this comment.
Where does pathmap.json reside? Would the users know this?
There was a problem hiding this comment.
It is located at src/repo/out/pathMap.json, not sure if this is common knowledge. Not sure if this is needed
|
|
||
| ### Registering the Component on a Page | ||
|
|
||
| To display the Mendix app on an Active Workspace page, add a card definition for it to the relevant `layoutsViewModel.json` file in your AWC stage repository. Set `declarativeKeyContext` to the URL of your Mendix runtime: |
There was a problem hiding this comment.
Same question for layoutsViewModel.json
There was a problem hiding this comment.
This is located in the src/repo, but depends on which PL Home screen you want to add the card to. Would be nice if there is Teamcenter documentation we can link to, but I cannot find that.
|
|
||
| The following example shows how the AWC component passes a selected Teamcenter item UID to the Mendix app: | ||
|
|
||
| ```js |
There was a problem hiding this comment.
This example corresponds more to the actual component:
(including PascalCase for parameter key)
const app = await import(/* webpackIgnore: true */ `${mendixUrl}'dist/embedded-index.js'`);
cleanup = await app.render(container, {
remoteUrl: mendixUrl,
minHeight: '100vh',
parameters: {
SelectedItem: selectedItem
}
});
|
|
||
| 1. **Add an SSO Login Button to the Login Page**: | ||
|
|
||
| Add a Teamcenter SSO login button to the Mendix app's `login.html` so users can initiate the TcSS authentication flow. For instructions, see [Adding an SSO Login Button to Your Login Page](/appstore/modules/siemens-plm/configuring-connection-2512/#add-sso-login-button). Optionally, use JavaScript to trigger the authentication automatically. Note that browsers may block the popup unless it is triggered directly by a user action. |
There was a problem hiding this comment.
See above, this should be removed
|
|
||
| 1. **Configure User Provisioning**: | ||
|
|
||
| Set up user provisioning so that Mendix accounts are matched to Teamcenter users on login. For instructions, see [User Provisioning for SSO](/appstore/modules/siemens-plm/configuring-connection-2512/#user-provisioning-for-sso). |
There was a problem hiding this comment.
User provisioning should be setup for SSO with User Provisioning for Logged-In Use. Anonymous users should ideally be disabled.
|
|
||
| ## Configuring Authentication {#authentication} | ||
|
|
||
| During Beta, authentication uses the Teamcenter Connector's Teamcenter SSO flow. The Mendix app login page shows an SSO button. When a user clicks it, they are redirected to Teamcenter Security Services (TcSS) for authentication. After a successful login, TcSS redirects back to the Mendix app, where the user is provisioned or matched to an existing Mendix account and a Teamcenter Connector session is established. |
There was a problem hiding this comment.
This part is incorrect. There is no need to add an SSO button, after setting up the Teamcenter connector, the authentication is done with the popup logic in the AW component, which uses the Tc Connector published REST endpoint, no need to change login.html.
| 1. **Add an SSO Login Button to the Login Page**: | ||
|
|
||
| Add a Teamcenter SSO login button to the Mendix app's `login.html` so users can initiate the TcSS authentication flow. For instructions, see [Adding an SSO Login Button to Your Login Page](/appstore/modules/siemens-plm/configuring-connection-2512/#add-sso-login-button). Optionally, use JavaScript to trigger the authentication automatically. Note that browsers may block the popup unless it is triggered directly by a user action. | ||
|
|
There was a problem hiding this comment.
Instead, for now the following needs to be configured (there are plans to improve this):
- Add a JavaScript action called JS_CloseWindow with the following:
*/
export async function JS_CloseWindow() {
// BEGIN USER CODE
window.close();
// END USER CODE
}
- Add a Nanoflow that calls this JavaScript action
- Add an empty page called 'AuthSuccess' to the application which contains an 'Component load' event that calls this Nanoflow
- Change the
DL_HandleSSOLoginMicroflowto showAuthSuccessinstead of the home page as the last action in the Microflow.
|
@jdiehl |
Description
New reference page under
/refguide/mendix-client/mendix-inside-teamcenter/documenting how to embed a Mendix web app as a native component inside Siemens Teamcenter Active Workspace using the embedded client.This builds on the embedded client documentation added by @WimJongeneel in #11204 and is tied to the 11.12 release.
Changes
refguide/runtime/mendix-client/mendix-inside-teamcenter.mdrefguide/runtime/mendix-client/_index.mdwith a cross-reference to the new pageCoverage
The new page covers:
MendixEmbeddedAWC component and registering it on a pagegateway/config.jsondirectives)