Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Constraints

Constraints enforce rules and conditions on types, variables, and relationships. Use constraints to define logical restrictions and ensure consistency within the model.

Supported Logic Operators

These logic operators are supported in CML.

Arithmetic Operators

  • Multiplication (*)
  • Division (/)
  • Remainder (%)
  • Addition (+)
  • Subtraction (-)

Relational Operators

  • Greater than (>)
  • Greater than or equal to (>=)
  • Less than (<)
  • Less than or equal to (<=)

Equality Operators

  • Equal (==)
  • Not equal (!=)

Logic Operators

  • Not (!)
  • And (&&)
  • XOR/Exclusive or (^)
  • Or (||)
  • Bi-conditional (<->)
  • Conditional (?:)
  • Implication (->)

Operator Precedence

In resolving equations, operator precedence determines the order in which operations are performed. Operators in CML have precedence in this order:

  • Arithmetic operators have the first precedence.
  • Relational operators have the second precedence.
  • Equality operators have the third precedence.
  • Logic operators have a lower precedence than equality operators, in decreasing order as listed, with Implication having the lowest precedence.

Constraint Annotation

Here are the details of abort, a constraint annotation.

Annotation Possible Values Description
abort true, false Specifies that, if this constraint fails, abort search and return false for configuration.