microsoft / microsoft/RulesEngine
Support for Returning Multiple Values in OutputExpression
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 616
- Avg merge
- 6m
- Merged PRs (30d)
- 2
Description
I want to include multiple local parameters in the output of a rule. Here's a simplified version:
"Actions": {
"OnSuccess": {
"Name": "OutputExpression",
"Context": {
"Expression": "new { TempValueA = TempValueA, TempValueB = TempValueB, FinalResult = TempValueB / input.TotalUnits }"
}
}
}
But I get this error:
Exception while executing OutputExpressionAction: Expression is missing an 'as' clause
When I try to return in the above way.
How can I return multiple values from OutputExpression? Is there a supported way to include local params in the output?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at OutputExpressionAction, where the reported exception originates, and trace the expression-evaluation path for the required as clause. No source file or test is named; done would mean an agreed behavior for multiple returned values and local parameters, with coverage for the shown expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100