-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove Persistence of Completed Activity Execution Contexts #4869
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The cancellation process in ActivityExecutionContext has been updated to now use DisposeAsync() instead of Dispose(). This implements asynchronous disposal of the cancellation registration. Additionally, a new method supporting cancellation has been added.
The code has been restructured to account for cases where there is no activity execution context available. Instead of breaking the loop in such cases, the variables are derived from the memory blocks. Also, there is minor code formatting in output handling and array conversion for async enumerables.
Introduces a safeguard in the JintJavaScriptEvaluator in the Elsa.JavaScript module. This checks whether a workflow execution context can be retrieved before trying to get its input definitions. This prevents potential errors when the context isn't available.
The commit removes unnecessary namespaces in the integration tests for JavaScript Lists and Arrays within the Elsa project. This results in a cleaner codebase, maintaining only the libraries required for the specific tests.
The updated code cleans the child contexts of any completed contexts from the list of workflows currently in execution. This change reduces the clutter and potential complications in the context management process. Previously, the unnecessary child contexts were being stored even after the parent context has been completed.
Updated the QuartzWorkflowScheduler in Elsa to prevent duplicate job scheduling. Before scheduling a job, the existence of the job is now checked first. This change has been applied to all job types - timestamp, simple schedule, and cron jobs.
Removed manual removal of child contexts from the list of active activity execution contexts. Replaced it with more efficient direct filtering of not completed activity execution contexts. This change may affect scripts that access activity output directly, but a variable capturing workaround is provided.
The term 'Unschedule' has been included to the UserDictionary within the Elsa solution settings. This update shows that 'Unschedule' is recognized in the context of the solution, thereby reducing the risk of related typographical errors.
sfmskywalker
requested review from
cristinamudura,
MariusVuscanNx and
raymonddenhaan
February 2, 2024 21:01
sfmskywalker
added
breaking
Implementation requires an API-breaking change/major version increment
elsa 3
This issue is specific to Elsa 3
enhancement
New feature or request
labels
Feb 2, 2024
cristinamudura
approved these changes
Feb 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking
Implementation requires an API-breaking change/major version increment
elsa 3
This issue is specific to Elsa 3
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an optimization to the workflow instance storage by eliminating the need to persist completed activity execution contexts. This change leverages the previously introduced
ActivityExecutionRecord
storage, which has made the persistence of these contexts redundant. The primary reason for retaining completed activity execution contexts was to facilitate direct access to activity outputs. However, this requirement is now addressed through a recommended workaround that involves capturing activity outputs using variables.The benefits of this optimization include:
By adopting this change, we aim to streamline workflow execution and management, focusing on efficiency and performance improvements.