SAP Hybris suite , Hybris tutorial, Java, J2ee Stuff Online-

0
How can prioritise file feed import order in hot folder in hybirs - interview question 2017

Open 1 Answers 339 Views
Hello Friends,

Can you please explain to prioritise the which file will import first during file import in hot folder in hybris

1 Answer

0
You can use below code snippet:

<file:inbound-channel-adapter id="batchFilexyz"
        directory="" filename-regex="^(.*)_(\d+)\.csv"
        comparator="xyzFileOrderComparator" auto-startup="#{autoStartProduct}">

</file:inbound-channel-adapter>

<bean id="xyzFileOrderComparator"
        class="de.hybris.platform.acceleratorservices.dataimport.batch.FileOrderComparator">
        <property name="prefixPriority">
            <map>
                <!-- default priority is 0 -->
                <entry key="File_4" value="1" />
                <entry key="File_3" value="2" />
                <entry key="File_2" value="3" />
                <entry key="File_1" value="4" />
              </map>
        </property>
    </bean>
answered Jul 7 by Piyush

...