Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity trigger doesn't support ValueTuple parameter #2995

Open
Bouke opened this issue Dec 11, 2024 · 0 comments
Open

Activity trigger doesn't support ValueTuple parameter #2995

Bouke opened this issue Dec 11, 2024 · 0 comments
Labels
P2 Priority 2

Comments

@Bouke
Copy link

Bouke commented Dec 11, 2024

Description

In order to pass multiple parameters to an activity trigger, it was suggested in the past to use a ValueTuple. However I've found that this doesn't work as JsonSerializer [doesn't support (de)serialising ValueTuple by default][0].

Expected behaviour

Passing ValueTuple as parameters should work.

Actual behaviour

Values are deserialised as null.

Relevant source code snippets

[Function("SayHello")]
public static string SayHello([ActivityTrigger] (string First, string Last) name)
{
    return $"Hello {name.First} {name.Last}!";
}

Known workarounds

  • Configure JsonSerializerOptions.IncludeFields = true
  • Use record parameters instead

App Details

  • Durable Functions extension version (e.g. v1.8.3): 1.2.2
  • Azure Functions runtime version (1.0 or 2.0): v4 (isolated)
  • Programming language used: C#

Screenshots

N/A.

If deployed to Azure

N/A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority 2
Projects
None yet
Development

No branches or pull requests

2 participants