[英]Is it fine to call activity functions from private methods in a Durable Function orchestrator?
[英]Can Azure Functions Durable Orchestrator call methods that aren't activity triggers?
我在 azure 耐用 function 中有一些功能,需要使用通用參數。 由於活動觸發器不支持使用通用參數,我將 function 編寫為非異步 static 方法,並直接從協調器調用它。 我沒有收到錯誤消息,但我看到Activity function named [myMethodName] does not exist. Did you mean [someActivityFunction]?
Activity function named [myMethodName] does not exist. Did you mean [someActivityFunction]?
這是否意味着我不應該從協調器調用我的 static 方法?
如果我不能使用代碼不是活動觸發器,我如何在我的持久 function 中調用通用方法?
根據此處的文檔,Orchestrator 可以調用 Sub Orchestrator 或 ActivityTriggers,我的解決方法是擁有我想在 ActivityTrigger 中執行的其他邏輯,然后從 Main Orchestrator 中使用它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.