0

I am trying to implement a durable function with few sequential and parallel activity functions.

Here is my Orchestrator is

    [FunctionName("Orchestration")]
    public static async Task<List<string>> RunOrchestrator(
        [OrchestrationTrigger] IDurableOrchestrationContext context)
    {
        var outputs = new List<string>();
        var data = context.GetInput<OrchestrationInput>();
        // Replace "hello" with the name of your Durable Activity Function.
        outputs.Add(await context.CallActivityAsync<string>("ConfigMetadata", data.Payload));
        outputs.Add(await context.CallActivityAsync<string>("ObjectMetadata", "Seattle"));
        outputs.Add(await context.CallActivityAsync<string>("Versioning", "London"));

        // returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
        return outputs;
    }

So initially when I call the http trigger function from postman it got hit obviously, but due to some error I stopped the debugging.

Then whenever I execute (Debug) the function again, above orchestrator function triggers and calling the activity functions without even calling the http trigger.

So I guess its because of some queue in history. So is there is any way to get rid of this issue every time I start the debugging. So when I start it must be a fresh queue.

Please help

4

1 Answer 1

1
  • As suggested by @user1672994 to start orchestrator function with a fresh queue you can use Azure Core tools for purging the orchestration instance state.

  • Install the Azure core tools first in your particular Azure function version, below is the NPM package manager for installing Azure Core tools

npm install -g azure-functions-core-tools@3
  • As azure core tools require your function host.json file open the command prompt in root directory to identify your orchestration functions.
func durable 
  • Below is the command for purging instance history
func durable purge-history
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.