BusinessRuleComplexExpressionInput
Input for creating advanced expressions that combine multiple sub-expressions with aggregation functions
input BusinessRuleComplexExpressionInput {
operator: BusinessRuleNumberExpressionOperators!
number: Float!
path: String
action: BusinessRuleComplexExpressionAction!
field: String
expressions: [BusinessRuleExpressionGroupInput!]
}
Fields
BusinessRuleComplexExpressionInput.operator
● BusinessRuleNumberExpressionOperators!
non-null enum
Mathematical comparison operator for evaluating the aggregated result against the threshold value
BusinessRuleComplexExpressionInput.number
● Float!
non-null scalar
Numeric threshold value for comparison when using the operator (e.g., count > 5, sum >= 100)
BusinessRuleComplexExpressionInput.path
● String
scalar
Path to the field, can be used to add additional expressions and calulations on the field. Use $ to target the field's value. When omitted the field's value is used. The expression will be used on the left hand side of the operator. Can also be used to target a specific property in a complex expression's sub-expression Check https://gorules.io/docs/rules-engine/expression-language/string for options.
BusinessRuleComplexExpressionInput.action
● BusinessRuleComplexExpressionAction!
non-null enum
Aggregation function to apply to the filtered data collection.
- 'sum': Calculate the sum of numeric values from a specific field in filtered elements
- 'count': Count the number of elements that match the filtering criteria
- 'collect': Gather and return all matching elements as a collection
BusinessRuleComplexExpressionInput.field
● String
scalar
JSONPath to the specific field for sum operations (e.g., '$.price' to sum price values from filtered elements)
BusinessRuleComplexExpressionInput.expressions
● [BusinessRuleExpressionGroupInput!]
list input
Collection of expression groups containing the filtering criteria to select elements from the data collection