sapproductconfigruntimemock Extension

This extension provides a runtime integration into SAP Variant Configuration and Pricing using plain java objects to mock dynamic configuration behavior in a fixed way for a given set of products. It is only intended to be used for testing and demo purposes. It is not considered a full dynamic configuration engine, such as SAP Product Configuration Runtime Engine or the configuration and pricing services (CPS), which are implemented in the sapproductconfigruntimessc and sapproductconfigruntimecps extensions.

Overview

This extension provides a runtime integration into SAP Variant Configuration and Pricing using plain java objects to mock dynamic configuration behavior in a fixed way for a given set of products. It is only intended to be used for testing and demo purposes. It is not considered a full dynamic configuration engine, such as SAP Product Configuration Runtime Engine or the configuration and pricing services (CPS), which are implemented in the sapproductconfigruntimessc and sapproductconfigruntimecps extensions.

For every mocked product, there is one class implementing the mocked behavior.

You can use these products together with the mock extensions to test your extension setup without needing to connect to a configuration engine such as the configuration and pricing services (CPS) or the SAP Product Configuration Runtime Engine. Note that when you use these mock products, the user interface will respond differently to how it would if a back end or configuration engine were connected. For example, advanced dependencies such as non-selectable options are not taken into account with the mock products.

Provided Mock Products

The following mock products are available for testing purposes:

  • In the Electronics store (B2C):

    • Single-Level: Digital Camera CO-SL (CONF_CAMERA_SL) – some variants are assigned already

    • Multilevel: Home Entertainment System (CONF_HOME_THEATER_ML)

  • In the Power Tools store (B2B):

    • Single-Level: Configurable Screwdriver (CONF_SCREWDRIVER_S) – some variants are assigned already

    • Multilevel: Configurable Band Saw (CONF_BANDSAW_ML)

  • In both stores:

    • Basic Configuration Example (Y_SIMPLE_POC)

    • Single-Level: Laptop (CPQ_LAPTOP)

    • Multilevel: Home Entertainment System (CPQ_HOME_THEATER) – similar to CONF_HOME_THEATER_ML but more complex

    • Single-Level: Pipe (CONF_PIPE)

    Before you can start to configure these products in the storefront, you must add the corresponding test products to your test catalog. The products should use the name given in upper case in the list above as product code.

Extensibility

To add your own mocks, do the following:

  • Create your own extension, extending sapproductconfigruntimemock.

  • Extend the sapProductConfigRunTimeConfigMockFactory spring bean and add code to create your mocks based on the given product code.

  • Create your own mock by implementing the de.hybris.platform.sap.productconfig.runtime.mock.ConfigMock interface.

    You can extend from the de.hybris.platform.sap.productconfig.runtime.mock.imp.BaseRuntimeConfigMockImpl base class.