Table of Contents

Troubleshooting

Start with the ExceptionMessage of the failing RuleResultTree (see Error handling). Set EnableExceptionAsErrorMessage = false while debugging to get the real exception and stack trace, with Exception.Data["RuleName"] and Exception.Data["Expression"] identifying the rule.

Exceptions thrown to your code

Message or exception Cause and fix
ArgumentException: Rule config file is not present for the X workflow No workflow named X is registered. Check the name (it is case-sensitive) and that you added the workflow to this engine instance.
RuleValidationException when adding a workflow The workflow failed validation; read the message and Errors. See the workflow reference.
RuleValidationException: Cannot add workflow X as it already exists Use AddOrUpdateWorkflow to replace a workflow.
ArgumentException: An item with the same key has already been added Two rules in the workflow (including injected ones) have the same RuleName. Rule names are not validated when you add the workflow.
InvalidOperationException: Circular WorkflowsToInject reference Two workflows inject each other, directly or through others.
KeyNotFoundException: Action with name X does not exist The action is not built in and is not in ReSettings.CustomActions.
OperationCanceledException The CancellationToken was cancelled. It is checked between rules and before each action.

Rule results with an ExceptionMessage

Message contains Cause and fix
Exception while parsing expression and No property or field 'x' exists The member or input name is wrong, or it is a global parameter from another workflow. Global parameters are not injected with WorkflowsToInject, and names are matched case-insensitively only.
Exception while parsing expression and Type 'x' not found An input name in the rule does not match the name you passed. Plain objects are named input1, input2, and so on.
Exception while parsing expression for a method call The method's type is not registered. Add it to CustomTypes.
exists in type 'Object' with a hint about the return type A method called in the expression returns object. Change it to return a concrete type.
Error while executing rule A runtime error, often a call on null. Guard with x != null AND ....
Error while compiling rule A scoped parameter or the rule failed to compile. The message names it.
Error while executing scoped params for rule A global or local parameter threw while being evaluated for the given inputs.
GlobalParam name 'x' collides with an input RuleParameter Rename the input or the global parameter.
The binary operator Equal is not defined for the types 'JsonElement' and 'String' A nested JsonElement object or array is being compared as a scalar. Scalar JsonElement values inside an ExpandoObject are unwrapped automatically; deserialize nested objects into typed classes or ExpandoObject.

Unexpected results

Symptom Cause and fix
The ExceptionMessage is always empty although rules fail IgnoreException is true.
A rule fails only for some inputs Different input types compile separately. A dynamic property that is null is typed object, and typed comparisons on it fail. See How inputs are typed.
String comparison fails although the text looks equal String values are compared exactly, even when names are case-insensitive. Use value.Equals("x", StringComparison.OrdinalIgnoreCase) or ToLower().
A change to the workflow has no effect Replace it with AddOrUpdateWorkflow (or remove and add). Editing the Workflow object after adding it does not mark it as changed.
Fewer ChildResults than child rules NestedRuleExecutionMode.Performance stops once the outcome is decided.
A disabled rule is missing from the results Rules with "Enabled": false are not evaluated or returned.
Actions did not run AutoExecuteActions is false, or the rule has no action for its outcome. ExecuteActionWorkflowAsync always runs the action.
The first call is slow Compilation happens on first use per input shape. See Performance.
ErrorMessage shows $(input1.x) unchanged The placeholder path does not exist in the input, or EnableFormattedErrorMessage is false.

Still stuck?

Search the issues, then ask in Discussions or open an issue with the bug report form. A minimal workflow, input and the full ExceptionMessage make a report easy to act on.