2

So I'm aware in durable functions that when an activity function gets called, the current durable function essentially stops and it waits to start over. My question is how does the original durable function exit? I've done some debugging, and no exception is thrown nor is a value returned. How does it exit?

   [FunctionName("DurableFunction")]
    public static async Task Durable([OrchestrationTrigger] IDurableOrchestrationContext context, ILogger log)
    {
        try
        {
            using (DisposeObject t = new DisposeObject("We created a new context", log))
            {
                string s = context.GetInput<string>();
                string result = await context.CallActivityAsync<string>("ActivityFunction", s);
                log.LogInformation(result);
            }
        }
        catch (Exception e)
        {
            Console.WriteLine(e.ToString());
        }
        finally
        {
            Console.WriteLine("When does this get hit?");
        }
    }

For example, in this example, do disposable object never gets disposed until the end? Is there a way to check when we start a new function?

idude
  • 4,654
  • 8
  • 35
  • 49

0 Answers0