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

Support serialization of non(de)serializable values #4356

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Aug 23, 2023

=== auto-pr-body ===

Summary:
This pull request updates the logic for setting up persistence for the EF Core database provider. It also adds a new class SafeDictionaryConverter and updates the BasicSerializationProvider class.

List of changes:

  • Updated OnSaveAsync() and OnLoadAsync() to use the IActivityStateSerializer interface and JsonSerializer, respectively.
  • Added a new class SafeDictionaryConverter that safely serializes a dictionary of objects, even if some of the objects are not serializable.
  • Added a new class SafeDictionaryConverterFactory that creates instances of SafeDictionaryConverter.
  • Updated BasicSerializationProvider to add the SafeDictionaryConverterFactory to the list of converters, and to enable reference handling.
  • Changed the EF Core workflow instance and management persistence feature methods to use Elsa database options.
  • Updated the workflow management feature and EF Core workflow management persistence feature names.
  • Added logic to the activity execution log store to save activity execution records to the database.

Refactoring Target:

  • Refactor OnSaveAsync() and OnLoadAsync() into a single method to improve code readability.
  • Refactor exception handling for the PolymorphicObjectConverter for robustness.

@sfmskywalker sfmskywalker merged commit a02bacb into v3 Aug 23, 2023
2 checks passed
@sfmskywalker sfmskywalker deleted the v3-serialization-fixes branch August 23, 2023 18:56
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