You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-how-to-order-connection-state-events.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,15 +52,15 @@ Let's create a logic app and add an Event Grid trigger that monitors the resourc
52
52
- A plan type of *Consumption*
53
53
54
54
>[!NOTE]
55
-
> The *Consumption* plan type is the option that enables the Logic Apps Designer in the UI. If you choose *Standard* (the default), then you must create a new workflow in order for the Logic Apps Designer to become available.
55
+
> The *Consumption* plan type is the option that enables the **Logic app designer** in the UI. If you choose *Standard* (the default), then you must create a new workflow in order for the **Logic app designer** to become available.
56
56
57
57
:::image type="content" source="media/iot-hub-how-to-order-connection-state-events/new-logic-app.png" alt-text="Screenshot of how to create a logic app in the Azure portal." lightbox="media/iot-hub-how-to-order-connection-state-events/new-logic-app.png":::
58
58
59
59
1. Select **Review + Create** to review your configuration, then select **Create** to create the logic app.
60
60
61
-
1. You've now created an Azure resource for your logic app. After Azure deploys your logic app, select **Go to resource**. Logic Apps Designer shows you templates for common patterns so you can get started faster.
61
+
1. You've now created an Azure resource for your logic app. After Azure deploys your logic app, select **Go to resource**. **Logic app designer** shows you templates for common patterns so you can get started faster.
62
62
63
-
1. In the Logic Apps Designer, scroll until you see the **Templates** section, then choose **Blank Logic App** so that you can build your logic app from scratch.
63
+
1. In the **Logic app designer**, scroll until you see the **Templates** section, then choose **Blank Logic App** so that you can build your logic app from scratch.
64
64
65
65
### Select a trigger
66
66
@@ -105,11 +105,9 @@ A trigger is a specific event that starts your logic app. For this tutorial, the
105
105
106
106
:::image type="content" source="media/iot-hub-how-to-order-connection-state-events/paste-sample-payload.png" alt-text="Screenshot of the sample JSON payload pasted into the text box in Azure." lightbox="media/iot-hub-how-to-order-connection-state-events/paste-sample-payload.png":::
107
107
108
-
5. You may receive a pop-up notification that says, **Remember to include a Content-Type header set to application/json in your request.** You can safely ignore this suggestion, and move on to the next section.
109
-
110
108
### Create a condition
111
109
112
-
In your logic app workflow, conditions help run specific actions after passing that specific condition. Once the condition is met, a desired action can be defined. For this tutorial, the condition is to check whether eventType is device connected or device disconnected. The action will be to execute the stored procedure in your database.
110
+
Conditions help run specific actions after passing that specific condition. For this article, the condition is to check whether **eventType** is either device connected or device disconnected. The action executed when that **eventType** is true is the creation of a document in Azure Cosmos DB. This condition is created in the **Logic app designer**.
113
111
114
112
1. Select **+ New step**, then the **Built-in** tab, then find and select the control called **Condition**.
115
113
@@ -122,20 +120,20 @@ In your logic app workflow, conditions help run specific actions after passing t
122
120
* This second row is similar to the first row, except we look for disconnection events.
123
121
124
122
Use **eventType**, **is equal to**, and **Microsoft.Devices.DeviceDisconnected** for the row values.
123
+
124
+
Add a checkmark in front of each row, as shown.
125
125
126
-
:::image type="content" source="media/iot-hub-how-to-order-connection-state-events/condition-detail.jpg" alt-text="Screenshot of the full For Each condition." lightbox="media/iot-hub-how-to-order-connection-state-events/condition-detail.jpg":::
126
+
:::image type="content" source="media/iot-hub-how-to-order-connection-state-events/condition-detail.jpg" alt-text="Screenshot of the full For Each condition." lightbox="media/iot-hub-how-to-order-connection-state-events/condition-detail.jpg":::
127
127
128
128
1. In the **if true** dialog, click on **Add an action**.
129
129
130
130
:::image type="content" source="media/iot-hub-how-to-order-connection-state-events/action-if-true.png" alt-text="Screenshot of the 'If true' box in Azure." lightbox="media/iot-hub-how-to-order-connection-state-events/action-if-true.png":::
131
131
132
-
1. Search for Cosmos DB and select **Azure Cosmos DB — Execute stored procedure (V3)**
132
+
1. Search for Cosmos DB and select **Azure Cosmos DB — Create or update document (V3)**
133
133
134
134
:::image type="content" source="media/iot-hub-how-to-order-connection-state-events/cosmosDB-search.png" alt-text="Screenshot of the search for Azure Cosmos DB." lightbox="media/iot-hub-how-to-order-connection-state-events/cosmosDB-search.png":::
135
135
136
-
1. Fill in **cosmosdb-connection** for the **Connection Name** and choose an [authentication type](/azure/connectors/connectors-create-api-cosmos-db?tabs=consumption.md#connect-to-azure-cosmos-db), then select **Create**.
137
-
138
-
1. You see the **Execute stored procedure (V3)** panel. Enter the values for the fields:
136
+
1. You see the **Create or update document (V3)** panel. Enter these values for the fields:
139
137
140
138
**Azure Cosmos DB account name**: {Add your account name}
141
139
@@ -239,7 +237,7 @@ You have now run a sample application to collect sensor data and send it to your
239
237
240
238
### Observe events in Cosmos DB
241
239
242
-
You can see results of the executed stored procedure in your Cosmos DB document. Here's what it looks like. Each row contains the latest device connection state per device.
240
+
You can see results of the executed stored procedure in your Cosmos DB document. The query **SELECT * FROM d** shows the document. Each row contains the latest device connection state per device.
243
241
244
242

0 commit comments