Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ The Mendix-inside-Teamcenter Active Workspace component (`MendixEmbedded`) is a

### Adding the Component to Active Workspace{#adding-component}

1. Obtain the `MendixEmbedded` component from [GitHub](https://github.com/mendixlabs/mendix-inside-teamcenter).
2. Install the component into your Active Workspace stage repository under `src/repo`.
1. Obtain the `mx-in-tc` kit (containing the `MendixEmbedded` component) from [GitHub](https://github.com/mendixlabs/mendix-inside-teamcenter).
2. Install the kit 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).
4. Optionally, configure context passing. For more information, see [Passing Context from Teamcenter](#passing-context).
5. Rebuild Active Workspace using `awbuild.cmd`.

To verify the component was picked up correctly, check that its view model entry exists in the `src/repo/out/pathMap.json` registry file in the build output.
Expand Down Expand Up @@ -142,6 +142,20 @@ Add the **Mendix** JSON object (or the name you gave it) to the relevant layout

Detailed Active Workspace customization and build steps are outside the scope of this documentation. Refer to the Siemens [Active Workspace Customization](https://docs.sw.siemens.com/en-US/doc/282219420/PL20250520748650994.Configuration/yiv1688486682769) documentation for instructions (link requires authentication).

### Registering the Component on an XRT

To display the Mendix app on an XRT, add the following to the document using the XRT editor:

```xml
<htmlPanel
declarativeKey="MendixEmbedded"
context="https://your-mendix-runtime.example.com"
></htmlPanel>
```

* The `htmlPanel` component loads custom components in Active Workspace.
* Set `declarativeKey` to the name of the component obtained in the [Adding the Component to Active Workspace](#adding-component) section: `MendixEmbedded`.

## Configuring the Content Security Policy (CSP) in Teamcenter

Active Workspace enforces a Content Security Policy that must be updated to allow Mendix content to load.
Expand Down Expand Up @@ -209,9 +223,17 @@ Follow these steps to configure authentication.

## Passing Context from Teamcenter {#passing-context}

The `MendixEmbedded` Active Workspace component passes Teamcenter object context to the Mendix app as startup parameters. These are configured in the Active Workspace component and forwarded to the Mendix `render()` call as the `parameters` object.
The `MendixEmbedded` Active Workspace component passes Teamcenter object context to the Mendix app as startup parameters. Configure these parameters in the `context` and `declarativeKeyContext` fields of the XRT `htmlPanel` and PL Home card.

Pass context values as explicit URL query parameters. Use `target={context.path}` to map a value from the Teamcenter context, or `target=value` to pass a hardcoded primitive value. For example, the following URL passes the selected item's UID and a hardcoded mode:

```text
https://your-mendix-runtime.example.com/?itemUID={selected.uid}&mode=edit
```

Use dot notation to access nested context values. Objects and arrays are not supported as Mendix parameters, and an unavailable context path causes the parameter to receive `undefined`. In an XRT, write query parameter separators as `&amp;`; in a PL Home card, use `&` directly.

Please see `mx-in-tc-context` on [GitHub](https://github.com/mendixlabs/mendix-inside-teamcenter) for an example of how to pass the identifier of the selected object to the embedded Mendix application.
For more information about configuring context, see the `mx-in-tc` README on [GitHub](https://github.com/mendixlabs/mendix-inside-teamcenter/blob/main/mx-in-tc/README.md).

For the full `render()` API, see [Embedding the Client](/refguide/mendix-client/embedding-the-client/).

Expand Down