Skip to content

Commit fe06888

Browse files
committed
Add example for starting sub-orchestrations with specific versions
1 parent 854b628 commit fe06888

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

articles/azure-functions/durable/durable-functions-orchestration-versioning.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,24 @@ public static async Task<HttpResponseData> HttpStart(
289289
}
290290
```
291291

292+
You can also start sub-orchestrations with specific versions from within an orchestrator function:
293+
294+
```csharp
295+
[Function("MainOrchestrator")]
296+
public static async Task<string> RunMainOrchestrator(
297+
[OrchestrationTrigger] TaskOrchestrationContext context)
298+
{
299+
var subOptions = new SubOrchestratorOptions
300+
{
301+
Version = "1.0"
302+
};
303+
304+
var result = await context.CallSubOrchestratorAsync<string>("ProcessPaymentOrchestrator", orderId, subOptions);
305+
306+
// ...
307+
}
308+
```
309+
292310
### Removing legacy code paths
293311

294312
Over time, you may want to remove legacy code paths from your orchestrator functions to simplify maintenance and reduce technical debt. However, removing code must be done carefully to avoid breaking existing orchestration instances.

0 commit comments

Comments
 (0)