Hi,
We are using B2C accelerator for a marketplace implementation and have a scenario where once the shipment plan is created in the back end, the middleware sends an order status update feed in which consignment details are sent.
The interface is update order status interface. When the consignments are created within milliseconds, we get Model Saving exception saying MPConsignment.order cannot be changed except during item creation
2016-07-18 13:01:07,891 INFO [org.springframework.jms.listener.DefaultMessageListenerContainer#1-1] [] () [com.ril.integration.order.impl.MPOrderStatusJMSServiceImpl] [receiveMessage] orderstatus for order no : OD0000208110
2016-07-18 13:01:08,121 ERROR [org.springframework.jms.listener.DefaultMessageListenerContainer#1-1] [] () [com.ril.integration.order.impl.MPOrderStatusJMSServiceImpl] [receiveMessage] Error while saving order status for order no OD0000208110 -
de.hybris.platform.servicelayer.exceptions.ModelSavingException: attribute com.ril.core.jalo.MPConsignment.order cannot be changed except during item creation
at de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.storeAttributes(ItemModelConverter.java:1453)
at de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.save(ItemModelConverter.java:692)
at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.save(ModelWrapper.java:336)
at de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.saveOthers(ResolvingModelPersister.java:64)
at de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.persist(ResolvingModelPersister.java:49)
at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveViaJalo(DefaultModelService.java:1059)
at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.doJaloPersistence(DefaultModelService.java:648)
I see in the data model of consignment that order attribute has readable set to true. However, an order can have multiple consignments and for each consignment we can as well have multiple status updates. So this scenario should work. If there is a time gap between 2 updates then the issue is not observed.
Note: We use JMS implementation of TIBCO with multiple spring listeners in hybris.
To add to it, the listeners are on different nodes for high availability, so even syncronization won't work.
Saurabh