Skip to content

Commit cbe6bf0

Browse files
author
ecfan
committed
Update steps and art
1 parent d090d65 commit cbe6bf0

10 files changed

+72
-28
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
ms.service: azure-logic-apps
3+
ms.author: estfan
4+
author: ecfan
5+
ms.date: 12/16/2024
6+
ms.topic: include
7+
---
8+
9+
> [!IMPORTANT]
10+
>
11+
> For authentication, use [Microsoft Entra ID](/entra/identity/authentication/overview-authentication) with
12+
> [managed identities](/entra/identity/managed-identities-azure-resources/overview) whenever possible.
13+
> This method provides optimal and superior security without having to provide credentials. Azure manages
14+
> this identity for you and helps keep authentication information secure so that you don't have to manage
15+
> this sensitive information. To set up a managed identity for Azure Logic Apps, see
16+
> [Authenticate access and connections to Azure resources with managed identities in Azure Logic Apps](/azure/logic-apps/authenticate-with-managed-identity).
17+
>
18+
> If you need to use a different authentication type, use next highest level security option available.
19+
> For example, suppose that you have to use connection strings instead. A connection string
20+
> includes the authorization information required for your app to access a specific resource, service,
21+
> or system. The access key in the connection string is similar to a root password.
22+
>
23+
> In production environments, always protect your access keys. Make sure to secure your connection string
24+
> using Microsoft Entra ID, and use [Azure Key Vault](https://go.microsoft.com/fwlink/?linkid=2300117)
25+
> to securely store and rotate your keys. Avoid distributing access keys to other users, hardcoding them,
26+
> or saving them anywhere in plain text where others can access. Rotate your keys as soon as possible
27+
> if you think these keys might be compromised.

articles/logic-apps/logic-apps-batch-process-send-receive-messages.md

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,18 @@ Your batch receiver and batch sender need to share the same Azure subscription *
5353

5454
Before you can send messages to a batch, that batch must first exist as the destination where you send those messages. So first, you must create the "batch receiver" logic app workflow, which starts with the **Batch Trigger**. That way, when you create the "batch sender" logic app workflow, you can select the batch receiver logic app workflow. The batch receiver continues collecting messages until your specified criteria is met for releasing and processing those messages. While batch receivers don't need to know anything about batch senders, batch senders must know the destination where they send the messages.
5555

56-
1. In the [Azure portal](https://portal.azure.com), create a logic app workflow with the name **BatchReceiver**.
56+
1. In the [Azure portal](https://portal.azure.com), create a logic app resource with a blank workflow.
57+
58+
This example creates a batch receiver.
59+
1. with the name **BatchReceiver**.
5760

5861
1. On the workflow designer, select **Add a trigger**, and [follow these general steps to add the **Batch Operations** trigger named **Batch Trigger**](create-workflow-with-trigger-or-action.md#add-trigger).
5962

6063
1. Set the following trigger properties:
6164

6265
| Property | Description |
6366
|----------|-------------|
64-
| **Mode** <br>(Consumption workflows only) | - **Inline**: For defining release criteria inside the batch trigger <br><br>- **Integration Account**: For defining multiple release criteria configurations through an integration account. With an integration account, you can maintain these configurations all in one place rather than in separate logic apps. |
67+
| **Mode** <br>(Consumption workflows only) | - **Inline**: For defining release criteria inside the batch trigger <br><br>- **Integration Account**: For defining multiple release criteria configurations through an integration account. With an integration account, you can maintain these configurations all in one place rather than in separate logic app resources. |
6568
| **Batch Name** | The name for your batch. In Consumption workflows, this property appears only when **Mode** is set to **Inline**. This example uses **TestBatch**. |
6669
| **Release Criteria** | The criteria to meet before processing each batch. By default, the batch trigger operates using "inline mode" where you define the batch release criteria inside the batch trigger. <br><br>- **Message count based**: Release the batch based on the number of messages collected by the batch. <br><br>- **Size based**: Release the batch based on the total size in bytes for all messages collected by that batch. <br><br>- **Schedule based**: Release the batch based on a recurrence schedule, which specifies an interval and frequency. You can optionally select a time zone and provide a start date and time. <br><br>To use all the specified criteria, select all the options. |
6770
| **Message Count** | The number of messages to collect in the batch, for example, 10 messages. The batch message limit is 8,000 messages. |
@@ -95,9 +98,9 @@ Before you can send messages to a batch, that batch must first exist as the dest
9598

9699
* Select inside the **Subject** box to view the options for the dynamic content list (lightning icon) and expression editor (function icon). Select the lightning icon to open the dynamic content list, and select the field named **Partition Name**.
97100

98-
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/send-email-action-details.png" alt-text="Screenshot shows dynamic content list and selected field for Partition Name.":::
101+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/send-email-action-details.png" alt-text="Screenshot shows dynamic content list and selected field for Partition Name property.":::
99102

100-
Later, in the batch sender, you can specify a unique partition key that divides the target batch into logical subsets where you can send messages. Each set has a unique number that's generated by the batch sender logic app. This capability lets you use a single batch with multiple subsets and define each subset with the name that you provide.
103+
Later, in the batch sender, you can specify a unique partition key that divides the target batch into logical subsets where you can send messages. Each set has a unique number that's generated by the batch sender logic app workflow. This capability lets you use a single batch with multiple subsets and define each subset with the name that you provide.
101104

102105
> [!IMPORTANT]
103106
>
@@ -117,13 +120,14 @@ Before you can send messages to a batch, that batch must first exist as the dest
117120
> [!IMPORTANT]
118121
>
119122
> If you're using Visual Studio Code, before you continue to the next section, make sure that you first
120-
> [*deploy* your batch receiver logic app to Azure](/azure/logic-apps/quickstart-create-logic-apps-visual-studio-code). Otherwise, you can't select the batch receiver when you create the batch sender.
123+
> [*deploy* your batch receiver logic app resource to Azure](/azure/logic-apps/quickstart-create-logic-apps-visual-studio-code).
124+
> Otherwise, you can't select the batch receiver logic app workflow when you create the batch sender logic app workflow.
121125
122126
<a name="batch-sender"></a>
123127

124128
## Create batch sender
125129

126-
Now create one or more batch sender logic app workflows that send messages to the batch receiver logic app. In each batch sender, you specify the batch receiver and batch name, message content, and any other settings. You can optionally provide a unique partition key to divide the batch into logical subsets for collecting messages with that key.
130+
Now create one or more batch sender logic app workflows that send messages to the batch receiver logic app workflow. In each batch sender, you specify the batch receiver and batch name, message content, and any other settings. You can optionally provide a unique partition key to divide the batch into logical subsets for collecting messages with that key.
127131

128132
* Make sure that you previously [created and deployed your batch receiver](#batch-receiver) so when you create your batch sender, you can select the existing batch receiver as the destination batch. While batch receivers don't need to know anything about batch senders, batch senders must know where to send messages.
129133

@@ -133,9 +137,8 @@ Now create one or more batch sender logic app workflows that send messages to th
133137

134138
> [!NOTE]
135139
>
136-
> If you have a Standard logic app, make sure to create a stateful workflow,
137-
> not a stateless workflow because the **Recurrence** trigger is unavailable
138-
> for stateless workflows.
140+
> If you have a Standard logic app resource, make sure to create a stateful workflow, not a
141+
> stateless workflow because the **Recurrence** trigger is unavailable for stateless workflows.
139142
140143
1. [Follow these general steps to add the **Schedule** trigger named **Recurrence**](create-workflow-with-trigger-or-action.md#add-trigger).
141144

@@ -151,25 +154,25 @@ Now create one or more batch sender logic app workflows that send messages to th
151154

152155
**Consumption workflow**
153156

154-
After you add the **Send to batch trigger worklow** action, a list appears and shows only the logic app resources with batch triggers that exist in the same Azure subscription *and* Azure region as your batch sender logic app.
157+
After you add the **Send to batch trigger worklow** action, a list appears and shows only the logic app resources with batch triggers that exist in the same Azure subscription *and* Azure region as your batch sender logic app resource.
158+
159+
1. From the logic apps list, select the previously created logic app to use as the batch receiver. When the available triggers appear, select the trigger named **Batch_messages**.
155160

156-
1. From the logic apps list, select the batch receiver logic app that you previously created. When the available triggers appear, select the trigger named **Batch_messages**.
161+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-select-batch-receiver-consumption.png" alt-text="Screenshot shows Consumption workflow with Recurrence trigger and batch sender action that selects a batch receiver logic app resource and trigger.":::
157162

158163
> [!IMPORTANT]
159164
>
160-
> If you're using Visual Studio Code, and you don't see any batch receivers to select,
161-
> check that you previously created and deployed your batch receiver to Azure. If you haven't, learn
162-
> [how to deploy your batch receiver logic app to Azure](/azure/logic-apps/quickstart-create-logic-apps-visual-studio-code).
163-
164-
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-select-batch-receiver-consumption.png" alt-text="Screenshot shows action named Send to batch trigger workflow, along with selected batch receiver logic app and action.":::
165+
> If you're using Visual Studio Code, and you don't see any batch receivers to select, check that
166+
> you previously created and deployed your batch receiver to Azure. If you haven't, learn
167+
> [how to deploy your batch receiver logic app resource to Azure](/azure/logic-apps/quickstart-create-logic-apps-visual-studio-code).
165168
166169
1. When you're done, select **Add action**.
167170

168171
**Standard workflow**
169172

170173
After you add the **Send to batch** action, the action pane shows the following properties in the next step for you to specify the batch name, message content, workflow name, and trigger name. You can specify information only for a batch receiver logic app workflow with a batch trigger that exists in the same Azure subscription *and* Azure region as your batch sender logic app.
171174

172-
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-standard.png" alt-text="Screenshot shows Standard workflow named BatchSender with action named Send to batch.":::
175+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-standard.png" alt-text="Screenshot shows Standard workflow with Recurrence trigger and action named Send to batch.":::
173176

174177
1. Set the following batch receiver action properties:
175178

@@ -189,11 +192,17 @@ Now create one or more batch sender logic app workflows that send messages to th
189192

190193
1. In the editor, enter the function named **utcnow()**, and select **Add**.
191194

192-
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-details.png" alt-text="Screenshot shows BatchReceiver action pane, Message Content box with cursor, expression editor with utcNow function, and other details.":::
195+
**Consumption workflow**
196+
197+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-details-consumption.png" alt-text="Screenshot shows Consumption workflow, batch sender action pane, Message Content box with cursor, expression editor with utcNow function, and other details.":::
198+
199+
**Standard workflow**
200+
201+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-details-standard.png" alt-text="Screenshot shows Standard workflow, batch sender action pane, Message Content box with cursor, expression editor with utcNow function, and other details.":::
193202

194203
1. Now set up a partition for the batch.
195204

196-
1. In the **BatchReceiver** action pane, from the **Advanced parameters** list, and select the following properties:
205+
1. In the batch sender action pane, from the **Advanced parameters** list, and select the following properties:
197206

198207
| Property | Description |
199208
|----------|-------------|
@@ -206,23 +215,31 @@ Now create one or more batch sender logic app workflows that send messages to th
206215

207216
This example generates a number between one and five. So, you're dividing this batch into five numbered partitions, which this expression dynamically sets.
208217

209-
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-partition-advanced-options.png" alt-text="Screenshot shows adding the rand() function to divide the batch into partitions.":::
218+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-partition.png" alt-text="Screenshot shows function named rand for dividing batch into partitions.":::
210219

211-
1. Save your workflow.
220+
When you're done, your batch sender workflow now looks similar to the following example, based on your logic app workflow type:
221+
222+
**Consumption workflow**
212223

213-
Your sender logic app now looks similar to this example:
224+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-finished-consumption.png" alt-text="Screenshot shows finished batch sender Consumption logic app workflow.":::
214225

215-
![Save your sender logic app](./media/logic-apps-batch-process-send-receive-messages/batch-sender-finished.png)
226+
**Standard workflow**
227+
228+
:::image type="content" source="media/logic-apps-batch-process-send-receive-messages/batch-sender-finished-standard.png" alt-text="Screenshot shows finished batch sender Standard logic app workflow.":::
229+
230+
1. Save your workflow.
216231

217-
## Test your logic apps
232+
## Test your workflows
218233

219-
To test your batching solution, leave your logic apps running for a few minutes. Soon, you start getting emails in groups of five, all with the same partition key.
234+
To test your batching solution, leave your logic app workflows running for a few minutes. Soon, you start getting emails in groups of five, all with the same partition key.
220235

221236
Your batch sender logic app runs every minute and generates a random number between one and five. The batch sender uses this random number as the partition key for the target batch where you send the messages. Each time the batch has five items with the same partition key, your batch receiver logic app fires and sends mail for each message.
222237

223238
> [!IMPORTANT]
224-
> When you're done testing, make sure that you disable the `BatchSender` logic app to stop sending messages and avoid overloading your inbox.
239+
>
240+
> When you're done testing, make sure that you disable or delete your **BatchSender**
241+
> logic app workflow to stop sending messages and avoid overloading your inbox.
225242
226-
## Next steps
243+
## Related content
227244

228-
* [Batch and send EDI messages](../logic-apps/logic-apps-scenario-edi-send-batch-messages.md)
245+
* [Batch and send EDI messages](/azure/logic-apps/logic-apps-scenario-edi-send-batch-messages)
51.2 KB
Loading
51.2 KB
Loading
40 KB
Loading
40 KB
Loading
50.6 KB
Loading

0 commit comments

Comments
 (0)