RuleAPI:Decision commands

From FlexRule Wiki
(Redirected from RuleAPI:Validation commands)
Jump to: navigation, search

These commands are also available as part of the Decision engine.

Validation or Decision commands

Validation commands run in the validation engine that validates the input from users or other systems.

Validation

This command is the main container of the rule. It contains rule signature and one or multiple logic.

View signature

Decision

This command is the main container of the rule. It contains rule signature and one or multiple logic.

View signature

Declaration

Check Declaration

View signature

Alias

This command in Validation and Decision allows you to extend the base commands using other logic or a method call.

View signature

Logic

Validation may be divided into different parts. We call these Logic. This logic is Boolean in nature and will be run based on an input type. The input type will be represented by a type/class definition.

View signature

Then

This is an actions set part of Logic and can be used only as part of a Logic.

View signature

Otherwise

This is an actions set part of Logic and can be used only as part of a Logic.

View signature

Constants

True

This check always returns true.

View signature

False

This check always returns false.

View signature

When

If during different circumstances different checks need to behave differently, this command can be applied on the logic.

View signature

Boolean operations

It is possible to aggregate check results using boolean operations in the validation engines.

And

View signature

Or

View signature

Xor

View signature

Nor

View signature

Xnor

View signature

Not

View signature

Group

View signature

Compare

Builds Boolean results from multi-part expressions to support 'is', 'is not'... in a Natural Language logic

View signature

Evaluations

Check

This command preform checks on input values.

View signature

Regex

This command preforms a regular expression check on a string value.

View signature

Null

If null/nil check is required, this check can be used.

View signature

Empty

If empty check is required on a string input, this check can be used.

View signature

Collections

UniqueConstraint

This command performs checks on a collection to ensure the uniqueness of elements.

View signature

ForEach

This command performs the execution of rules for every element of a collection.

View signature

Include

This command lets you include some external logic.

View signature

Any

Condition validation for any of the items in a collection.

View signature

All

Validation condition for all of the items in a collection.

View signature

Count

Validation on numbers of items in a collection.

View signature

Sum

Validation on a summation of a property of items in a collection

View signature

Validate

Inside a validation there may be several logic. This command can call a check from one logic to another.

View signature

Validator

Validation rules can be called in different rules such as procedural, flow rules.

View signature