Search code examples
sap-commerce-cloud

How to load an impex automatically at the time of system updation in hybris?


I have written an impex in trainingcore/resources/trainingcore/import/common/my_products.impex After that, I did a system update and checked the trainingcore extension for project data creation. But the impexes were not loaded. After reading some articles, I realised it has something to do with CoreSystemSetup.java class, but I can't get exactly what needs to be done. Can someone please help?


Solution

  • During the initialization and update processes, the platform looks for ImpEx files in the <extension_name> /resources/impex folder. In particular:

    For essential data: The platform scans the <extension_name> /resources/impex folders for files with names that match the pattern essentialdata*.impex and imports the files during the essential data creation.

    For project data: The platform scans the <extension_name> /resources/impex folders for files with names that match the pattern projectdata*.impex and imports the files during the project data creation.

    The ImpEx directory does not exist by default. You must create it and copy files to it.

    For example, if you have the following folder structure:

    resources/impex/essentialdataOne.impex

    resources/impex/essDataOne.impex