C# Orchestrator函数失败:活动函数失败:";无法解析函数名";

C# Orchestrator函数失败:活动函数失败:";无法解析函数名";,c#,azure,azure-functions,azure-durable-functions,C#,Azure,Azure Functions,Azure Durable Functions,我有一个可用的azure functions应用程序,我在其中添加了一个子编排器,其中包含活动函数。应用程序的其余部分工作正常,但添加的代码没有。从日志中,我可以看到子orchestrator已到达,但当它尝试命中activity函数时,会抛出下面的错误 函数“TestActivity(Orchestrator)”失败,出现错误。原因:Microsoft.Azure.WebJobs.FunctionFailedException:活动函数“GetStringInput”失败:“无法解析函数名“G

我有一个可用的azure functions应用程序,我在其中添加了一个子编排器,其中包含活动函数。应用程序的其余部分工作正常,但添加的代码没有。从日志中,我可以看到子orchestrator已到达,但当它尝试命中activity函数时,会抛出下面的错误

函数“TestActivity(Orchestrator)”失败,出现错误。原因:Microsoft.Azure.WebJobs.FunctionFailedException:活动函数“GetStringInput”失败:“无法解析函数名“GetStringInput”。”。有关更多详细信息,请参阅函数执行日志。-->System.InvalidOperationException:无法解析函数名“GetStringInput”。在C:\projects\Azure WebJobs sdk Script\src\WebJobs.Script.WebHost.Diagnostics.FunctionInstanceLogger.d_u6.MoveNext()中的Microsoft.Azure.WebJobs.Script.WebHost\Diagnostics\FunctionInstanceLogger.cs:第80行

以下是客户端编排器:

[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);
}
[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"};
}
[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"});
}
应用程序正在通过Azure DevOps部署


任何帮助都将不胜感激

代码中没有添加任何内容,您正在发送不存在的参数,如“input_json”、“ctx_json”。另外,您定义的函数的签名与您所调用的“任务执行活动”和CallActivityAsync@BassamGamal我根据你的评论编辑了这篇文章。谢谢
[FunctionName(FUNC_ACTIVITY)]
public static async Task<string> DoingActivity(
                                   [ActivityTrigger]  string input,
                                   ILogger log)
{
  //do stuff with input
  return string_of_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