From 100e699f01af4a201dced55a64fcdad8d6ccc2f4 Mon Sep 17 00:00:00 2001 From: katarzyna_koltun Date: Fri, 10 Jul 2026 11:08:11 +0200 Subject: [PATCH 1/2] Workstation Connector updates --- .../en/docs/workstation/connector/_index.md | 34 +++++++++++++++++++ .../{ => connector}/wks-connector.md | 34 ++++--------------- 2 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 content/en/docs/workstation/connector/_index.md rename content/en/docs/workstation/{ => connector}/wks-connector.md (84%) diff --git a/content/en/docs/workstation/connector/_index.md b/content/en/docs/workstation/connector/_index.md new file mode 100644 index 00000000000..b2567106357 --- /dev/null +++ b/content/en/docs/workstation/connector/_index.md @@ -0,0 +1,34 @@ +--- +title: "Mendix Workstation Connector" +linktitle: "Workstation Connector" +url: /mendix-workstation/connector/ +description: Provides an overview of the Mendix Workstation Connector." +weight: 13 +no_list: false +description_list: true +--- + +## Introduction + +The Workstation Connector is a Mendix module that allows developers to connect their apps to local devices using nanoflows. It establishes a connection with the Workstation Client, which acts as the intermediary between the Mendix app and the local devices. Once this connection is established, the module facilitates seamless data exchange by routing messages and events back and forth between the app and the devices. + +The connector handles the following tasks: + +* Retrieving local station configuration (name and device list) +* Connecting and disconnecting devices +* Exchanging messages with devices +* Subscribing for triggering app logic on event when receiving messages from a device + +## Basic Concepts + +For more information about the terms used in this document, such as *station* or *device*, refer to the [Mendix Workstation glossary](/mendix-workstation/glossary/). + +## Users + +Workstation Client is used by central IT, support teams, operators, and supervisors. + +## Accessing the Workstation Connector + +The Workstation Connector is available for download from the Mendix Marketplace. For more information, see [Installing and Configuring the Workstation Connector](#install-connector). + +## Read More diff --git a/content/en/docs/workstation/wks-connector.md b/content/en/docs/workstation/connector/wks-connector.md similarity index 84% rename from content/en/docs/workstation/wks-connector.md rename to content/en/docs/workstation/connector/wks-connector.md index ae9d0ae644f..31ea33fe6cf 100644 --- a/content/en/docs/workstation/wks-connector.md +++ b/content/en/docs/workstation/connector/wks-connector.md @@ -1,43 +1,21 @@ --- -title: "Mendix Workstation Connector" -linktitle: "Workstation Connector" -url: /mendix-workstation/connector/ +title: "Installing the Workstation Connector" +url: /mendix-workstation/install-connector/ description: "Describes how to install the Workstation Connector and build an app to work with Mendix Workstation." aliases: - /mendix-workstation/build-app/ -weight: 13 +weight: 20 --- ## Introduction After you have [installed the Workstation Client](/mendix-workstation/install-client/), you must either build a Mendix application that will send data or commands to your devices, or extend an existing app accordingly. In order to do that, you must download, install, and configure the [Mendix Workstation Connector](https://marketplace.mendix.com/link/component/247460) from the Mendix Marketplace. -The Workstation Connector is a Mendix module that allows developers to connect their apps to local devices using nanoflows. It establishes a connection with the Workstation Client, which acts as the intermediary between the Mendix app and the local devices. Once this connection is established, the module facilitates seamless data exchange by routing messages and events back and forth between the app and the devices. +### How the Connection Works -The connector handles the following tasks: +The Workstation Connector must authenticate itself to the Workstation Client so that the Client trusts the app using the Connector and establishes a connection. To achieve this, you must generate a key pair in the Workstation Connector, and then configure the public key in the corresponding app in the Workstation Management. Workstation Client configuration must be up-to-date, so that the public key can be verified. -* Retrieving local station configuration (name and device list) -* Connecting and disconnecting devices -* Exchanging messages with devices -* Subscribing for triggering app logic on event when receiving messages from a device - -## Basic Concepts - -For more information about the terms used in this document, such as *station* or *device*, refer to the [Mendix Workstation glossary](/mendix-workstation/glossary/). - -## Users - -Workstation Client is used by central IT, support teams, operators, and supervisors. - -## Accessing the Workstation Connector - -The Workstation Connector is available for download from the Mendix Marketplace. For more information, see [Installing and Configuring the Workstation Connector](#install-connector). - -## How the Connection Works - -The Workstation Connector must authenticate itself to the Workstation Client so that the Client trusts the app using the Connector and establishes a connection. To achieve this, a key pair has to be generated by the Workstation Connector. The public key must be configured in the corresponding app in the Workstation Management. Workstation Client configuration must be up-to-date so that the public key can be verified. - -The Workstation Connector establishes connection with the Device through the Workstation Client when it is needed. The connection is closed when it is not required anymore. +The Workstation Connector establishes connection with the device through the Workstation Client when it is needed. The connection is closed when it is not required anymore. When a client browser or tab instance tries to connect to a device, previously connected browser or tab instances are disconnected from the device. From 8444972c130485bbab61dd74cb3c96ac455fcf1d Mon Sep 17 00:00:00 2001 From: katarzyna_koltun Date: Fri, 10 Jul 2026 16:25:20 +0200 Subject: [PATCH 2/2] updates --- .../connector/wks-connector-develop-app.md | 124 ++++++++++++++++++ ...-connector.md => wks-connector-install.md} | 119 +---------------- 2 files changed, 125 insertions(+), 118 deletions(-) create mode 100644 content/en/docs/workstation/connector/wks-connector-develop-app.md rename content/en/docs/workstation/connector/{wks-connector.md => wks-connector-install.md} (54%) diff --git a/content/en/docs/workstation/connector/wks-connector-develop-app.md b/content/en/docs/workstation/connector/wks-connector-develop-app.md new file mode 100644 index 00000000000..df21ba5915c --- /dev/null +++ b/content/en/docs/workstation/connector/wks-connector-develop-app.md @@ -0,0 +1,124 @@ +--- +title: "Developing Workstation-Enabled Applications" +url: /mendix-workstation/build-app/ +description: "Describes the key concepts and best practices to consider when building an app to work with Mendix Workstation." +weight: 25 +--- + +## Introduction + + +## Getting Started with Custom Logic for Device Interaction + +Now that you are ready to start using Mendix Workstation, you can implement your own custom logic for interacting with devices. The following nanoflows and actions serve as the core building blocks for integrating devices into your Mendix applications and tailoring the functionality to your specific requirements. + +### Understanding the Domain Model + +The domain model contains the following entities: + +* **Station** - A non-persistent entity representing the Workstation Client configuration. +* **Device** - A non-persistent entity representing a connectable peripheral device. Includes the name, class and state (Available, Connected, or Error). Specialize this to maintain your device specific state. +* **AppKeyPair** - A persistent entity to store the app's key pair. The public key needs to be entered in the corresponding app in the Workstation Management. + +### Using the Nanoflows and Actions {#javascript-actions} + +The following section provides more information about using the nanoflows and Java actions in your Mendix application. + +#### SendDeviceMessage + +Call `SendDeviceMessage` to send a message to a device. For more information about the supported message syntax, see [Configuring Devices](/mendix-workstation/management-devices/). This action has the following parameters: + +* `device` +* `message` + +#### WaitForDeviceMessage + +Call `WaitForDeviceMessage` to wait for a message from the connected device for the duration of the specified timeout period. This action has the following parameters: + +* `device` +* `timeout` + +#### WaitForObjectChange + +Call `WaitForObjectChange` to wait for changes in the attributes of the specified object for the duration of the specified timeout period. This action has the following parameters: + +* `objectToObserve` +* `attributes` +* `timeout` + +#### GetCreateDevice + +Call this nanoflow to create and configure a device, and define the actions that should happen on connection, disconnection, or messages from the device. This action has the following parameters: + +* `name` +* `class` +* `initialize` +* `createDevice` +* `entity` +* `onConnect` +* `onMessage` +* `onDisconnect` + +#### ConnectDevice + +Call this action to connect to a specific device. + +#### DisconnectDevice + +Call this action to disconnect from a specific device. + +#### Initialize + +This action sets up communication with the Workstation Client. It should be automatically called through the `initialize` parameter of `GetStation` or `GetCreateDevice`. + +#### GetStation + +Call `GetStation` to retrieve the current Workstation Client configuration and devices. This action creates and returns a station object with a linked device object per peripheral. + +To interact with a specific device, it is better to use `GetCreateDevice` instead. `GetCreateDevice` has a more convenient API, allows specialization, and does not create station and device objects which may not be needed. + +#### SubscribeToObjectChanges + +Call `SubscribeToObjectChanges` to trigger a nanoflow when the specified object changes. This action has the following parameters: + +* `objectToObserve` +* `attributes` +* `callback` +* `applicationContext` + +#### SubscribeToDeviceMessages + +Call `SubscribeToDeviceMessages` to trigger a nanoflow when a message is received from a device. This action has the following parameters: + +* `device` +* `callback` +* `applicationContext` + +#### SubscribeToDeviceErrors + +Call `SubscribeToDeviceErrors` to trigger a nanoflow on device connection error. This action has the following parameters: + +* `device` +* `callback` +* `applicationContext` + +#### Unsubscribe + +Call `Unsubscribe` to end a subscription. + +#### Private Nanoflows + +`CreateStation`, `CommitStation`, `CreateDevice`, and `CommitDevice` are private nanoflows, required be compatible with [strict mode](/refguide/strict-mode/). + +### Widgets {#widgets} + +The following widgets allow you to specify when to execute an action: + +* **On Load/Unload** - Execute the action when the widget is first rendered, or when it is removed (unloaded). +* **On Change** - Execute the action when the specified attribute changes. +* **On Equal** - Execute the action when an attribute is equal to the specified expression. +* **On True** - Execute the action when the specified expression is true. + +## Error Logs + +Logs for the Workstation Management, Client, and Connector are available in case of issues. For more information about accessing the logs, see [Troubleshooting Mendix Workstation](/mendix-workstation/troubleshooting/). diff --git a/content/en/docs/workstation/connector/wks-connector.md b/content/en/docs/workstation/connector/wks-connector-install.md similarity index 54% rename from content/en/docs/workstation/connector/wks-connector.md rename to content/en/docs/workstation/connector/wks-connector-install.md index 31ea33fe6cf..7339c5c5c68 100644 --- a/content/en/docs/workstation/connector/wks-connector.md +++ b/content/en/docs/workstation/connector/wks-connector-install.md @@ -2,8 +2,6 @@ title: "Installing the Workstation Connector" url: /mendix-workstation/install-connector/ description: "Describes how to install the Workstation Connector and build an app to work with Mendix Workstation." -aliases: - - /mendix-workstation/build-app/ weight: 20 --- @@ -62,119 +60,4 @@ You can invite other Workstation Management users to your workspace to share con To invite a user, click **Team** in the left navigation menu, then click **Invite Team Member**. Enter the user's email address and select a role. For more information about the available roles, see [Managing the Team](/mendix-workstation/management-team/). -To change a user's role or remove them from the workspace, click the three-dot icon in the right column of the user list. This action requires the Owner or Workspace Admin role. - -## Getting Started with Custom Logic for Device Interaction - -Now that you are ready to start using Mendix Workstation, you can implement your own custom logic for interacting with devices. The following nanoflows and actions serve as the core building blocks for integrating devices into your Mendix applications and tailoring the functionality to your specific requirements. - -### Understanding the Domain Model - -The domain model contains the following entities: - -* **Station** - A non-persistent entity representing the Workstation Client configuration. -* **Device** - A non-persistent entity representing a connectable peripheral device. Includes the name, class and state (Available, Connected, or Error). Specialize this to maintain your device specific state. -* **AppKeyPair** - A persistent entity to store the app's key pair. The public key needs to be entered in the corresponding app in the Workstation Management. - -### Using the Nanoflows and Actions {#javascript-actions} - -The following section provides more information about using the nanoflows and Java actions in your Mendix application. - -#### SendDeviceMessage - -Call `SendDeviceMessage` to send a message to a device. For more information about the supported message syntax, see [Configuring Devices](/mendix-workstation/management-devices/). This action has the following parameters: - -* `device` -* `message` - -#### WaitForDeviceMessage - -Call `WaitForDeviceMessage` to wait for a message from the connected device for the duration of the specified timeout period. This action has the following parameters: - -* `device` -* `timeout` - -#### WaitForObjectChange - -Call `WaitForObjectChange` to wait for changes in the attributes of the specified object for the duration of the specified timeout period. This action has the following parameters: - -* `objectToObserve` -* `attributes` -* `timeout` - -#### GetCreateDevice - -Call this nanoflow to create and configure a device, and define the actions that should happen on connection, disconnection, or messages from the device. This action has the following parameters: - -* `name` -* `class` -* `initialize` -* `createDevice` -* `entity` -* `onConnect` -* `onMessage` -* `onDisconnect` - -#### ConnectDevice - -Call this action to connect to a specific device. - -#### DisconnectDevice - -Call this action to disconnect from a specific device. - -#### Initialize - -This action sets up communication with the Workstation Client. It should be automatically called through the `initialize` parameter of `GetStation` or `GetCreateDevice`. - -#### GetStation - -Call `GetStation` to retrieve the current Workstation Client configuration and devices. This action creates and returns a station object with a linked device object per peripheral. - -To interact with a specific device, it is better to use `GetCreateDevice` instead. `GetCreateDevice` has a more convenient API, allows specialization, and does not create station and device objects which may not be needed. - -#### SubscribeToObjectChanges - -Call `SubscribeToObjectChanges` to trigger a nanoflow when the specified object changes. This action has the following parameters: - -* `objectToObserve` -* `attributes` -* `callback` -* `applicationContext` - -#### SubscribeToDeviceMessages - -Call `SubscribeToDeviceMessages` to trigger a nanoflow when a message is received from a device. This action has the following parameters: - -* `device` -* `callback` -* `applicationContext` - -#### SubscribeToDeviceErrors - -Call `SubscribeToDeviceErrors` to trigger a nanoflow on device connection error. This action has the following parameters: - -* `device` -* `callback` -* `applicationContext` - -#### Unsubscribe - -Call `Unsubscribe` to end a subscription. - -#### Private Nanoflows - -`CreateStation`, `CommitStation`, `CreateDevice`, and `CommitDevice` are private nanoflows, required be compatible with [strict mode](/refguide/strict-mode/). - -### Widgets {#widgets} - -The following widgets allow you to specify when to execute an action: - -* **On Load/Unload** - Execute the action when the widget is first rendered, or when it is removed (unloaded). -* **On Change** - Execute the action when the specified attribute changes. -* **On Equal** - Execute the action when an attribute is equal to the specified expression. -* **On True** - Execute the action when the specified expression is true. - -## Error Logs - -Logs for the Workstation Management, Client, and Connector are available in case of issues. For more information about accessing the logs, see [Troubleshooting Mendix Workstation](/mendix-workstation/troubleshooting/). +To change a user's role or remove them from the workspace, click the three-dot icon in the right column of the user list. This action requires the Owner or Workspace Admin role. \ No newline at end of file