I am able to call azure functions from ADF and postman but when I call durable functions from ADF or postman it gives me error:
Operation on target Azure Function1 failed: Call to provided Azure function '' failed with status-'NotFound' and message - 'Invoking Azure function failed with HttpStatusCode - NotFound.'.
I have tried everything but dont know why this is happening. I have created durable function through portal in functionApp as follow:
DurableFunctionsHttpStart1:
#r "Microsoft.Azure.WebJobs.Extensions.DurableTask"
#r "Newtonsoft.Json"
using System.Net;
public static async Task<HttpResponseMessage> Run(
HttpRequestMessage req,
DurableOrchestrationClient starter,
ILogger log)
{
// Function input comes from the request content.
dynamic eventData = await req.Content.ReadAsAsync<object>();
// Pass the function name as part of the route
string instanceId = await starter.StartNewAsync("DurableFunctionsOrchestrator1", null);
log.LogInformation($"Started orchestration with ID = '{instanceId}'.");
return starter.CreateCheckStatusResponse(req, instanceId);
}
DurableFunctionsOrchestrator1:
/*
* This function is not intended to be invoked directly. Instead it will be
* triggered by an HTTP starter function.
*
* Before running this sample, please:
* - create a Durable activity function (default name is "Hello")
* - create a Durable HTTP starter function
*/
#r "Microsoft.Azure.WebJobs.Extensions.DurableTask"
public static async Task<List<string>> Run(DurableOrchestrationContext context)
{
var outputs = new List<string>();
// Replace "Hello" with the name of your Durable Activity Function.
outputs.Add(await context.CallActivityAsync<string>("Hello1", "Tokyo"));
outputs.Add(await context.CallActivityAsync<string>("Hello1", "Seattle"));
outputs.Add(await context.CallActivityAsync<string>("Hello1", "London"));
// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
return outputs;
}
Hello1:
/*
* This function is not intended to be invoked directly. Instead it will be
* triggered by an orchestrator function.
*
* Before running this sample, please:
* - create a Durable orchestration function
* - create a Durable HTTP starter function
*/
#r "Microsoft.Azure.WebJobs.Extensions.DurableTask"
using System;
using System.Threading;
public static string Run(string name)
{
Thread.Sleep(260000);
return $"Hello {name}!";
}
From ADF side I am calling DurableFunctionsHttpStart1 function, which will call orchestrator function and activity will be called. Please guide