Skip to content

Commit 115eb1c

Browse files
Merge pull request #312407 from jlian/fix/wasm-doc-bugs-batch1
Fix critical bugs in WASM dataflow docs (e2e verified)
2 parents c040379 + 840e441 commit 115eb1c

5 files changed

Lines changed: 786 additions & 429 deletions

File tree

articles/iot-operations/connect-to-cloud/howto-dataflow-graph-wasm.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: sethm
66
ms.service: azure-iot-operations
77
ms.subservice: azure-data-flows
88
ms.topic: how-to
9-
ms.date: 02/25/2026
9+
ms.date: 02/27/2026
1010
ai-usage: ai-assisted
1111

1212
---
@@ -888,20 +888,12 @@ In the data flow diagram, select **Add graph transform (optional)** to add a gra
888888
artifact: 'temperature-converter:2.1.0'
889889
configuration: [
890890
{
891-
key: 'input-unit'
892-
value: 'fahrenheit'
891+
key: 'temperature_lower_bound'
892+
value: '-40'
893893
}
894894
{
895-
key: 'output-unit'
896-
value: 'celsius'
897-
}
898-
{
899-
key: 'precision'
900-
value: '2'
901-
}
902-
{
903-
key: 'enable-filtering'
904-
value: 'true'
895+
key: 'temperature_upper_bound'
896+
value: '3422'
905897
}
906898
]
907899
}
@@ -917,14 +909,10 @@ In the data flow diagram, select **Add graph transform (optional)** to add a gra
917909
registryEndpointRef: my-acr-endpoint
918910
artifact: temperature-converter:2.1.0
919911
configuration:
920-
- key: input-unit
921-
value: fahrenheit
922-
- key: output-unit
923-
value: celsius
924-
- key: precision
925-
value: "2"
926-
- key: enable-filtering
927-
value: "true"
912+
- key: temperature_lower_bound
913+
value: "-40"
914+
- key: temperature_upper_bound
915+
value: "3422"
928916
```
929917

930918
---
@@ -936,6 +924,9 @@ You pass the configuration key-value pairs to the WASM module at runtime. The mo
936924
- Enable or disable features based on deployment requirements.
937925
- Set environment-specific values like thresholds or endpoints.
938926

927+
> [!IMPORTANT]
928+
> Check your WASM module's documentation or source code for required configuration parameters. If a module expects specific parameters (such as filter bounds or thresholds) and you don't provide them, the module may fail at runtime. For details on defining parameters in graph definitions, see [Module configuration parameters](../develop-edge-apps/howto-configure-wasm-graph-definitions.md#module-configuration-parameters).
929+
939930
#### Destination nodes
940931

941932
Destination nodes define where processed data is sent. They connect to data flow endpoints that send data to MQTT brokers, cloud storage, or other systems. Each destination node specifies:
@@ -1130,6 +1121,11 @@ If you deploy the data flow graph but it doesn't process messages:
11301121

11311122
## Related content
11321123

1124+
- [Develop WebAssembly modules](../develop-edge-apps/howto-develop-wasm-modules.md) for writing operators in Rust and Python (includes quickstart)
1125+
- [Configure WebAssembly graph definitions](../develop-edge-apps/howto-configure-wasm-graph-definitions.md) for graph YAML structure and configuration parameters
1126+
- [Deploy WASM modules and graph definitions](../develop-edge-apps/howto-deploy-wasm-graph-definitions.md) for registry setup and artifact management
1127+
- [Build WASM modules with VS Code extension](../develop-edge-apps/howto-build-wasm-modules-vscode.md) for IDE-based development
1128+
- [Run ONNX inference in WASM](../develop-edge-apps/howto-wasm-onnx-inference.md) for ML model integration
11331129
- [Configure MQTT data flow endpoints](howto-configure-mqtt-endpoint.md)
11341130
- [Configure Azure Event Hubs and Kafka data flow endpoints](howto-configure-kafka-endpoint.md)
11351131
- [Configure Azure Data Lake Storage data flow endpoints](howto-configure-adlsv2-endpoint.md)

articles/iot-operations/develop-edge-apps/howto-configure-wasm-graph-definitions.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -266,23 +266,33 @@ For detailed instructions on uploading graph definitions and WASM modules to reg
266266

267267
## Module configuration parameters
268268

269-
Graph definitions can specify runtime parameters for WASM operators through module configurations:
269+
Graph definitions can specify runtime parameters for WASM operators through module configurations. These parameters are passed to your operator's `init` function at runtime, enabling dynamic configuration without rebuilding modules.
270+
271+
> [!IMPORTANT]
272+
> If a WASM operator requires configuration parameters and you don't provide them in `moduleConfigurations`, the operator may fail at runtime. Always check the operator's documentation or source code for required parameters.
273+
274+
The following example shows module configurations for the [temperature sample](https://github.com/Azure-Samples/explore-iot-operations/tree/main/samples/wasm/operators/temperature) used in the complex graph:
270275

271276
```yaml
272277
moduleConfigurations:
273-
- name: my-operator/map
278+
- name: module-temperature/map
274279
parameters:
275-
threshold:
276-
name: temperature_threshold
277-
description: "Temperature threshold for filtering"
278-
required: true
279-
unit:
280-
name: output_unit
281-
description: "Output temperature unit"
282-
required: false
280+
key1:
281+
name: key1
282+
description: "Example parameter passed to the map operator's init function"
283+
- name: module-temperature/filter
284+
parameters:
285+
temperature_lower_bound:
286+
name: temperature_lower_bound
287+
description: "Minimum valid temperature in Celsius (default: -40)"
288+
temperature_upper_bound:
289+
name: temperature_upper_bound
290+
description: "Maximum valid temperature in Celsius (default: 3422)"
283291
```
284292

285-
These parameters are passed to your WASM operator's `init` function at runtime, enabling dynamic configuration without rebuilding modules. For detailed examples of how to access and use these parameters in your Rust and Python code, see [Module configuration parameters](howto-develop-wasm-modules.md#module-configuration-parameters).
293+
The `name` field in each configuration entry must match the operator name defined in the graph's `operations` section. Each parameter under `parameters` becomes a key-value tuple in the `configuration.properties` list that your operator's `init` function receives.
294+
295+
For detailed examples of how to access and use these parameters in your Rust and Python code, see [Module configuration parameters](howto-develop-wasm-modules.md#module-configuration-parameters).
286296

287297
For a complete implementation example, see the [branch module](https://github.com/Azure-Samples/explore-iot-operations/tree/main/samples/wasm-python/operators/branch), which demonstrates parameter usage for conditional routing logic.
288298

articles/iot-operations/develop-edge-apps/howto-deploy-wasm-graph-definitions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ For detailed information about creating and configuring the YAML graph definitio
189189

190190
## Related content
191191

192-
- [Configure WebAssembly graph definitions](../develop-edge-apps/howto-configure-wasm-graph-definitions.md)
193-
- [Develop WebAssembly modules for data flow graphs](../develop-edge-apps/howto-develop-wasm-modules.md)
192+
- [Develop WebAssembly modules](howto-develop-wasm-modules.md) for writing operators in Rust and Python (includes end-to-end quickstart)
193+
- [Configure WebAssembly graph definitions](howto-configure-wasm-graph-definitions.md) for graph YAML structure and configuration parameters
194+
- [Use WebAssembly with data flow graphs](../connect-to-cloud/howto-dataflow-graph-wasm.md) for DataflowGraph resource configuration and examples
195+
- [Build WASM modules with VS Code extension](howto-build-wasm-modules-vscode.md) for IDE-based development
194196
- [Configure registry endpoints](howto-configure-registry-endpoint.md)

0 commit comments

Comments
 (0)