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 Default Workflow Runtime Race condition #4362

Merged
merged 4 commits into from
Aug 24, 2023

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Aug 24, 2023

This PR fixes race condition that can occur if a new workflow instance is started and is resumed in the meantime, e.g. as a side effect of the workflow executing and triggering external events, which in turn trigger workflow bookmarks.

=== auto-pr-body ===

Summary:

  • Added support for IDictionary<string, object?>? for ActivityState, Payload, and Outputs in ActivityExecutionRecord class
  • Updated AnswerCallBase to use Input<string>(CallControlId) and context.GetPrimaryCallControlId
  • Updated BridgeCallsBase to use Input<string>(CallControlIdA and CallControlIdB) and context.GetSecondaryCallControlId
  • Updated GatherUsingAudio to use Input<string>(CallControlId) and context.GetPrimaryCallControlId

List of Changes:

  • Changed the signature of the CallControlId input from string? to string in GatherUsingSpeak.cs, HangupCallBase.cs, IncomingCall.cs and PlayAudioBase.cs
  • Added Imports of Elsa.Extensions in HangupCallBase.cs
  • Added the call session ID to the correlation ID in IncomingCall.cs
  • Changed the signature of the CallControlId input from string? to string in SpeakTextBase.cs
  • Updated the code to use the Input extension methods

Refactoring Target:

  • Replace inline exceptions with meaningful and descriptive error messages.
  • Rename CallControlId parameters to more meaningful names (e.g. SourceCallId and DestinationCallId).
  • Consider using a new parent class for activities that requires a CallControlId. This could serve to ensure that all activities that use CallControlId have access to it in the same way.

@sfmskywalker sfmskywalker merged commit 4d37c2a into v3 Aug 24, 2023
2 checks passed
@sfmskywalker sfmskywalker deleted the v3-race-condition-default-runtime branch August 24, 2023 19:41
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.

None yet

1 participant