Azure-functions-durable-extension: SignalEntityAsync error when multiple parameters are declared on any method on Entity

Created on 4 Aug 2019  路  2Comments  路  Source: Azure/azure-functions-durable-extension

[2.0.0-beta1]

Given the following Entity interface

public interface ITestEntity
{
    void Foo(DateTime timeStamp, string reason);
    void Bar(DateTime timeStamp, string reason);
}
   await client.SignalEntityAsync<ITestEntity>(target, proxy =>
   proxy.Foo(e.OccurredAt, "test_reason"));

error :
System.Private.CoreLib: Exception while executing function: TestFunction. Microsoft.Azure.WebJobs.Extensions.DurableTask: Only a single argument can be used for operation input.


If I modify the interface to remove the second parameter in the Foo method it still fails with the same error

public interface ITestEntity
{
    void Foo(DateTime timeStamp);
    void Bar(DateTime timeStamp, string reason);
}
   await client.SignalEntityAsync<ITestEntity>(target, proxy =>
   proxy.Foo(e.OccurredAt));

If I modify the interface again to remove the second parameter in the Bar method, the Foo method is called and completed as expected, _despite the Bar method never being called in my code._

public interface ITestEntity
{
    void Foo(DateTime timeStamp);
    void Bar(DateTime timeStamp);
}

Conclusion

I don't know if not supporting multiple parameters is by design or a bug, but there is nothing in the docs that indicates you can't use multiple arguments.

Also, the error message is not descriptive enough. It should suggest that you review all Entity methods to check for multiple parameters (if this is the intended behaviour)

bug documentation

Most helpful comment

Thanks for this feedback, I've created a PR to update the documentation here (unfortunately, I'm required to submit docs changes through a private docs repo): https://github.com/MicrosoftDocs/azure-docs-pr/pull/84268

All 2 comments

Thanks for this feedback, I've created a PR to update the documentation here (unfortunately, I'm required to submit docs changes through a private docs repo): https://github.com/MicrosoftDocs/azure-docs-pr/pull/84268

This is now documented here

Was this page helpful?
0 / 5 - 0 ratings