Statements

Here are the available MQL statements:

Most commonly used statements
assignment Changes variables value or model element properties.
foreach, break Processes some statements for each element contained within a collection.
if, else Conditionally skip some statements.
import Makes the referenced element (text template, ruleset or Java type) directly available in the ruleset.
metatype Specifies the metatype for which the contained scripts apply.
method call Calls a method or a script.
package Defines the namespace of rulesets and of scripts.
return Exits a script or a rule, with an optional value.
rule Defines the signature of a rule, as well as the contents to be evaluated.
rule call Evaluates a rule, either of the same ruleset or of an external ruleset.
ruleset Defines the signature of a ruleset, as well as the contained rules.
script Defines the signature of a script, as well as the contents to be evaluated
text template call Generates a file based on a referenced text template.
var Creates a new variable and initializes its value.
while, break Processes some statements while a condition is true.

Advanced statements
attempt, recover Provides alternate processing in case an error occurs.
stop Aborts the evaluation process.