!--a11y-->
Gate Expression 
Boolean expression that determines at runtime whether a rule or an entire rule set really should be processed.
The quantity of rules in an event is normally a fixed value. Within a business process, it might be the case that some rules (or even an entire rule set) no longer need to be processed, or indeed that they may no longer be processed. You can use a gate expression to control this at runtime.
A rule or a rule set is always processed if one of the following conditions is met:
· You have not defined a gate expression
· You have defined a gate expression. This gate expression returns the value TRUE.
In a symbolic programming language you could express the use of a gate expression as follows:
· Usage type 1 (this is how usage of a gate expression is implemented):
If (<gate_expression>)
{
If (<expression>) then <action>
}
· Usage type 2 (the gate expression is not implemented like this)
If (<gate_expression> and <expression>) then <action>
The difference between the two usage types is that the option of an enhancement that also permits an „else“ statement in a rule (as is the case in usage type 1) should remain open.
With usage type 2, the not yet existing „else“ statement would be processed if the gate expression was incorrect. Conversely, with usage type 1, the entire rule is not considered, as is the intention.
A gate expression must always be Boolean.. Other result categories are not permitted.
· You can use gate expressions when experimenting with an application, for example. You can configure the rules in such a way that they can only be executed for the current user. For other users, the gate expression is FALSE, meaning that the rule is not considered.
· You can use a gate expression to control that some rules are only executed sporadically or at random, because they are complicated and runtime-intensive (as in the fraud detection environment, for example).
In this case, you can define a Boolean random generator as the gate expression. It is only true for a certain percentage of the calls made. This is a way of controlling that fraud detection is only run on occasions and at random.