Processing Sequence according Object Assignment
This lesson provides some advanced modeling techniques in SAP AVC. Often, a single requirement can be met using different methods, such as various types of object dependencies. However, not all solutions are created equal. Therefore, best practices for modeling will also be covered.

The execution flow of procedures is governed by a strict, two-level order that determines if and when a procedure is run:
- Level 1: Object Assignment and Triggering Condition
- Procedures on the configuration profile: These are always executed during each processing roundtrip. They form the baseline of the execution sequence.
- Procedures on a characteristic: These are only executed if the characteristic they are assigned to is valued (i.e., has any value set).
- Procedures on a characteristic value: These are only executed if the characteristic is set to that specific value.
- Level 2: Sort Order

The execution scope of a procedure depends on where it is assigned:
- Procedures on a Characteristic or Characteristic Value: These are executed globally. They will automatically run in every model and at every instance where the characteristic is used.
- Procedures on a Configuration Profile: In contrast, these are instance-specific. They are not executed automatically and must be explicitly assigned to each individual instance where they need to run.
Hint
Best Practice Modeling: For model clarity, transparency, and long-term maintainability, it is recommended to assign Procedures to the configuration profile only.

The type of an object dependency determines its outcome, even when the underlying syntax is (almost) identical.
Constraint:
- The Constraint is independent of the execution order. It is triggered automatically by the system whenever necessary.
- The characteristic in the IF condition is not required to be evaluated.
- A Constraint is evaluated as a single, holistic statement that must always hold true. In a Constraint, a characteristic inside an IF condition is an active part of the logic, not just a trigger. Therefore, the Constraint can restrict that characteristic’s value.
Procedure:
- A Procedure is executed only once per engine roundtrip.
- The characteristic in the IF condition must be evaluated.
- A characteristic within an IF condition functions only as a trigger; its value cannot be restricted.
Precondition:
- A Precondition is executed only once per engine roundtrip.
- The characteristic in theIF condition must be evaluated.
- A characteristic within an IF condition functions only as a trigger; its value cannot be restricted.
- A precondition only hides a value, making it unavailable for selection. It does not, however, enforce a restriction on the characteristic itself.
Hint
Best Practice Modeling: Restricting values should preferably be done using Constraints. If a Constraint cannot be used due to syntax limitations, a Procedure should be used. Preconditions on a characteristic value should generally be avoided.