|
2 | 2 | title: "Installing the Workstation Connector" |
3 | 3 | url: /mendix-workstation/install-connector/ |
4 | 4 | description: "Describes how to install the Workstation Connector and build an app to work with Mendix Workstation." |
5 | | -aliases: |
6 | | - - /mendix-workstation/build-app/ |
7 | 5 | weight: 20 |
8 | 6 | --- |
9 | 7 |
|
@@ -62,119 +60,4 @@ You can invite other Workstation Management users to your workspace to share con |
62 | 60 |
|
63 | 61 | 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/). |
64 | 62 |
|
65 | | -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. |
66 | | - |
67 | | -## Getting Started with Custom Logic for Device Interaction |
68 | | - |
69 | | -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. |
70 | | - |
71 | | -### Understanding the Domain Model |
72 | | - |
73 | | -The domain model contains the following entities: |
74 | | - |
75 | | -* **Station** - A non-persistent entity representing the Workstation Client configuration. |
76 | | -* **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. |
77 | | -* **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. |
78 | | - |
79 | | -### Using the Nanoflows and Actions {#javascript-actions} |
80 | | - |
81 | | -The following section provides more information about using the nanoflows and Java actions in your Mendix application. |
82 | | - |
83 | | -#### SendDeviceMessage |
84 | | - |
85 | | -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: |
86 | | - |
87 | | -* `device` |
88 | | -* `message` |
89 | | - |
90 | | -#### WaitForDeviceMessage |
91 | | - |
92 | | -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: |
93 | | - |
94 | | -* `device` |
95 | | -* `timeout` |
96 | | - |
97 | | -#### WaitForObjectChange |
98 | | - |
99 | | -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: |
100 | | - |
101 | | -* `objectToObserve` |
102 | | -* `attributes` |
103 | | -* `timeout` |
104 | | - |
105 | | -#### GetCreateDevice |
106 | | - |
107 | | -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: |
108 | | - |
109 | | -* `name` |
110 | | -* `class` |
111 | | -* `initialize` |
112 | | -* `createDevice` |
113 | | -* `entity` |
114 | | -* `onConnect` |
115 | | -* `onMessage` |
116 | | -* `onDisconnect` |
117 | | - |
118 | | -#### ConnectDevice |
119 | | - |
120 | | -Call this action to connect to a specific device. |
121 | | - |
122 | | -#### DisconnectDevice |
123 | | - |
124 | | -Call this action to disconnect from a specific device. |
125 | | - |
126 | | -#### Initialize |
127 | | - |
128 | | -This action sets up communication with the Workstation Client. It should be automatically called through the `initialize` parameter of `GetStation` or `GetCreateDevice`. |
129 | | - |
130 | | -#### GetStation |
131 | | - |
132 | | -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. |
133 | | - |
134 | | -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. |
135 | | - |
136 | | -#### SubscribeToObjectChanges |
137 | | - |
138 | | -Call `SubscribeToObjectChanges` to trigger a nanoflow when the specified object changes. This action has the following parameters: |
139 | | - |
140 | | -* `objectToObserve` |
141 | | -* `attributes` |
142 | | -* `callback` |
143 | | -* `applicationContext` |
144 | | - |
145 | | -#### SubscribeToDeviceMessages |
146 | | - |
147 | | -Call `SubscribeToDeviceMessages` to trigger a nanoflow when a message is received from a device. This action has the following parameters: |
148 | | - |
149 | | -* `device` |
150 | | -* `callback` |
151 | | -* `applicationContext` |
152 | | - |
153 | | -#### SubscribeToDeviceErrors |
154 | | - |
155 | | -Call `SubscribeToDeviceErrors` to trigger a nanoflow on device connection error. This action has the following parameters: |
156 | | - |
157 | | -* `device` |
158 | | -* `callback` |
159 | | -* `applicationContext` |
160 | | - |
161 | | -#### Unsubscribe |
162 | | - |
163 | | -Call `Unsubscribe` to end a subscription. |
164 | | - |
165 | | -#### Private Nanoflows |
166 | | - |
167 | | -`CreateStation`, `CommitStation`, `CreateDevice`, and `CommitDevice` are private nanoflows, required be compatible with [strict mode](/refguide/strict-mode/). |
168 | | - |
169 | | -### Widgets {#widgets} |
170 | | - |
171 | | -The following widgets allow you to specify when to execute an action: |
172 | | - |
173 | | -* **On Load/Unload** - Execute the action when the widget is first rendered, or when it is removed (unloaded). |
174 | | -* **On Change** - Execute the action when the specified attribute changes. |
175 | | -* **On Equal** - Execute the action when an attribute is equal to the specified expression. |
176 | | -* **On True** - Execute the action when the specified expression is true. |
177 | | - |
178 | | -## Error Logs |
179 | | - |
180 | | -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/). |
| 63 | +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. |
0 commit comments