Skip to main content

BusinessRuleComplexExpression

Advanced expression combining multiple sub-expressions with aggregation functions.

Enables complex data processing by filtering collections based on multiple criteria and then applying aggregation operations. Supports mathematical operations (sum), counting operations (count), and data collection (collect) on filtered datasets.

type BusinessRuleComplexExpression implements IBusinessRuleExpression {
id: ID!
type: BusinessRuleExpressionTypes!
operator: BusinessRuleNumberExpressionOperators
action: BusinessRuleComplexExpressionAction!
field: String
path: String
number: Float!
expressions: [BusinessRuleSubExpressionGroup!]
}

Fields​

BusinessRuleComplexExpression.id ● ID! non-null scalar​

Unique identifier for this expression within the business rule system

BusinessRuleComplexExpression.type ● BusinessRuleExpressionTypes! non-null enum​

Data type classification of the expression determining available operators and validation rules

BusinessRuleComplexExpression.operator ● BusinessRuleNumberExpressionOperators enum​

Optional numeric comparison operator for evaluating the aggregated result against a threshold value

BusinessRuleComplexExpression.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

BusinessRuleComplexExpression.field ● String scalar​

JSONPath to the specific field for sum operations (e.g., '$.price' to sum price values from filtered elements)

BusinessRuleComplexExpression.path ● String scalar​

JSONPath expression defining the target data collection for filtering and aggregation.

Defaults to '$' (root field) when omitted. Must be specified when used as a sub-expression within larger expressions. Examples: '$.orders', '$.items[*]', '$.customer.purchases'

BusinessRuleComplexExpression.number ● Float! non-null scalar​

Numeric threshold value for comparison when using the operator (e.g., count > 5, sum >= 100)

BusinessRuleComplexExpression.expressions ● [BusinessRuleSubExpressionGroup!] list object​

Interfaces​

IBusinessRuleExpression interface​

Base interface for all business rule expression types defining common properties and behavior.

Expressions are the fundamental building blocks for business rule conditions and calculations. Each expression type provides specific operators and validation logic for different data types including strings, numbers, dates, arrays, and complex aggregations.