Skip to content

Commit 1c4dfc8

Browse files
Merge pull request mendix#11001 from mendix/kk-wks-connector36
Wks connector updates
2 parents 52e21f3 + f87aebd commit 1c4dfc8

3 files changed

Lines changed: 146 additions & 34 deletions

File tree

content/en/docs/releasenotes/workstation/_index.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,71 @@ cascade:
1010

1111
These release notes cover changes made to the [Mendix Workstation](/mendix-workstation/).
1212

13+
## 3.6.0
14+
15+
### Release date: April 23, 2026
16+
17+
### Workstation Management
18+
19+
#### New Features
20+
21+
* We have enhanced the **Test Your Station** page with more granular functions to test, validate and troubleshoot communication with devices. This includes more connection states, a **Connect** and **Disconnect** button, and communication logs. You can also switch between devices to test multiple devices.
22+
* Single computer registration keys are now valid for one hour. The keys are displayed and visible to all authorized users.
23+
* The maximum time window for bulk registration keys is limited to three months.
24+
* We have improved the **Station management** user interface for a more intuitive use experience.
25+
26+
#### Fixes
27+
28+
* To support advanced use cases when preparing station configurations on multiple computers, we have fixed an issue which prevented stations from being edited when multiple stations shared the same computer name. Computer names for stations within the same workspace are no longer required to be unique.
29+
30+
{{% alert color="info" %}}
31+
If more than one station is found for a given computer name during bulk registration, the system now automatically creates an *Unassigned computer* instead of attempting an automatic assignment. This ensures that you can manually select the correct station configuration, preventing unintended assignments.
32+
{{% /alert %}}
33+
34+
* We have fixed an issue where the login dialogue was opened after a session time-out.
35+
36+
### Workstation Client
37+
38+
#### Fixes
39+
40+
* We have addressed some minor issues within the Bluetooth functionality, including improved handling of Bluetooth protocol errors to prevent unexpected behavior.
41+
* We have fixed a crash that could occur during window movement if the client configuration was not writable, improving the application stability.
42+
* We have updated the underlying dependencies for the Smart Card reader functionality, enhancing stability and compatibility.
43+
44+
### Workstation Connector
45+
46+
#### New Features
47+
48+
* We have added a number of other new nanoflows, JavaScript actions, and widgets to simplify the creation of custom, reusable peripheral modules for your organization:
49+
50+
* Manage peripheral object creation and initialize peripheral objects using the new `GetCreateDevice` action. You can configure callbacks on connection, on message, and on disconnection.
51+
* Trigger application level logic on device events with new widgets. Handling peripheral events no longer requires changing peripheral modules.
52+
* Manage events in a nanoflow with the new `SubscribeToObjectChanges` and `WaitForObjectChanges` nanoflow actions.
53+
* Benefit from easier configuration of common use cases with the new `ConnectDevice`, `SendDeviceMessage` and `WaitForDeviceMessage` nanoflow actions.
54+
55+
For more information, see [Nanoflows](/mendix-workstation/build-app/#javascript-actions) and [Widgets](/mendix-workstation/build-app/#widgets).
56+
57+
#### Improvement
58+
59+
* The **Model Peripheral** entity is now a specialization of the **Device** entity and no longer requires association.
60+
* Calling `GetStation` is no longer required to initiate the Workstation Connector. It is only required to read the station configuration.
61+
62+
#### Fixes
63+
64+
* We have removed the `Station_User` association. Object garbage collection is now handled internally, leading to more robust object management.
65+
* We have fixed an issue related to the timing of initial connections.
66+
* We have fixed an issue where devices were sometimes discovered with a delay.
67+
68+
#### Deprecations
69+
70+
* We have deprecated the following actions:
71+
72+
* `SendMessage` - Deprecated in favor of `SendDeviceMessage` and `WaitForDeviceMessage`
73+
* `SubscribeToMessages` - Deprecated in favor of `GetCreateDevice`
74+
* `SubscribeToErrors` - Deprecated in favor of `GetCreateDevice`
75+
76+
The deprecated actions are longer exposed as nanoflows and have been moved to the `_USE_ME/Deprecated` folder.
77+
1378
## 3.5.0
1479

1580
### Release date: March 12, 2026

content/en/docs/workstation/wks-build-app.md

Lines changed: 80 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -65,67 +65,114 @@ To change a user's role or remove them from the workspace, click the three-dot i
6565

6666
## Getting Started with Custom Logic for Device Interaction
6767

68-
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 Java actions are essential for establishing connections, sending or receiving messages, and managing device interactions:
69-
70-
* **GetStation** - Retrieves the computer information connected to the Client.
71-
* **SendMessage** - Sends data or commands to the connected device. For more information about the supported message syntax, see [Message Syntax for File, Smart Card, and Bluetooth Devices](/mendix-workstation/device-syntax/).
72-
* **SubscribeToMessages** - Subscribes to device messages and triggers a nanoflow when messages are received.
73-
* **SubscribeToErrors** - Subscribes to device connection errors and triggers a nanoflow when errors occur.
74-
* **Unsubscribe** - End the subscription to device messages or errors.
75-
* **UnsubscribeByContext** - End all subscriptions related to a context object.
76-
* **UnsubscribeByDevice** - End all subscriptions related to a specific device.
77-
* **DisconnectDevice** - Unsubscribe and completely disconnect from a specific device.
78-
79-
These nanoflows and actions serve as the core building blocks for integrating devices into your Mendix applications and tailoring the functionality to your specific requirements.
68+
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.
8069

8170
### Understanding the Domain Model
8271

8372
The domain model contains the following entities:
8473

85-
* **Station** - Includes the station name, computer name, the workspace name and the client version (non-persistent entities).
86-
* **Device** - A list of devices associated with the station; includes device names and properties required to achieve a connection (non-persistent entities).
74+
* **Station** - A non-persistent entity representing the Workstation Client configuration.
75+
* **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.
8776
* **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.
8877

89-
### Using the Nanoflows and Actions
78+
### Using the Nanoflows and Actions {#javascript-actions}
9079

9180
The following section provides more information about using the nanoflows and Java actions in your Mendix application.
9281

82+
#### SendDeviceMessage
83+
84+
Call `SendDeviceMessage` to send a message to a device. For more information about the supported message syntax, see [Message Syntax for File, Smart Card, and Bluetooth Devices](/mendix-workstation/device-syntax/). This action has the following parameters:
85+
86+
* `device`
87+
* `message`
88+
89+
#### WaitForDeviceMessage
90+
91+
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:
92+
93+
* `device`
94+
* `timeout`
95+
96+
#### WaitForObjectChange
97+
98+
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:
99+
100+
* `objectToObserve`
101+
* `attributes`
102+
* `timeout`
103+
104+
#### GetCreateDevice
105+
106+
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:
107+
108+
* `name`
109+
* `class`
110+
* `initialize`
111+
* `createDevice`
112+
* `entity`
113+
* `onConnect`
114+
* `onMessage`
115+
* `onDisconnect`
116+
117+
#### ConnectDevice
118+
119+
Call this action to connect to a specific device.
120+
121+
#### DisconnectDevice
122+
123+
Call this action to disconnect from a specific device.
124+
125+
#### Initialize
126+
127+
This action sets up communication with the Workstation Client. It should be automatically called through the `initialize` parameter of `GetStation` or `GetCreateDevice`.
128+
93129
#### GetStation
94130

95-
Call `GetStation` to retrieve configuration of the current Client computer by using the Workstation Client. `GetStation` can be used multiple times, but it queries the Workstation Client only the first time. The following calls return the current object loaded in the session. If connection with Workstation Client does not work, `GetStation` returns an empty object.
131+
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.
96132

97-
#### SendMessage
133+
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.
98134

99-
Call `SendMessage` to send a message to a device. `SendMessage` includes the option to wait for the response of the device in the current nanoflow.
135+
#### SubscribeToObjectChanges
100136

101-
#### SubscribeToMessages
137+
Call `SubscribeToObjectChanges` to trigger a nanoflow when the specified object changes. This action has the following parameters:
102138

103-
Call `SubscribeToMessages` to trigger a nanoflow when a message is received from a device. `SubscribeToMessages` provides an option to specify a context object that will be passed to the callback nanoflow whenever a message is received.
139+
* `objectToObserve`
140+
* `attributes`
141+
* `callback`
142+
* `applicationContext`
104143

105-
The callback nanoflow must have the following parameters:
144+
#### SubscribeToDeviceMessages
106145

107-
* `Device` (object)
108-
* `Message` (String)
109-
* `Context object` (same as the name used when subscribing)
146+
Call `SubscribeToDeviceMessages` to trigger a nanoflow when a message is received from a device. This action has the following parameters:
110147

111-
#### SubscribeToErrors
148+
* `device`
149+
* `callback`
150+
* `applicationContext`
112151

113-
Call `SubscribeToErrors` to trigger a nanoflow on device connection error.
152+
#### SubscribeToDeviceErrors
114153

115-
The callback nanoflow must have the following parameters:
154+
Call `SubscribeToDeviceErrors` to trigger a nanoflow on device connection error. This action has the following parameters:
116155

117-
* `Device` (object)
118-
* `ErrorMessage` (String)
119-
* `ErrorCode` (Integer)
120-
* `Context object` (same as the name used when subscribing)
156+
* `device`
157+
* `callback`
158+
* `applicationContext`
121159

122160
#### Unsubscribe
123161

124162
Call `Unsubscribe` to end a subscription.
125163

126-
#### UnsubscribeByContext
164+
#### Private Nanoflows
165+
166+
`CreateStation`, `CommitStation`, `CreateDevice`, and `CommitDevice` are private nanoflows, required be compatible with [strict mode](/refguide/strict-mode/).
167+
168+
### Widgets {#widgets}
169+
170+
The following widgets allow you to specify when to execute an action:
127171

128-
Call `UnsubscribeByContext` to end all subscriptions related to a context object.
172+
* **On Load/Unload** - Execute the action when the widget is first rendered, or when it is removed (unloaded).
173+
* **On Change** - Execute the action when the specified attribute changes.
174+
* **On Equal** - Execute the action when an attribute is equal to the specified expression.
175+
* **On True** - Execute the action when the specified expression is true.
129176

130177
## Error Logs
131178

content/en/docs/workstation/wks-message-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The section below shows a sample test that you can run to verify the configurati
6464
* **Allow writing files** - **Yes**
6565
* Use the default values for everything else
6666
4. Register the Station to your computer (assuming the Workstation Client is installed there).
67-
5. In your Workspace, navigate to **Test Your Station** and click on the configured file device.
67+
5. In your Workspace, navigate to **Test Your Station** and click **Test** by the configured file device.
6868
6. Enter `3#test.txt#Hello from Mendix` in the **Send Message** field, and then press **Send Message**.
6969

7070
The test should show a response like `S#3#C:\MyTestFolder\test.txt` to indicate that the text file *test.txt* was successfully written to *MyTestFolder*.

0 commit comments

Comments
 (0)