Skip to content

Custom Name of Parameter not being honored.  #581

@khPhoenix

Description

@khPhoenix

When trying to specify a custom name for a parameter we are receiving the following error:

Parameter Declaration:

var wfParams = new MyParam()
{
    Value1 = "value1",
    Value2 = "value2"
};
var rp = new RuleParameter("myValue", wfParams); 

var myWorkflow = new Workflow
{
    WorkflowName = "my_workflow",
    Rules = new List<Rule>
    {
        new Rule
        {
            RuleName = "MatchesFabrikam",
            Enabled = true,
            RuleExpressionType = RuleExpressionType.LambdaExpression,
            Expression = "myValue.Value1== \"Fabrikam\""
        }
    }
};

When the rule is evaluated the following error is received:

  Message: 
System.Exception : Could not execute rules: [MatchesFabrikam: Exception while parsing expression `myValue.Value1 == "Fabrikam"` - Enum type 'endpoint' not found]`

We're targeting .net8 and using RulesEngine 5.0.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions