If you create multiple TypeConstraints applying on the same composedtype, the evaluation order of the constraints will be different each time you restart the hybris platform. As a showcase, an demo extension is created which contains three TypeConstraint definitions i.e. TestProductConstraintOne, TestProductConstraintTwo and TestProductConstraintThree. The isValid() method of them return always true and print out a simple message in the console. As shown in the pictures below, it is proved the evaluation order of them are arbitrary.
However sometimes the constraints need be evaluated in certain order to fulfill certain business requirements.
SAP Hybris commerce suite 5
hybris, validation, typeconstraint, evaluation, order , KBA , CEC-COM-CPS , SAP Commerce , How To
About this pageThis is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).
Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.