You can place ruleset control statements in the postlude of a rule.
Code Block |
---|
theme | Confluence |
---|
language | javascript |
---|
|
last |
The last stops The last
stops ruleset execution after the current rule.
This example will stop execution of the ruleset if the rule that this postlude is contained in fires.
Code Block |
---|
theme | Confluence |
---|
language | javascript |
---|
|
fired |
...
This example will stop execution of the ruleset if the rule that this postlude is contained in fires and x is equal to 4.
Code Block |
---|
theme | Confluence |
---|
language | javascript |
---|
|
fired {
last if(x==4)
} |
The following construct ensures that no rules below the current rule will ever be executed:
Code Block |
---|
theme | Confluence |
---|
language | javascript |
---|
|
always { |
...
The last
control statement is used in the authorize-then-use pattern.