Constraints

To create and use validity conditions

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 28.05.2003
Updated: 31.10.2024 | Added Performance section

If a certain condition has to be met on an entry type (e.g. services, addresses, etc.) in order for the entry to be valid, a so-called constraint can be created for this purpose.

To create a constraint, follow these steps:

  1. In Vertec, open the folder Settings.
  2. Right-click the Constraints subfolder and select New > Constraint.
  3. The following entry mask appears:
    constraint.png
Classes The class must be a valid Vertec class, e.g. project or service. Class names are always capitalized.
OCL expression Here you need a   OCL expression which returns a True/False (Boolean) value. The OCL expression can be a maximum of 1000 symbols.
error message This message appears if the condition is not met. Keep the message short but meaningful.
Active Specify here whether the constraint is currently to be considered or not.

Attention to performance

Constraints can cause significant performance problems if the expression is not chosen carefully. In any case, you must avoid having to load objects (e.g. all projects to see if a project code already exists), otherwise these objects will be loaded every time you access them, which can significantly slow performance. When composing a constraint, make sure that you only query attributes of your own object. These are the objects that appear in blue in the OCL editor:

The green members should not be used here. If you want to check things for which this is not enough, you should not use Constraints, but e.g. Event scripts use.

Bitte wählen Sie Ihren Standort