Variables and properties

Properties and variables can be defined either globally or locally within a rule or a block (e.g. iterator block).

A property is a constant, which is assigned to a value on declaration. The type of a property can be any of the MOFScript types, or it can be untyped in the declaration. Its type will then be determined by the value assigned.

A variable can change its value during run time in assignments. A variable can be type by any of the MOFScript types. It may also be defined untyped in the declaration. Its type will then be determined by the value assigned. If no type is assigned, it’s type will become a ‘String’.

property packageName:String = “org.mypackage”
var
myInteger = 7
var myInteger2:Integer = 7
var myInteger3:Integer