BREAKING: Enhance Sql Evaluator to Support Object Properties#87
Merged
KnibbsyMan merged 3 commits intodevelop/3.6.0from Oct 7, 2025
Merged
BREAKING: Enhance Sql Evaluator to Support Object Properties#87KnibbsyMan merged 3 commits intodevelop/3.6.0from
KnibbsyMan merged 3 commits intodevelop/3.6.0from
Conversation
- Added support for resolving nested properties and arrays in expressions, including POCOs, ExpandoObject, IDictionary, arrays, lists, and JSON objects. - Introduced new context prefixes (`Input.`, `Output.`, `Variable.`, `Activity.`, `Execution.`, `Workflow.`) for accessing specific contexts and their nested properties. - Deprecated older prefixes (`Variables.`) and certain keys (`Workflow.Definition.Id`, etc.), providing updated alternatives. - Improved error handling for missing properties, invalid indices, and unsupported types. - Updated README to document new features, provide examples of enhanced expression syntax, and guide migration from deprecated keys. - Strengthened SQL injection protection by extending support for nested properties and complex objects. - Refactored `ResolveValue` for better readability and maintainability.
Refactored the `ResolveValue` method in `SqlEvaluator.cs` to use a `switch` expression with `case` patterns, improving readability and maintainability. Replaced deprecated hardcoded expression keys with updated keys to align with the new expression model. Updated `README.md` to document the new expression syntax, including examples for accessing `Input`, `Output`, `Variable`, and nested properties. Highlighted breaking changes in version 3.6.0 and provided guidance for transitioning from deprecated keys.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #85
Activity.,Execution.,Workflow.) for accessing specific contexts and their nested properties.Variables.) and certain keys (Workflow.Definition.Id, etc.) as deprecated. Providing updated alternatives.Breaking Expression Changes
As the evaluator can now use workflow properties directly, the previous hard coded expression keys have been be removed.
To access the previous key values you will need to update your expressions.
{{Variables.<VariableName>}} --> {{Variable.<VariableName>}} {{Workflow.Definition.Id}} --> {{Workflow.Identity.DefinitionId}} {{Workflow.Definition.Version.Id}} --> {{Workflow.Identity.Id}} {{Workflow.Definition.Version}} --> {{Workflow.Identity.Version}} {{Workflow.Instance.Id}} --> {{Activity.WorkflowExecutionContext.Id}} {{Correlation.Id}} --> {{Activity.WorkflowExecutionContext.CorrelationId}}