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

Fix FlowJoin Activity NRE Bug #5349

Merged
merged 5 commits into from
May 8, 2024
Merged

Fix FlowJoin Activity NRE Bug #5349

merged 5 commits into from
May 8, 2024

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented May 7, 2024

This PR fixes #5348

The relevant changes for the fix are found in FlowJoin.cs. All other changes were made to cater to the component test running successfully, regardless of the configured service bus broker in the "program under test".

This commit modifies the way flowScope is retrieved within the FlowJoin activity in Elsa.Workflows.Core. Instead of directly calling GetProperty, a fallback value is now being provided in case the desired property is not found. This reduces the risk of null reference exceptions.
Two new files have been created to facilitate component testing for the FlowJoins scenarios in the Elsa Workflows. The `Tests.cs` file includes a Fact to validate the successful execution of a Flowchart with a single FlowJoin. The `Workflows.cs` file defines a single join workflow for these tests.
Added RabbitMq to Infrastructure.cs for component testing, allowing both RabbitMqContainer and DbContainer to start and stop asynchronously. Also, adjusted WorkflowServer.cs to configure RabbitMq mass transit alongside existing PostgreSql support, aiming to improve testing robustness and coverage.
Move the implementation of AddNotificationHandler<RemoveOrphanedSubscriptions>() from the notifier block to the singleton section in AzureServiceBusFeature.cs. This will help keep all service registration related to notifications in one place.
@sfmskywalker sfmskywalker requested review from a team May 7, 2024 16:54
@sfmskywalker sfmskywalker merged commit 6a0f74e into main May 8, 2024
5 of 6 checks passed
@sfmskywalker sfmskywalker deleted the bug/5348 branch May 8, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] FlowJoin Activity Throws NullReferenceException Without Previous Forks
3 participants