简体   繁体   English

Azure Functions Durable Orchestrator 可以调用不是活动触发器的方法吗?

[英]Can Azure Functions Durable Orchestrator call methods that aren't activity triggers?

I have some functionality in an azure durable function that requires the use of generic params.我在 azure 耐用 function 中有一些功能,需要使用通用参数。 Since activity triggers don't support the use of generic params, I wrote the function as a non-async static method and called it directly from the orchestrator.由于活动触发器不支持使用通用参数,我将 function 编写为非异步 static 方法,并直接从协调器调用它。 I am not receiving an error, but I am seeing the warning Activity function named [myMethodName] does not exist. Did you mean [someActivityFunction]?我没有收到错误消息,但我看到Activity function named [myMethodName] does not exist. Did you mean [someActivityFunction]? Activity function named [myMethodName] does not exist. Did you mean [someActivityFunction]?

Does this imply that I should not call my static method from the orchestrator?这是否意味着我不应该从协调器调用我的 static 方法?

If I cannot use code isn't an activity trigger, how can I call a generic method within my durable function?如果我不能使用代码不是活动触发器,我如何在我的持久 function 中调用通用方法?

As per documentation here , Orchestrators either call Sub Orchestrators or ActivityTriggers, my workaround is have the other logicI wanted to perform inside an ActivityTrigger then use it from the Main Orchestrator.根据此处的文档,Orchestrator 可以调用 Sub Orchestrator 或 ActivityTriggers,我的解决方法是拥有我想在 ActivityTrigger 中执行的其他逻辑,然后从 Main Orchestrator 中使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM