-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Dynamic Expression Evaluation for Log Persistence Mode (#6159)
* Add log persistence configuration and strategy evaluation Introduced `LogPersistenceConfiguration` to support dynamic strategy and expression-based log persistence evaluations. Updated `Default default values. * Add LogPersistenceConfiguration and enum support Introduced LogPersistenceConfiguration class and LogPersistenceEvaluationMode enum in both Elsa.Api.Client and Elsa.Workflows.Runtime. Updated JavaScript services to handle enums correctly and register LogPersistenceMode. * Rename log persistence key for consistency Updated the log persistence key from `LogPersistenceStrategyKey` to `LogPersistenceConfigKey` to maintain consistency across the codebase. This change ensures that property access aligns with the updated naming conventions used in the application's configuration. * Reuse JSON serializer options * Update log persistence config structure in comments This commit revises the JSON example in code comments to reflect the updated structure of the log persistence configuration. The changes include updated evaluation modes and strategy types for default, inputs, and outputs sections. These modifications aim to enhance clarity and provide accurate documentation of the expected configuration format.
- Loading branch information
1 parent
f8fb715
commit 0863247
Showing
13 changed files
with
176 additions
and
37 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/clients/Elsa.Api.Client/Shared/Enums/LogPersistenceEvaluationMode.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Elsa.Api.Client.Shared.Enums; | ||
|
||
public enum LogPersistenceEvaluationMode | ||
{ | ||
Strategy, | ||
Expression | ||
} |
11 changes: 11 additions & 0 deletions
11
src/clients/Elsa.Api.Client/Shared/Models/LogPersistenceConfiguration.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Elsa.Api.Client.Resources.Scripting.Models; | ||
using Elsa.Api.Client.Shared.Enums; | ||
|
||
namespace Elsa.Api.Client.Shared.Models; | ||
|
||
public class LogPersistenceConfiguration | ||
{ | ||
public LogPersistenceEvaluationMode EvaluationMode { get; set; } | ||
public string? StrategyType { get; set; } | ||
public Expression? Expression { get; set; } | ||
} |
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
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
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
src/modules/Elsa.Workflows.Runtime/Elsa.Workflows.Runtime.csproj.DotSettings
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
7 changes: 7 additions & 0 deletions
7
src/modules/Elsa.Workflows.Runtime/Enums/LogPersistenceEvaluationMode.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Elsa.Workflows.Runtime; | ||
|
||
public enum LogPersistenceEvaluationMode | ||
{ | ||
Strategy, | ||
Expression | ||
} |
10 changes: 10 additions & 0 deletions
10
src/modules/Elsa.Workflows.Runtime/Models/LogPersistenceConfiguration.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Elsa.Expressions.Models; | ||
|
||
namespace Elsa.Workflows.Runtime; | ||
|
||
public class LogPersistenceConfiguration | ||
{ | ||
public LogPersistenceEvaluationMode EvaluationMode { get; set; } | ||
public string? StrategyType { get; set; } | ||
public Expression? Expression { get; set; } | ||
} |
Oops, something went wrong.