Class KymaEventFilterServiceImpl
java.lang.Object
de.hybris.platform.kymaintegrationservices.event.impl.KymaEventFilterServiceImpl
- All Implemented Interfaces:
KymaEventFilterService
Default implementation of the interface
KymaEventFilterService to filter Kyma events
based on the result of execution a Groovy script attached to the event configuration.-
Constructor Summary
ConstructorsConstructorDescriptionKymaEventFilterServiceImpl(@NotNull ScriptingLanguagesService scriptingLanguagesService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfilterKymaEvent(EventSourceData eventSourceData) The filtering logic is implemented in the attached script of the event configuration (e.g., model://kymaOrderFilter).
-
Constructor Details
-
KymaEventFilterServiceImpl
public KymaEventFilterServiceImpl(@NotNull @NotNull ScriptingLanguagesService scriptingLanguagesService)
-
-
Method Details
-
filterKymaEvent
The filtering logic is implemented in the attached script of the event configuration (e.g., model://kymaOrderFilter). The filter script receives the event through an input argument called event and should return true or false. If the filter script fails to execute successfully, an error message will be logged and returns false.- Specified by:
filterKymaEventin interfaceKymaEventFilterService- Parameters:
eventSourceData- Contains Kyma event and its configuration- Returns:
- A boolean flag indicates if the event will be sent to Kyma or not. If the flag is true, the event will be sent; otherwise the event will not be sent.
-