Explore the Configuration Engine

Objective

After completing this lesson, you will be able to describe and analyze the processing sequence the configuration engine

Dependency Sequence and Trace

To build a reliable product model, we must understand that the configuration engine evaluates dependencies not randomly, but in a strict sequence. Mastering this processing order is the fundamental key to controlling your model’s behavior.

Configuration Session Processing

The configuration session covers all user activities from the moment they begin configuring a product until they leave the screen. The following phases are executed

  1. Initialization: the session begins by reading master data from the database to establish the initial set of allowed values for the configuration.
  2. Interactive Validation Loop: this is the core of the session. It’s a continuous cycle where User Input triggers a validation process
  3. Finalization: the session concludes when the user saves the configuration
The figure illustrates the sequence of steps the engine follows to process a complete configuration session

The processing of a configuration session begins with an initialization step that restricts the available options based on the master data

  • the characteristic’s pre-defined domain provides the initial set of its allowed values
  • for numeric characteristics without a pre-defined domain, the allowed input is automatically restricted by their format, which includes the number of digits, the decimal places, and the setting for negative values
  • the characteristic’s domain can be further restricted by selecting a subset of its values within the product classification (class type 300).

By implementing custom logic in the BAdI VCH_HL_MD_DOMAIN_MODIFY, developers can overrule standard master data to dynamically build or modify a characteristic’s domain. This allows for adding new values to the domain, deleting existing ones, or changing their attributes to support use cases like temporary promotions or customer-specific options

The validation executes the object dependencies on user input and automatically calculates related values, ensuring a consistent and valid result with every selection.

As the final step when a user saves or leaves the configuration, the BAdI VCH_HL_ON_SAVE allows for the execution of custom logic to finalize the data. Developers can use it to add or delete value assignments or even change the status of the configuration. Key use cases include running final, comprehensive consistency checks, setting specific values needed for downstream processes and deleting temporary data from "helper" characteristics

Interactive Validation Loop: Roundtrip

An engine roundtrip is defined as the complete, end-to-end processing cycle that is triggered by a single user action within a configuration session. This cycle consists of three distinct phases:

  1. User Input: the user interface sends the user’s input
  2. Validation: the engine systematically evaluates all relevant object dependencies
  3. Output: the engine returns the results of its evaluation to the user interface, which then refreshes to display

Each time a user provides input, the engine initiates a multi-stage validation to ensure the configuration remains consistent and complete.

The figure illustrates the validation sequence the engine executes after each user input

Before the engine’s main validation begins, the engine provides an entry point for custom logic. This is accomplished by executing the BAdI VCH_HL_PRE_VALIDATE_ASSIGN, which allows developers to run their own code for initial data preparation or preliminary checks.

In a multi-level configuration, instance validation and BOM explosion interact in a top-down sequence.. The engine first validates the parent instance, then explodes its BOM to select the necessary components. It then moves down to validate each of those child components, repeating this cycle through every level of the product structure until the entire configuration is consistent from top to bottom.

The facet processing is the step where the engine evaluates specific object dependencies to control how characteristics appear and behave in the user interface. This processing determines whether an option is visible, editable, or mandatory.

The BAdI VCH_HL_POST_VALIDATE_ASSIGN serves as a final hook for custom logic after the engine’s main validation cycle is finished. Developers can use this exit point to change, add or delete value assignments or perform comprehensive final checks.

Note

BAdI VCH_HL_PRE_VALIDATE_ASSIGN and BAdI VCH_HL_POST_VALIDATE_ASSIGN replace many of the variant functions used in LO-VC.

Instance Validation

The figure illustrates the sequence of steps the engine follows to process the instance validation

Constraints are declarative dependencies, which are executed whenever needed to maintain consistency. For this reason, processing constraints is the first step within instance validation.

Afterwards, value assignments are activated sequentially. The engine first processes values entered by the user, then applies any external values (e.g. by reference characteristics) and finally assigns static defaults.

Following any single value assignment, all triggered constraints are immediately executed.

Finally, the engine executes all relevant procedures exactly once, following their predefined sequence. Any value assignment or retraction made by a procedure can trigger some constraints again.

Dependency Trace

The trace offers a granular view into the engine’s execution path by logging the sequence of dependency processing and value inference.

Use the trace to:

  • Validate Model Behavior: confirm that your model works as designed
  • Analyze Logic: see the exact sequence in which object dependencies are executed
  • Troubleshoot Errors: understand why a configuration is inconsistent or why values are not behaving as expected
The figure shows a screenshot of the trace message sequence.

You can activate the trace directly in the app Simulate Configuration Models. In the simulation, open the Inspector Panel, switch to the Trace tab, and activate it.

Each line of the trace contains a message with a message type. The order of the messages reflects the engine’s processing sequence.

Most common message types:

  • Processing Started
  • Value Assignment
  • Value Restriction
  • Pricing Factor
  • Characteristic Facet

Each message type has a fixed, formal structure. The following information is provided, depending on the message type:

  • executed action
  • target object (product number)
  • target characteristic (characteristic name)
  • source object dependency (dependency name)

An object dependency can contain multiple statements, separated by commas. The trace indicates which specific statement was executed by using a number in parentheses, corresponding to the statement’s position in the editor code.

To search for specific entries, you can use the search field or the filter. You can also click on products, characteristics or dependencies and use the pop-up to filter the trace for the selected element, inspect the element or display where a characteristic has been used or changed.

The figure shows a screenshot of the trace message details.

Each trace message can be expanded to show more details:

  • Dependency Name: identifies the specific object dependency that was executed
  • Variant Table Access: shows if a variant table was read
  • Input Values: displays the values of relevant characteristics on the instance before the dependency was processed. This provides a snapshot of the state that triggered the dependency
  • Output Values: shows the results for characteristics that were directly changed by the dependency
  • Syntax: displays the complete source code of the object dependency that was processed