Query Failure messages aren't helpful
The failure messages when a route cannot be evaluated are too noisy to be useful:
The search failed with an exception: Param io.vyne.tradeCompliance.rules.TradeValueRuleRequest failed an evaluation NestedConstraintEvaluation(parent=TypedObject(type=Type(name=io.vyne.tradeCompliance.rules.TradeValueRuleRequest, attributes={tradeValue=TypeReference(name=io.vyne.tradeCompliance.TradeValue, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@5ad268c9), traderLimit=TypeReference(name=io.vyne.tradeCompliance.TraderMaxTradeValue, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@3bdc813)}, modifiers=[PARAMETER_TYPE], aliasForType=null, inherits=[], sources=[SourceCode(origin=<unknown>, language=Taxi, content=parameter type TradeValueRuleRequest {
tradeValue : io.vyne.tradeCompliance.TradeValue ( currency = "USD" )
traderLimit : io.vyne.tradeCompliance.TraderMaxTradeValue
})]), value={tradeValue=TypedObject(type=Type(name=io.vyne.tradeCompliance.TradeValue, attributes={currency=TypeReference(name=io.vyne.tradeCompliance.Currency, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@2f2776bb), value=TypeReference(name=io.vyne.tradeCompliance.MoneyAmount, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@70d5c59e)}, modifiers=[PARAMETER_TYPE], aliasForType=io.vyne.Money, inherits=[], sources=[SourceCode(origin=<unknown>, language=Taxi, content=parameter type Money {
currency : io.vyne.tradeCompliance.Currency
value : io.vyne.tradeCompliance.MoneyAmount
})]), value={currency=TypedValue(type=Type(name=io.vyne.tradeCompliance.Currency, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.String, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=GBP), value=TypedValue(type=Type(name=io.vyne.tradeCompliance.MoneyAmount, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.Decimal, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=55000.0)}), traderLimit=TypedObject(type=Type(name=io.vyne.tradeCompliance.TraderMaxTradeValue, attributes={currency=TypeReference(name=io.vyne.tradeCompliance.Currency, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@1c164fb9), value=TypeReference(name=io.vyne.tradeCompliance.MoneyAmount, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@73091f6f)}, modifiers=[PARAMETER_TYPE], aliasForType=io.vyne.Money, inherits=[], sources=[SourceCode(origin=rules-provider, language=Taxi, content=parameter type Money {
currency : io.vyne.tradeCompliance.Currency
value : io.vyne.tradeCompliance.MoneyAmount
})]), value={currency=TypedValue(type=Type(name=io.vyne.tradeCompliance.Currency, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.String, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=USD), value=TypedValue(type=Type(name=io.vyne.tradeCompliance.MoneyAmount, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.Decimal, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=1000000)})}), fieldName=tradeValue, evaluation=DefaultConstraintEvaluation(evaluatedValue=TypedObject(type=Type(name=io.vyne.tradeCompliance.TradeValue, attributes={currency=TypeReference(name=io.vyne.tradeCompliance.Currency, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@2f2776bb), value=TypeReference(name=io.vyne.tradeCompliance.MoneyAmount, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@70d5c59e)}, modifiers=[PARAMETER_TYPE], aliasForType=io.vyne.Money, inherits=[], sources=[SourceCode(origin=<unknown>, language=Taxi, content=parameter type Money {
currency : io.vyne.tradeCompliance.Currency
value : io.vyne.tradeCompliance.MoneyAmount
})]), value={currency=TypedValue(type=Type(name=io.vyne.tradeCompliance.Currency, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.String, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=GBP), value=TypedValue(type=Type(name=io.vyne.tradeCompliance.MoneyAmount, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.Decimal, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=55000.0)}), violation=ExpectedConstantValueMismatch(evaluatedInstance=TypedObject(type=Type(name=io.vyne.tradeCompliance.TradeValue, attributes={currency=TypeReference(name=io.vyne.tradeCompliance.Currency, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@2f2776bb), value=TypeReference(name=io.vyne.tradeCompliance.MoneyAmount, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@70d5c59e)}, modifiers=[PARAMETER_TYPE], aliasForType=io.vyne.Money, inherits=[], sources=[SourceCode(origin=<unknown>, language=Taxi, content=parameter type Money {
currency : io.vyne.tradeCompliance.Currency
value : io.vyne.tradeCompliance.MoneyAmount
})]), value={currency=TypedValue(type=Type(name=io.vyne.tradeCompliance.Currency, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.String, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=GBP), value=TypedValue(type=Type(name=io.vyne.tradeCompliance.MoneyAmount, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.Decimal, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=55000.0)}), requiredType=Type(name=io.vyne.tradeCompliance.TradeValue, attributes={currency=TypeReference(name=io.vyne.tradeCompliance.Currency, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@3bd6193c), value=TypeReference(name=io.vyne.tradeCompliance.MoneyAmount, isCollection=false, constraintProvider=io.vyne.schemas.taxi.FunctionConstraintProvider@7e62acb8)}, modifiers=[PARAMETER_TYPE], aliasForType=io.vyne.Money, inherits=[], sources=[SourceCode(origin=<unknown>, language=Taxi, content=parameter type Money {
currency : io.vyne.tradeCompliance.Currency
value : io.vyne.tradeCompliance.MoneyAmount
})]), fieldName=currency, expectedValue=TypedValue(type=Type(name=io.vyne.tradeCompliance.Currency, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.String, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=USD), actualValue=TypedValue(type=Type(name=io.vyne.tradeCompliance.Currency, attributes={}, modifiers=[PRIMITIVE], aliasForType=lang.taxi.String, inherits=[], sources=[SourceCode(origin=Unknown, language=Taxi, content=)]), value=GBP), updater=io.vyne.schemas.ReplaceFieldValueUpdater@599de607))), but no resolution strategy was found
Phew!
What this should say is:
Couldn't invoke operate ${operationName}, because constraint of
TradeValue = 'USD'
couldn't be satisfied
Edited by Marty Pitt