I have an orchestration where the first step is an activity that consumes a feed. This activity does not require any input since the feed url is read from an environment variable.
The line of code of the orchestrator that invokes my activity looks like this
await context.CallActivityAsync("IngestFeedActivity");
My activity function looks like this:
[Function("IngestFeedActivity")]
public async Task IngestDisruptions([ActivityTrigger] TaskOrchestrationContext activityContext)
{
// Activity code goes here
}
However I get this error:
Could not populate the value for 'activityContext' parameter. Consider updating the parameter with a default value
I added a default value of null to the activity context and now everything is working fine. However, this does not seem to be a very elegant solution to the problem and the TaskOrchestrationContext will always be null. Is there a better way of doing this?
You can use below code to achieve this:
Output:
Here i have used null while sending parameter and used
FunctionContext executionContext