workflow-core
workflow-core copied to clipboard
ActivityResult useless events processing
Hello, I'm wondering why this piece of code is executed in case of events of type ActivityResult that matches one and only one Subscription (and viceversa, the Subscription should be matched with one and only one ActivityResult event).
https://github.com/danielgerlag/workflow-core/blob/a74727969e005dee6b4115ab4a18581b23d587b9/src/WorkflowCore/Services/BackgroundTasks/EventConsumer.cs#L99
It does useless processing and it can possibly match wrong ActivityResult for a Subscription.
My suggestion is to wrap that cycle in an if statement
if (!(evt.EventData is ActivityResult)) ...