Hot Folders in SAP Commerce(Hybris)

  • automize data import;
  • fast than regular impex;
  • files can be generated by other system.
  • HeaderSetupTask: Creates a new BatchHeader with some information. BatchHeader is used as a reference for file throughout the flow.
  • HeaderInitTask: Initilization step which helps us to retrieve sequenceId and (optionally) a language from the file name and add them to the BatchHeader.
  • ImpexTransformerTask: Creates one or many impex files from the original CSV file with the help of ImpexConverter and writes error lines to the error subdirectory.
  • ImpexRunnerTask: Processes(imports) all impex files sequentially with multiple threads using ImportService.importData().
  • CleanupTask: Deletes all transformed files(impex) and moves the imported file(original csv) to archive folder.
  • ErrorHandler: Deletes all transformed files(impex) and moves the imported file(original csv) to error folder.
  1. We create hot-folder-example-spring.xml in \hybris\bin\custom\example\examplecore\resources\examplecore\integration and import it in examplecore-spring.xml
  • header : the header of the generated impex;
  • impexRow : the mapping between the column of the csv file and the impex file.
  • rowFilter: An optional row filter. The supplied expression must be a valid Groovy expression. The current row map consisting of column ID and value is referenced by row.
  • type: An optional type that can be retrieved in the header using the header substitution $TYPE$.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store