When performing arithmetic calculations with attribute values and numeric constants Aware IM automatically performs the necessary type conversions if arguments are of different types. The following conversion rules apply:
'John' + ' ' + 'Smith'
produces 'John Smith''Number' + Account.Balance
produces 'Number1000'
if the value of Account.Balance
is 1000Account.Balance
is 1000 and the value of Transaction.Amount
is undefined, the value of Account.Balance – Transaction.Amount
will be 1000.Account.OpeningDate + 7
produces a date that is a week after the account opening date. Transaction.Timestamp – 3
produces the timestamp that is 3 hours before the transaction timestamp. FIND
action.Yes/No
type may not participate in arithmetic calculations.Document
type may not participate in arithmetic calculations, although it is possible to assign a value to the attribute of the Document type. For example, Statement.Doc = 'StatementTemplate'
– assigns the specified template to the attribute of the business object. This will also resolve contents of tags if the template has them. Another example, Statement.Doc = OtherObject.Doc
– assigns the document of Statement business object to be the exact copy of the document stored in OtherObject.The following rules apply when comparing values in the Relational Expression:
All attribute types can be compared for equality or non-equality (even references), provided that the types on both sides are compatible. If the types are the same on both sides, they are always compatible. If they are different, the following rules apply:
Account.Name
is ‘1000’: Account.Name = 1000
UNDEFINED
it is considered to be 0 for comparison purposes.
Only numbers, dates and durations can be compared using other operators (<
, >
, <=
, >=
).
It is possible to use references and reference lists inside rule conditions and assign reference and reference lists in actions. For example, the following rule:
IF Customer.Policies.Cartype='Wagon' THEN Customer.Policies.Premium=100
will check every policy in the list of policies of a customer and if a car type of the policy is wagon will set the premium of such policy to 100.
The following rule:
IF Policy.CarType='Wagon' THEN Customer.CurrentPolicy=Policy
will set the policy, the car type of which is “wagon”, as the policy of the customer.
If multiple references are used in a rule condition the corresponding action will be triggered if the condition holds for ANY value of the reference in the reference list. For example,
IF Customer.Policies.CarType='Wagon' THEN ...
The action in this rule will be executed if there is any Policy
that the Customer
owns that has the Wagon
car type.