You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is. Please make an effort to fill in all the sections below; the information will help us investigate your issue.
I created a very simple Durable function in isolated mode and tried the Class based activity function. I can see that activity function is generated in the list of registered functions and I can see the function is being triggered but my code was not running.
A clear and concise description of what you expected to happen.
My code in the class based activity function should be executed
Actual behavior
A clear and concise description of what actually happened.
It looks like it is executed but it is not
Relevant source code snippets
// insert code snippet here[DurableTask(nameof(SayHelloClass))]publicclassSayHelloClass:TaskActivity<string,string>{privatereadonlyILogger<SayHelloClass>logger;publicSayHelloClass(ILogger<SayHelloClass>logger){this.logger=logger;}publicoverrideasyncTask<string>RunAsync(TaskActivityContextcontext,stringinput){logger.LogInformation($"Saying {input} back");awaitTask.Delay(200);return$"Hello {input} via Class!";}}publicstaticclassTestDurableFunction{[Function(nameof(TestDurableFunction))]publicstaticasyncTask<List<string>>RunOrchestrator([OrchestrationTrigger]TaskOrchestrationContextcontext){ILoggerlogger=context.CreateReplaySafeLogger(nameof(TestDurableFunction));logger.LogInformation("Saying hello.");varoutputs=newList<string>();// Replace name and input with values relevant for your Durable Functions Activityoutputs.Add(awaitcontext.CallActivityAsync<string>(nameof(SayHello),"Tokyo"));outputs.Add(awaitcontext.CallActivityAsync<string>(nameof(SayHello),"Seattle"));outputs.Add(awaitcontext.CallActivityAsync<string>(nameof(SayHello),"London"));// this shown as executed in the console but the activity function is not executedoutputs.Add(awaitcontext.CallActivityAsync<string>(nameof(SayHelloClass),"There"));// this shown as executed in the console but the activity function is not executedoutputs.Add(awaitcontext.CallSayHelloClassAsync("Blah"));// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]returnoutputs;}[Function(nameof(SayHello))]publicstaticstringSayHello([ActivityTrigger]stringname,FunctionContextexecutionContext){ILoggerlogger=executionContext.GetLogger("SayHello");logger.LogInformation("Saying hello to {name}.",name);return$"Hello {name}!";}[Function("TestDurableFunction_HttpStart")]publicstaticasyncTask<HttpResponseData>HttpStart([HttpTrigger(AuthorizationLevel.Anonymous,"get","post")]HttpRequestDatareq,[DurableClient]DurableTaskClientclient,FunctionContextexecutionContext){ILoggerlogger=executionContext.GetLogger("TestDurableFunction_HttpStart");// Function input comes from the request content.stringinstanceId=awaitclient.ScheduleNewOrchestrationInstanceAsync(nameof(TestDurableFunction));logger.LogInformation("Started orchestration with ID = '{instanceId}'.",instanceId);// Returns an HTTP 202 response with an instance management payload.// See https://learn.microsoft.com/azure/azure-functions/durable/durable-functions-http-api#start-orchestrationreturnawaitclient.CreateCheckStatusResponseAsync(req,instanceId);}}
Known workarounds
Provide a description of any known workarounds you used.
App Details
Durable Functions extension version (e.g. v1.8.3): 1.1.1
Azure Functions runtime version (1.0 or 2.0): 2.0
Programming language used: csharp - .NET 8
Screenshots
If applicable, add screenshots to help explain your problem.
If deployed to Azure
We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate!
Timeframe issue observed:
Function App name:
Function name(s):
Azure region:
Orchestration instance ID(s):
Azure storage account name:
If you don't want to share your Function App or storage account name GitHub, please at least share the orchestration instance ID. Otherwise it's extremely difficult to look up information.
The text was updated successfully, but these errors were encountered:
Hi @nvhoanganh thanks for reporting this. Does your orchestration work correctly (including the type-safe invocation at the end) if you define the activity as a normal function instead of a class? I want to confirm whether that source-generator pattern is working or if it's also being affected.
Description
I created a very simple Durable function in isolated mode and tried the Class based activity function. I can see that activity function is generated in the list of registered functions and I can see the function is being triggered but my code was not running.
Here is the minimum repo https://github.com/nvhoanganh/AzureFuncDurableDotNet8/blob/main/TestDurableFunction.cs
Expected behavior
Actual behavior
Relevant source code snippets
Known workarounds
App Details
Screenshots
If deployed to Azure
The text was updated successfully, but these errors were encountered: