Skip to content

BREAKING: Enhance Sql Evaluator to Support Object Properties#87

Merged
KnibbsyMan merged 3 commits intodevelop/3.6.0from
enhance/sql-object-support
Oct 7, 2025
Merged

BREAKING: Enhance Sql Evaluator to Support Object Properties#87
KnibbsyMan merged 3 commits intodevelop/3.6.0from
enhance/sql-object-support

Conversation

@KnibbsyMan
Copy link
Member

@KnibbsyMan KnibbsyMan commented Oct 5, 2025

Closes #85

  • Added support for resolving nested properties and arrays in expressions, including POCOs, ExpandoObject, IDictionary, arrays, lists, and JSON objects.
  • Introduced new context prefixes (Activity., Execution., Workflow.) for accessing specific contexts and their nested properties.
  • Marks older prefixes (Variables.) and certain keys (Workflow.Definition.Id, etc.) as deprecated. 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.

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}}

- 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.
@KnibbsyMan KnibbsyMan added the enhancement New feature or request label Oct 5, 2025
@KnibbsyMan KnibbsyMan added this to the 3.6 milestone Oct 5, 2025
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.
@KnibbsyMan KnibbsyMan marked this pull request as ready for review October 6, 2025 20:16
@KnibbsyMan KnibbsyMan changed the title Enhance Sql Evaluator to Support Object Properties BREAKING: Enhance Sql Evaluator to Support Object Properties Oct 6, 2025
@KnibbsyMan KnibbsyMan merged commit db3acb6 into develop/3.6.0 Oct 7, 2025
3 checks passed
@KnibbsyMan KnibbsyMan deleted the enhance/sql-object-support branch October 7, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant