In Azure Durable Functions, there are times we need to run SubOrchestrations using a specific Instance Id.
As far as I can recall in In Process durable functions, when calling a SubOrchestrator there was a specific overload to specify the instance Id. With Isolated Durable Functions, we do have an overload, but I feel it's not that intuitive, hence this small post.
In .NET Isolated Azure Durable Functions, this is how we can specify
SubOrchestrator InstanceId.
Passing SubOrchestratorOptions |
Here, for TaskOptions, we can pass SubOrchestrationOptions, a derived type of TaskOptions as follows.
await context.CallSubOrchestratorAsync("SubOrchestrator1", new SubOrchestrationOptions
{
InstanceId = "SomeInstanceId",
});
Hope this helps.
Happy Coding.
Regards,
Jaliya
No comments:
Post a Comment