Skip to content

Start an orchestration trigger from another orchestration trigger #2005

Answered by cgillum
amalea asked this question in Q&A
Discussion options

You must be logged in to vote

It's not possible to directly chain orchestrations like this. Can you explain why you want to chain them without sub-orchestrations?

Or do you simply want to refactor your code into multiple methods? You can certainly pass the context object to other methods if you want. The runtime doesn't care how you factor your code - it will still be interpreted as a single orchestration. For example, you can do this:

public class A
{
    [FunctionName(nameof(ProvCalloutOrchestrator))]
    public async Task ProvCalloutOrchestrator(
        [OrchestrationTrigger] IDurableOrchestrationContext ctx,
        ILogger log)
    {
          var result = await new B(some params).DoSomething(ctx, log);
          

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@amalea
Comment options

Answer selected by cgillum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants