on 2018 Aug 14 9:44 AM
Hi ALL
Can you please let me know if there is any ootb event to know the consignment is created in hybris. I have found one event called ConsignmentProcessingEvent, but not sure what it is used for. If no event, what process should be followed. Should I go for interceptor?
Thanks.
Request clarification before answering.
Hello Gopi,
There is no interceptor that gets triggered when the ConsignmentModel is created. ConsignmentProcessingEvent is just the Abstract base class for all OrderProcess events. And events just hold the necessary data to be passed to the EventListener, they're not responsible for detecting when a model instance gets created.
To detect creation of consignment you should implement your own interceptor that implements InitDefaultsInterceptor. Here you can find a simple explanation: https://www.stackextend.com/hybris/use-interceptors-in-sap-hybris/
Hope that helps,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply
As you suggested InitDefaultsInterceptor would be invoked when an instance of a model is created. i.e;modelService.create(ConsignmentModel.class) My requirement is to get the consignment when it is successfully saved into the database. So, in this case, I can go with PrepareInterecptor which can be invoked when the model is saved.
Regards GopiChand
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.