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
Machine translated
Updated: 31.10.2024 | Updated screenshot and description.

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 Einstellungen.
  2. Navigate to the Customizing > Constraints folder and select Neu > 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 must specify an Ocl expression that returns a True/False (Boolean) value. The OCL expression can have 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 should be considered up to date or not.

Attention to performance

Constraints can cause significant performance problems if the expression is not chosen carefully. In any case, it is important to 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 they are accessed, 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 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 .