Skip to content

Commit 5a8f30b

Browse files
author
ecfan
committed
Draft updates
1 parent a71f8a1 commit 5a8f30b

File tree

3 files changed

+39
-62
lines changed

3 files changed

+39
-62
lines changed

articles/logic-apps/error-exception-handling.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,13 @@ For the exponential interval retry policy, the following table shows the general
187187

188188
## Manage the "run after" behavior
189189

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**.
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.
191191

192-
By default, an action that you add in the designer only *runs after* the preceding action completes with **Succeeded** status. This "run after" behavior precisely specifies the run order for actions in a workflow. Basically, the predecessor action must first finish with any of the permitted statuses before the successor action can run.
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.
193193

194-
You can change the default "run after" behavior for an action by [editing the action's **Run after** setting](#change-run-after-designer). In an action's underlying JSON definition, the `runAfter` 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.
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 sucessfully 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.
195197

196198
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:
197199

@@ -205,11 +207,7 @@ For example, to have an action run after action A succeeds and also after action
205207
}
206208
```
207209

208-
> [!NOTE]
209-
>
210-
> The **Run after** setting is available only on actions that follow the first action in a workflow.
211-
> The first action in a workflow must always run after the trigger, so the **Run after** setting
212-
> doesn't apply and isn't available for the first action.
210+
### "Run after" behavior for error handling
213211

214212
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**.
215213

@@ -219,11 +217,6 @@ To make sure that an action can still run despite its predecessor's status, you
219217

220218
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.
221219

222-
> [!NOTE]
223-
>
224-
> In the designer, the "run after" setting doesn't apply to the action that immediately
225-
> follows the trigger. The trigger must successfully run before the first action can run.
226-
227220
<a name="change-run-after-designer"></a>
228221

229222
### Change "run after" behavior in the designer
@@ -236,7 +229,7 @@ For example, to run the Office 365 Outlook **Send an email** action after the Ex
236229

237230
- **Standard**
238231

239-
1. Under **Workflows**, select **Workflows**.
232+
1. On the resource sidebar, under **Workflows**, select **Workflows**.
240233

241234
1. From the **Workflows** page, select your workflow.
242235

articles/logic-apps/logic-apps-control-flow-run-steps-group-scopes.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ ms.date: 06/21/2024
1212

1313
[!INCLUDE [logic-apps-sku-consumption](~/reusable-content/ce-skilling/azure/includes/logic-apps-sku-consumption.md)]
1414

15-
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).
2416

2517
To check a scope's status, you can use the same criteria
2618
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
4335

4436
## Prerequisites
4537

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).
4739

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.
5041

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.
5443

55-
* A Bing Maps key. To get this key, see
56-
<a href="/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).
5745

5846
* Basic knowledge about [logic apps](../logic-apps/logic-apps-overview.md)
5947

@@ -282,19 +270,36 @@ Your finished logic app now looks like this example:
282270
283271
![Finished logic app with scope](./media/logic-apps-control-flow-run-steps-group-scopes/scopes-overview.png)
284272
285-
## Test your work
273+
## Test your workflow
286274
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.
290276
291277
<a name="scopes-json"></a>
292278
293279
## JSON definition
294280
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:
298303
299304
``` json
300305
"triggers": {
@@ -305,10 +310,7 @@ here is the JSON definition for trigger and actions in the previous logic app:
305310
"interval": 1
306311
}
307312
}
308-
}
309-
```
310-
311-
```json
313+
},
312314
"actions": {
313315
"If_scope_failed": {
314316
"type": "If",
@@ -446,7 +448,7 @@ here is the JSON definition for trigger and actions in the previous logic app:
446448
},
447449
```
448450

449-
## Next steps
451+
## Related content
450452

451453
* [Run steps based on a condition (condition action)](../logic-apps/logic-apps-control-flow-conditional-statement.md)
452454
* [Run steps based on different values (switch action)](../logic-apps/logic-apps-control-flow-switch-statement.md)

articles/logic-apps/update-workflow-definition-language-schema.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@ The [latest Workflow Definition Language schema version June-01-2016](https://sc
1616

1717
* [Scopes](#scopes) let you group or nest actions as a collection of actions.
1818
* [Conditions and loops](#conditions-loops) are first-class actions.
19-
* More precise ordering for running actions with the `runAfter` property, replacing `dependsOn`
2019

2120
To upgrade older workflow definitions to the current schema, see [Upgrade your schema](#upgrade-your-schema).
2221

2322
<a name="scopes"></a>
2423

2524
## Scopes
2625

27-
This schema includes scopes, which let you group actions together, or nest actions inside each other. For example, a condition can contain another condition. Learn more about [scope syntax](./logic-apps-control-flow-loops.md),
28-
or review this basic scope example:
26+
This schema includes scopes, which let you group actions together, or nest actions inside each other. For example, a condition can contain another condition. Learn more about [scope syntax](logic-apps-control-flow-run-steps-group-scopes.md), or review this basic scope example:
2927

3028
```json
3129
{
@@ -77,22 +75,6 @@ In previous schema versions, conditions and loops were parameters associated wit
7775
}
7876
```
7977

80-
<a name="run-after"></a>
81-
82-
## 'runAfter' property
83-
84-
The `runAfter` property replaces `dependsOn`, providing more precision when you specify the run order for actions based on the status of previous actions. The `dependsOn` property indicated whether "the action ran and was successful", based on whether the previous action succeeded, failed, or as skipped - not the number of times you wanted to run the action. The `runAfter` property provides flexibility as an object that specifies all the action names after which the object runs. This property also defines an array of statuses that are acceptable as triggers. For example, if you want an action to run after action A succeeds and also after action B succeeds or fails, set up this `runAfter` property:
85-
86-
```json
87-
{
88-
// Other parts in action definition
89-
"runAfter": {
90-
"A": ["Succeeded"],
91-
"B": ["Succeeded", "Failed"]
92-
}
93-
}
94-
```
95-
9678
## Other changes
9779

9880
### Renamed 'manual' trigger to 'request' trigger

0 commit comments

Comments
 (0)