Skip to content

Commit b8b628b

Browse files
authored
Merge pull request #12755 from AbhishekTripathi/patch-1
Updated for brevity and link to precompiled samples
2 parents 0ade4d7 + d95ddd1 commit b8b628b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/azure-functions/durable-functions-overview.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The primary use case for Durable Functions is simplifying complex, stateful coor
3939

4040
Durable Functions allows you to implement this pattern concisely in code.
4141

42-
#### C#
42+
#### C# script
4343

4444
```cs
4545
public static async Task<object> Run(DurableOrchestrationContext ctx)
@@ -57,6 +57,8 @@ public static async Task<object> Run(DurableOrchestrationContext ctx)
5757
}
5858
}
5959
```
60+
> [!NOTE]
61+
> There are subtle differences while writing a precompiled durable function in C# vs the C# script sample shown before. A C# precompiled function would require durable parameters to be decorated with respective attributes. An example is `[OrchestrationTrigger]` attribute for `DurableOrchestrationContext` parameter. If the parameters are not properly decorated, the runtime would not be able to inject the variables to the function and would give error. Please visit [sample](https://github.com/Azure/azure-functions-durable-extension/blob/master/samples) for more examples.
6062
6163
#### JavaScript (Functions v2 only)
6264

@@ -83,7 +85,7 @@ The `ctx` parameter ([DurableOrchestrationContext](https://azure.github.io/azure
8385

8486
With normal functions, fanning out can be done by having the function send multiple messages to a queue. However, fanning back in is much more challenging. You'd have to write code to track when the queue-triggered functions end and store function outputs. The Durable Functions extension handles this pattern with relatively simple code.
8587

86-
#### C#
88+
#### C# script
8789

8890
```cs
8991
public static async Task Run(DurableOrchestrationContext ctx)
@@ -198,7 +200,7 @@ An example would be reversing the earlier async HTTP API scenario. Instead of ex
198200

199201
Using Durable Functions, multiple monitors that observe arbitrary endpoints can be created in a few lines of code. The monitors can end execution when some condition is met, or be terminated by the [DurableOrchestrationClient](durable-functions-instance-management.md), and their wait interval can be changed based on some condition (i.e. exponential backoff.) The following code implements a basic monitor.
200202

201-
#### C#
203+
#### C# script
202204

203205
```cs
204206
public static async Task Run(DurableOrchestrationContext ctx)
@@ -266,7 +268,7 @@ One example of a business process that involves human interaction is an approval
266268

267269
This pattern can be implemented using an orchestrator function. The orchestrator would use a [durable timer](durable-functions-timers.md) to request approval and escalate in case of timeout. It would wait for an [external event](durable-functions-external-events.md), which would be the notification generated by some human interaction.
268270

269-
#### C#
271+
#### C# script
270272

271273
```cs
272274
public static async Task Run(DurableOrchestrationContext ctx)

0 commit comments

Comments
 (0)