I am trying to have some durable functions defined in separate projects, as I want to start them as suborchestrations from a root orchestration in my 'root project'.
However, it seems the actual Functions are not found, as they are part of the external project. Is this is known limitation? (I could not find this documented)
The exception that is thrown is the following: The function 'TestFunction' doesn't exist, is disabled, or is not an orchestrator function. Additional info: No orchestrator functions are currently registered!
For your interest, some code (but nothing special):
Functions project
[FunctionName("TestFunction_HttpStart")]
public static async Task<HttpResponseMessage> HttpStart(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")]
HttpRequestMessage req,
[OrchestrationClient] IDurableOrchestrationClient starter,
ILogger log)
{
// Function input comes from the request content.
string instanceId = await starter.StartNewAsync("TestFunction", null);
log.LogInformation($"Started orchestration with ID = '{instanceId}'.");
return starter.CreateCheckStatusResponse(req, instanceId);
}
Referenced project
public class FunctionDefinitions
{
[FunctionName("TestFunction")]
public static async Task<List<string>> RunOrchestrator(
[OrchestrationTrigger] IDurableOrchestrationContext context)
{
var outputs = new List<string>();
// Replace "hello" with the name of your Durable Activity Function.
outputs.Add(await context.CallActivityAsync<string>("TestFunction_Hello", "Tokyo"));
outputs.Add(await context.CallActivityAsync<string>("TestFunction_Hello", "Seattle"));
outputs.Add(await context.CallActivityAsync<string>("TestFunction_Hello", "London"));
// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
return outputs;
}
[FunctionName("TestFunction_Hello")]
public static async Task<string> SayHello([ActivityTrigger] string name, ILogger log)
{
log.LogInformation($"Saying hello to {name}.");
return $"Hello {name}!";
}
}