Orchestrator function failed: The activity function failed: "Unable to resolve function name"

1.2k views Asked by At

I have a working azure functions app where I added a sub-orchestrator with activity functions inside. The rest of the app is working just fine, but not the added code. From the logs, I can see that the sub-orchestrator is reached, but when it tries to hit the activity function, it throws the error below.

Function 'TestActivity (Orchestrator)' failed with an error. Reason: Microsoft.Azure.WebJobs.FunctionFailedException: The activity function 'GetStringInput' failed: "Unable to resolve function name 'GetStringInput'.". See the function execution logs for additional details. ---> System.InvalidOperationException: Unable to resolve function name 'GetStringInput'. at Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.FunctionInstanceLogger.d__6.MoveNext() in C:\projects\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\Diagnostics\FunctionInstanceLogger.cs:line 80

Here's the client orchestrator:

[FunctionName(FUNC_INITIALIZE)]
public static async Task<HttpResponseMessage> InitializeAsync(HttpRequestMessage req,
            [OrchestrationClient(TaskHub = "%Name%")]
            DurableOrchestrationClientBase client,
            ILogger logger)
{
  var body = new BodyObject {Something:"inside"};
  var instance_id = await client.StartNewAsync(FUNC_RELEASE, body);
  return req.CreateResponse(HttpStatusCode.Accepted);
}

Orchestrator:

[FunctionName(FUNC_RELEASE)]
public static async Task<string> Release(
                                   [OrchestrationTrigger]  DurableOrchestrationContextBase ctx,
                                   ILogger log)
{
  var ctx_obj = ctx.GetInput<BodyObject>();
  var response = await ctx.CallSubOrchestratorAsync<int>(FUNC_ORCHESTRATE_MORE, JsonConvert.SerializeObject(ctx_json));
  //do stuff with response
  return new ResultObject = {Result:"response"};
}

Another Orchestrator:

[FunctionName(FUNC_ORCHESTRATE_MORE)]
public static async Task<string> OrchestrateMore(
                                   [OrchestrationTrigger]  
                                   DurableOrchestrationContextBase ctx,
                                   ILogger log)
{
  var input = ctx.GetInput<string>();
  //do stuff
  var inpu_json = JsonConvert.SerilializeObject(input);
  var response = await ctx.CallActivityAsync<int>(FUNC_ACTIVITY, input_json);
  //do stuff with response
  return JsonConvert.SerializeObject(new ResultObject = {Result:"response"});
}

Activity

[FunctionName(FUNC_ACTIVITY)]
public static async Task<string> DoingActivity(
                                   [ActivityTrigger]  string input,
                                   ILogger log)
{
  //do stuff with input
  return string_of_info;
}

From the portal, I can see that the activity functions exist and are enabled. Changing the signature of the activity functions to use the type DurableActivityContext yielded the same results. Submitting the request from inside the portal itself yielded a 404 not found error only on the activities added, not on existing activities.

Other info:

.NET 472,
Microsoft.Azure.WebJobs v2.3.0,
Microsoft.Azure.WebJobs.Http v1.2.0,
Microsoft.Azure.WebJobs.Extensions.DurableTask v1.8.4
Microsoft.Azure.WebJobs.ServiceBus v2.2.0
Microsoft.NET.Sdk.Functions v1.0.29

App is being deployed through Azure DevOps.

Any help would be much appreciated!

0

There are 0 answers