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/logic-apps/error-exception-handling.md
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,21 +187,36 @@ For the exponential interval retry policy, the following table shows the general
187
187
188
188
## Manage the "run after" behavior
189
189
190
-
When you add actions in the workflow designer, you implicitly declare the order to use for running those actions. After an action finishes running, that action is marked with a status such as **Succeeded**, **Failed**, **Skipped**, or **TimedOut**. By default, an action that you add in the designer runs only after the predecessor completes with **Succeeded** status. In an action's underlying JSON definition, the `runAfter` property specifies that the predecessor action that must first finish and the statuses permitted for that predecessor before the successor action can run.
190
+
When you add actions in the workflow designer, you implicitly declare the sequence for running those actions. After an action finishes running, that action is marked with a status such as **Succeeded**, **Failed**, **Skipped**, or **TimedOut**. In other words, the predecessor action must first finish with any of the permitted statuses before the successor action can run.
191
+
192
+
By default, an action that you add in the designer runs only if the preceding action completes with **Succeeded** status. This *run after* behavior precisely specifies the run order for actions in a workflow.
193
+
194
+
In the designer, you can change the default "run after" behavior for an action by [editing the action's **Run after** setting](#change-run-after-designer). This setting is available only on subsequent actions that follow the first action in a workflow. The first action in a workflow always runs after the trigger successfully runs. So, the **Run after** setting isn't available and doesn't apply to the first action.
195
+
196
+
In an action's underlying JSON definition, the **Run after** setting is the same as the `runAfter` property. This property specifies one or more predecessor actions that must first finish with the specific permitted statuses before the successor action can run. The `runAfter` property is a JSON object that provides flexibility by letting you specify all the predecessor actions that must finish before the successor action runs. This object also defines an array of acceptable statuses.
197
+
198
+
For example, to have an action run after action A succeeds and also after action B succeeds or fails when you're working on an action's JSON definition, set up the following `runAfter` property:
199
+
200
+
```json
201
+
{
202
+
// Other parts in action definition
203
+
"runAfter": {
204
+
"Action A": ["Succeeded"],
205
+
"Action B": ["Succeeded", "Failed"]
206
+
}
207
+
}
208
+
```
209
+
210
+
### "Run after" behavior for error handling
191
211
192
212
When an action throws an unhandled error or exception, the action is marked **Failed**, and any successor action is marked **Skipped**. If this behavior happens for an action that has parallel branches, the Azure Logic Apps engine follows the other branches to determine their completion statuses. For example, if a branch ends with a **Skipped** action, that branch's completion status is based on that skipped action's predecessor status. After the workflow run completes, the engine determines the entire run's status by evaluating all the branch statuses. If any branch ends in failure, the entire workflow run is marked **Failed**.
193
213
194
-

214
+
:::image type="content" source="media/error-exception-handling/status-evaluation-for-parallel-branches.png" alt-text="Conceptual diagram with examples that show how run statuses are evaluated." lightbox="media/error-exception-handling/status-evaluation-for-parallel-branches.png":::
195
215
196
216
To make sure that an action can still run despite its predecessor's status, you can change an action's "run after" behavior to handle the predecessor's unsuccessful statuses. That way, the action runs when the predecessor's status is **Succeeded**, **Failed**, **Skipped**, **TimedOut**, or all these statuses.
197
217
198
218
For example, to run the Office 365 Outlook **Send an email** action after the Excel Online **Add a row into a table** predecessor action is marked **Failed**, rather than **Succeeded**, change the "run after" behavior using either the designer or code view editor.
199
219
200
-
> [!NOTE]
201
-
>
202
-
> In the designer, the "run after" setting doesn't apply to the action that immediately
203
-
> follows the trigger. The trigger must successfully run before the first action can run.
204
-
205
220
<aname="change-run-after-designer"></a>
206
221
207
222
### Change "run after" behavior in the designer
@@ -214,7 +229,7 @@ For example, to run the Office 365 Outlook **Send an email** action after the Ex
214
229
215
230
-**Standard**
216
231
217
-
1.Under**Workflows**, select **Workflows**.
232
+
1.On the resource sidebar, under**Workflows**, select **Workflows**.
218
233
219
234
1. From the **Workflows** page, select your workflow.
To run actions only after another group of actions succeed or fail,
16
-
group those actions inside a *scope*. This structure is useful when
17
-
you want to organize actions as a logical group,
18
-
evaluate that group's status, and perform actions
19
-
that are based on the scope's status.
20
-
After all the actions in a scope finish running,
21
-
the scope also gets its own status. For example,
22
-
you can use scopes when you want to implement
23
-
[exception and error handling](../logic-apps/logic-apps-exception-handling.md#scopes).
15
+
To run a group of actions only after another group of actions succeed or fail, you can nest the dependent actions inside a *scope*. This structure is useful when you want to organize actions as a logical group, evaluate that group's status, and perform actions that are based on the scope's status. After all the actions in a scope finish running, the scope also gets its own status. For example, you can use scopes when you want to implement [exception and error handling](../logic-apps/logic-apps-exception-handling.md#scopes).
24
16
25
17
To check a scope's status, you can use the same criteria
26
18
that you use to determine a logic apps' run status,
@@ -43,17 +35,13 @@ If all the scoped actions succeed, the logic app sends a "Scope succeeded" messa
43
35
44
36
## Prerequisites
45
37
46
-
To follow the example in this article, you need these items:
38
+
* An Azure account and subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?WT.mc_id=A261C142F).
47
39
48
-
* An Azure subscription. If you don't have a subscription,
49
-
[sign up for a free Azure account](https://azure.microsoft.com/free/).
40
+
* An email account from any email provider supported by Azure Logic Apps.
50
41
51
-
* An email account from any email provider supported by Logic Apps.
52
-
This example uses Outlook.com. If you use a different provider,
53
-
the general flow stays the same, but your UI appears different.
42
+
This example uses Outlook.com. If you use a different provider, the general flow stays the same, but your UI appears different.
54
43
55
-
* A Bing Maps key. To get this key, see
56
-
<ahref="/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key"target="_blank">Get a Bing Maps key</a>.
44
+
* A Bing Maps key. To get this key, see [Get a Bing Maps key](/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key).
57
45
58
46
* Basic knowledge about [logic apps](../logic-apps/logic-apps-overview.md)
59
47
@@ -146,13 +134,13 @@ so save your work often.
146
134
147
135
1. In the **Subject** field, enter this text:
148
136
149
-
`Time to leave: Traffic more than 10 minutes`
137
+
`Time to leave: Traffic more than 10 minutes`
150
138
151
139
1. In the **Body** field, enter this text with a trailing space:
152
140
153
-
`Travel time:`
141
+
`Travel time:`
154
142
155
-
While your cursor appears in the **Body** field,
143
+
While your cursor appears in the **Body** field,
156
144
the dynamic content list stays open so that you can
157
145
select any parameters that are available at this point.
158
146
@@ -187,9 +175,9 @@ so save your work often.
187
175
<!-- markdownlint-disable MD038 -->
188
176
1. After the expression resolves, add this text with a leading space: ` minutes`
@@ -282,19 +270,36 @@ Your finished logic app now looks like this example:
282
270
283
271

284
272
285
-
## Test your work
273
+
## Test your workflow
286
274
287
-
On the designer toolbar, select **Run** > **Run**. If all the scoped actions succeed,
288
-
you get a "Scope succeeded" message. If any scoped actions don't succeed,
289
-
you get a "Scope failed" message.
275
+
On the designer toolbar, select **Run** > **Run**. If all the scoped actions succeed, you get a **Scope succeeded** message. If any scoped actions don't succeed, you get a **Scope failed** message.
290
276
291
277
<a name="scopes-json"></a>
292
278
293
279
## JSON definition
294
280
295
-
If you're working in code view, you can define a scope structure
296
-
in your logic app's JSON definition instead. For example,
297
-
here is the JSON definition for trigger and actions in the previous logic app:
281
+
If you're working in code view, you can define a scope in your workflow's JSON definition instead. The following sample shows the definition for a basic scope:
282
+
283
+
```json
284
+
{
285
+
"actions": {
286
+
"Scope": {
287
+
"type": "Scope",
288
+
"actions": {
289
+
"Http": {
290
+
"inputs": {
291
+
"method": "GET",
292
+
"uri": "https://www.bing.com"
293
+
},
294
+
"runAfter": {},
295
+
"type": "Http"
296
+
}
297
+
}
298
+
}
299
+
}
300
+
}
301
+
302
+
The following example shows the JSON definition for the trigger and actions in the preceding workflow:
298
303
299
304
``` json
300
305
"triggers": {
@@ -305,10 +310,7 @@ here is the JSON definition for trigger and actions in the previous logic app:
305
310
"interval": 1
306
311
}
307
312
}
308
-
}
309
-
```
310
-
311
-
```json
313
+
},
312
314
"actions": {
313
315
"If_scope_failed": {
314
316
"type": "If",
@@ -446,7 +448,7 @@ here is the JSON definition for trigger and actions in the previous logic app:
446
448
},
447
449
```
448
450
449
-
## Next steps
451
+
## Related content
450
452
451
453
*[Run steps based on a condition (condition action)](../logic-apps/logic-apps-control-flow-conditional-statement.md)
452
454
*[Run steps based on different values (switch action)](../logic-apps/logic-apps-control-flow-switch-statement.md)
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-limits-and-config.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ The following table lists the values that apply to a single workflow definition
46
46
|`description` - Maximum length | 256 characters ||
47
47
|`parameters` - Maximum number of parameters per workflow | - Consumption: 50 parameters <br><br>- Standard: 500 parameters ||
48
48
|`outputs` - Maximum number of outputs | 10 outputs ||
49
-
|`trackedProperties` - Maximum number of characters | 8,000 characters ||
49
+
|`trackedProperties` - Maximum number of characters | 8,000 characters | Each action supports a JSON object named `trackedProperties` that you can use to specify certain action inputs or outputs to emit from your workflow and include in diagnostic telemetry. For more information, see [Monitor and collect diagnostic data for workflows](monitor-workflows-collect-diagnostic-data.md#tracked-properties). |
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-workflow-actions-triggers.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -547,10 +547,15 @@ For more information plus examples for this trigger, see [Create and schedule re
547
547
548
548
This trigger makes your logic app callable by creating an endpoint that can accept incoming requests. For this trigger, provide a JSON schema that describes and validates the payload or inputs that the trigger receives from the incoming request. The schema also makes trigger properties easier to reference from later actions in the workflow.
549
549
550
+
> [!NOTE]
551
+
>
552
+
> The original name for the **Request** trigger was **manual**, which might still appear in some places. This
553
+
> name changed to create more consistency around the kind of workflow pattern that you use the trigger to build.
554
+
550
555
To call this trigger, you must use the `listCallbackUrl` API, which is described in the [Workflow Service REST API](/rest/api/logic/workflows). To learn how to use this trigger as an HTTP endpoint, see [Call, trigger, or nest workflows with HTTP endpoints](../logic-apps/logic-apps-http-endpoint.md).
551
556
552
557
```json
553
-
"manual": {
558
+
"Request": {
554
559
"type": "Request",
555
560
"kind": "Http",
556
561
"inputs": {
@@ -599,7 +604,7 @@ To call this trigger, you must use the `listCallbackUrl` API, which is described
599
604
This trigger specifies that an incoming request must use the HTTP POST method to call the trigger and includes a schema that validates input from the incoming request:
Copy file name to clipboardExpand all lines: articles/logic-apps/monitor-workflows-collect-diagnostic-data.md
+28-7Lines changed: 28 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,7 +360,15 @@ If you don't specify this custom tracking ID, Azure automatically generates this
360
360
361
361
### Tracked properties
362
362
363
-
Actions have a **Tracked Properties** section where you can specify a custom property name and value by entering an expression or hardcoded value to track specific inputs or outputs, for example:
363
+
Each action has a **Tracked Properties** section where you can specify the name and value for a custom property by entering an expression or hardcoded value to track specific inputs or outputs that you want to emit from your workflow and include in diagnostic telemetry.
364
+
365
+
- Tracked properties aren't allowed on a trigger or action that has secure inputs, secure outputs, or both. They're also not allowed to reference another trigger or action that has secure inputs, secure outputs, or both.
366
+
367
+
- Tracked properties can track only a single action's inputs and outputs, but you can use the `correlation` properties of events to correlate across actions in a workflow run.
368
+
369
+
- Tracked properties can only reference the parameters, inputs, and outputs for its own trigger or action.
370
+
371
+
Based on whether you have a Consumption or Standard logic app workflow, the following screenshots where you can find the **Tracked Properties** section on an action:
364
372
365
373
### [Consumption](#tab/consumption)
366
374
@@ -372,11 +380,24 @@ Actions have a **Tracked Properties** section where you can specify a custom pro
372
380
373
381
---
374
382
375
-
Tracked properties can track only a single action's inputs and outputs, but you can use the `correlation` properties of events to correlate across actions in a workflow run.
376
-
377
-
Tracked properties can only reference the parameters, inputs, and outputs for its own trigger or action.
378
-
379
-
Tracked properties aren't allowed on a trigger or action that has secure inputs, secure outputs, or both. They're also not allowed to reference another trigger or action that has secure inputs, secure outputs, or both.
383
+
In your workflow's underlying JSON definition, the JSON object is named `trackedProperties` and appears as a sibling to the action's `type` and `runAfter` properties, for example:
384
+
385
+
```json
386
+
{
387
+
"Http": {
388
+
"inputs": {
389
+
"method": "GET",
390
+
"uri": "https://www.bing.com"
391
+
},
392
+
"runAfter": {},
393
+
"type": "Http",
394
+
"trackedProperties": {
395
+
"responseCode": "@action().outputs.statusCode",
396
+
"uri": "@action().inputs.uri"
397
+
}
398
+
}
399
+
}
400
+
```
380
401
381
402
The following examples show where custom properties appear in your Log Analytics workspace:
382
403
@@ -402,7 +423,7 @@ The custom tracking ID appears in the **ClientTrackingId** column and tracked pr
402
423
403
424
---
404
425
405
-
## Next steps
426
+
## Related content
406
427
407
428
*[Create monitoring and tracking queries](create-monitoring-tracking-queries.md)
408
429
*[Monitor B2B messages with Azure Monitor Logs](monitor-b2b-messages-log-analytics.md)
0 commit comments