cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to request a value from the Hybris server in a filter expression in Datahub

Former Member
0 Likes
278

Hi Experts,

is it somehow possible to call a method on the Hybris server from a Datahub filterExpression and get the return value?

Scenario: An order with only a few filled fields should update an already existing order in Hybris. The order comming from the SAP system should only be published to Hybris if the order is already present in Hybris.

Any thoughts or ideas are appreciated.

Marten

Accepted Solutions (0)

Answers (1)

Answers (1)

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

I wouldn't query / call the hybris server, but move the logic to hybris by implementing a custom de.hybris.platform.impex.jalo.imp.ImportProcessor that checks if this particular line in the impex may be processed.

For inspiration, check the de.hybris.platform.ruleengineservices.impex.impl.ConditionalImportProcessor and how it is used to check if a rule is allowed to be imported, promotionenginesamplesaddon/import/stores/*/promotions.impex

IIRC, various SAP integrations use similar tricks (custom ImportProcessors and other stuff) to execute extra logic and not just import data.