Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.



ChangeSetPolicy controls various aspects of Change Set behavior, including:

Out of the box, Elastic Path includes a default Change Set Policy implementation, ChangeSetPolicyImpl, which is configured in:

	<bean id="changeSetPolicy" parent="abstractChangeSetPolicy"/>

	<bean id="abstractChangeSetPolicy" abstract="true" class="com.elasticpath.service.changeset.impl.ChangeSetPolicyImpl">
		<property name="changeSetDao" ref="changeSetDao"/>
		<property name="businessObjectResolver" ref="businessObjectResolver"/>
		<property name="businessObjectGroupDao" ref="businessObjectGroupDao"/>
		<property name="metadataResolvers">
				<ref bean="promotionMetadataResolver"/>
				<ref bean="productMetadataResolver"/>
				<ref bean="productSkuMetadataResolver"/>
				<ref bean="categoryMetadataResolver"/>
				<ref bean="dynamicContentMetadataResolver"/>
				<ref bean="dynamicContentDeliveryMetadataResolver"/>
				<ref bean="priceListDescriptorMetadataResolver"/>
				<ref bean="priceListAssignmentMetadataResolver"/>
				<ref bean="categoryTypeMetadataResolver"/>
				<ref bean="savedConditionMetadataResolver"/>
				<ref bean="baseAmountMetadataResolver"/>
				<ref bean="catalogMetadataResolver"/>
				<ref bean="attributeMetadataResolver"/>
				<ref bean="skuOptionMetadataResolver"/>
				<ref bean="skuOptionValueMetadataResolver"/>
				<ref bean="productTypeMetadataResolver"/>
				<ref bean="brandMetadataResolver"/>
		<property name="changeSetDependentResolvers">
                <ref bean="baseAmountChangeSetDependencyResolver"/>
                <ref bean="productChangeSetDependencyResolver"/>
				<ref bean="productBundleChangeSetDependencyResolver"/>
				<ref bean="categoryChangeSetDependencyResolver"/>
				<ref bean="skuChangeSetDependencyResolver"/>
				<ref bean="promotionChangeSetDependencyResolver"/>
				<ref bean="catalogCategoryTypeChangeSetResolver"/>
				<ref bean="productTypeChangeSetDependencyResolver"/>


Supporting New Object Types in Change Sets

The objectTypes property in the changeSetPolicy bean definition is a map of object types keyed on the interface class name.

<property name="objectTypes">
            <value>Product Bundle</value>
            <value>Product SKU</value>

To add support for a new business object, add a new key-value pair to the map.


New business object types may also require new Object GUID resolvers.

Configuring Object GUID Resolvers

All business objects that can be added to Change Sets are required to have a globally unique business identifier. Many Elastic Path domain objects have a built-in GUID property, but others do not.

Object GUID resolvers are used to locate the unique business identifier of a business object. The following resolvers are available out of the box:

  • DefaultObjectGuidResolver, used for most Elastic Path domain object types, this simply uses the domain object's GUID as the business object GUID.
  • CategoryGuidResolver, which constructs a GUID from the Category's non-unique GUID and the parent Catalog's GUID.
  • PriceListDescriptorGuidResolver, which uses the PriceListDescriptorDTO's GUID.
  • BaseAmountDtoGuidResolver, which uses the BaseAmountDTO's GUID.

The supported object GUID resolvers are defined in the objectGuidResolvers of the changeSetPolicy bean. The default GUID resolver is set in the defaultObjectGuidResolver property.

<property name="objectGuidResolvers">
        <entry key="com.elasticpath.domain.catalog.Category">
            <bean class="com.elasticpath.service.changeset.impl.CategoryGuidResolver" />
        <entry key="com.elasticpath.common.dto.pricing.PriceListDescriptorDTO">
            <bean class="com.elasticpath.service.changeset.impl.PriceListDescriptorGuidResolver"/>
        <entry key="com.elasticpath.common.dto.pricing.BaseAmountDTO">
            <bean class="com.elasticpath.service.changeset.impl.BaseAmountDtoGuidResolver"/>
<property name="defaultObjectGuidResolver" ref="defaultObjectGuidResolver"/>

If you need to support additional business object types that cannot use one of these resolvers, you can create a custom resolver by extending ObjectGuidResolver and adding a mapping to the objectGuidResolvers property of the changeSetPolicy bean definition.

Controlling Addition of Objects to Change Sets

The isChangeAllowed method of ChangeSetPolicy is implemented to determine whether objects can be added to the specified Change Set. The default implementation simply checks to see if the Change Set is in the OPEN state.

public boolean isChangeAllowed(final String changeSetGuid) {
    final ChangeSet changeSet = this.changeSetDao.findByGuid(changeSetGuid);
    if (changeSet == null) {"Change set with GUID: " + changeSetGuid + " could not be found");
        return true;
    final ChangeSetStateCode stateCode = changeSet.getStateCode();

    return ObjectUtils.equals(ChangeSetStateCode.OPEN, stateCode);