Hide menu Last updated: Oct 20 2016
Area: Episerver Commerce Applies to versions: 9

Breaking changes in Commerce 9

Some changes are binary breaking but do not necessarily require code changes but rather just a recompilation of the project. Breaking changes are changes in method signatures or behavior of methods compared to the documented API in the previous version. These APIs are described below.


Removal of CatalogContentDraft and CatalogContentDraftStore

Since CatalogContentDraft and CatalogContentDraftStore are no longer used, they were removed from EPiServer Commerce core, and moved to the EPiServer.Commerce.Internal.Migration assembly. There is no change in the Content API, and all existing features are still supported. The CatalogContentProvider now uses the CatalogContentVersionStore instead of CatalogContentDraftStore as the VersionRepository.

Removal of MetaDataPlus tables

All MetaDataPlus tables related to catalog content were removed, and replaced by appropriate views with the same name. You can still query data from that view using the same name as when querying from the table. However, it is recommended to query data directly from the CatalogContentProperty table.

If you are using ecf_CatalogNodeSearch with a custom @MetaSQLClause, or CatalogSystem.FindNodesDto (or FindItemsDto) with a custom CatalogSearchParameters.SqlMetaWhereClause, you need to update your Meta Sql clause to filter data from the CatalogContentProperty table.

For example, if your clause was “META.DisplayName like ‘%Camera%’“, update it to “META.MetaFieldName = ‘DisplayName’ AND META.LongString like ‘%Camera%’”. The mapping between meta field type and the corresponding column name is declared in MetaDataTypes._DefaultColumnNames, and you can get this by using MetaDataTypes.GetColumnName(MetaDataType type).

The manner of storing property data of catalog content has also changed. Previously, each property corresponded to one column in the MetaDataPlus table. Therefore, one content item had one row in MetaDataPlus table. After this update, each property corresponds to one row in CatalogContentProperty, and its value is stored in the column corresponding its data type.

For example, if a property has a boolean type value, its value is persisted in a column named “Boolean” of CatalogContentProperty table. This way, a content item which has several properties has a set of rows in the CatalogContentProperty table. When you add or remove properties from content, only the number of rows changes. There is no need to change the structure of the property table as before, which means that the table is not locked for this reason. The same thing is done for the content version. Property data for each content version is stored in the ecfVersionProperty table using the same logic.

Removal of SerializedData column in CatalogEntry table

With the proper cache mechanism, the SerializedData column was no longer needed so was removed together with the CatalogIndexer project.

Catalog content WorkId unique across system

To improve performance as well as align with CMS, the WorkId for catalog content is now unique, regardless of content ID. Some records in the blProjectItem table have references to WorkId. These will be migrated during the upgrade, when the data migration is executed.

Individual publish status for languages

The new system metafields, IsPublishedField, StartPublishField, StopPublishField (field names in database are Epi_IsPublished, Epi_StartPublish, Epi_StopPublish, respectively), determine whether content is published in a given language. This allows Commerce 9 to handle published version of catalog content individually. These fields are language-specific.

If you are using Content API, these fields can be accessed by IVersionable.IsPendingPublishIVersionable.StartPublish and IVersionable.StopPublish. Note that all catalog contents implement IVersionable.

If you are using MetaDataPlus API, those field can be accessed from a catalog MetaObject, for example metaObject[IsPublishedField.FieldName]. If you upgrade your code from Commerce 8 or lower to Commerce 9, you will have to set these fields explicitly. Catalog content only appears to be "published" in the Catalog UI if it has at least IsPublishedField set to true and StartPublishField set to a valid date.

If you are using DTOs, there are several extensions methods in EPiServer.Commerce.Extensions namespace to check if an entry or a node is active (published) and/or available (active and the current time is within StartPublish and StopPublish) in a specific language version, for example IsPublished(languageName) or IsAvailable(languageName).

UIMaxVersions setting

The UIMaxVersions setting declares the maximum number of previously-published versions to be retained. If UIMaxVersions is zero, the default value of 20 is used (negative numbers are not accepted).

Changed sql type from MONEY to DECIMAL(38, 9)

The sql data type for monetary amounts and quantity fields has been changed from money to decimal (38, 9).

Data GuidCatalogMapping/GuidNodeMapping/GuidEntryMapping moved to Catalog/CatalogNode/CatalogEntry

A new column, name ContentGuid, was added to the Catalog/CatalogNode/CatalogEntry tables, and ContentGuid data from GuidCatalogMapping/GuidNodeMapping/GuidEntryMapping will be migrated to these columns. The GuidCatalogMapping/GuidNodeMapping/GuidEntryMapping tables are no longer used.

Removal of log4net dependencies

Commerce no longer has dependencies on log4net, and uses EPiServer.Logging instead. The AppDatabaseAppender class and LogExtensions.DebugBeginMethod() method were removed. If you do not explicitly use log4net.dll and log4net.config, you can safely remove them.

Removal of Mediachase.cms dependency

Commerce no longer depends on Mediachase.cms, and related tables are removed from the Commerce database together with related configurations. After upgrading to version 9 file, you can safely remove "Configs/ecf.cms.config" from projects.

List of removed tables:

  1. dps_Control
  2. dps_ControlStorage
  3. dps_Node
  4. dps_NodeType
  5. dps_PageDocument
  6. dps_TemporaryStorage
  7. main_GlobalVariables
  8. main_LanguageInfo
  9. main_Menu
  10. main_MenuItem
  11. main_MenuItem_Resources
  12. main_PageAttributes
  13. main_PageState
  14. main_PageTree
  15. main_PageTreeAccess
  16. main_PageVersion
  17. main_Templates
  18. NavigationCommand
  19. NavigationItems
  20. NavigationParams
  21. Site
  22. SiteLanguage
  23. SiteSecurity
  24. Workflow
  25. WorkflowStatus
  26. WorkflowStatusAccess

Removal of obsoleted class/methods from TransactionScope

TransactionScope classes and methods previously marked as obsoleted are now removed and should not be used.

HierarchicalCatalogPartialRouter methods using ILanguageSelector no longer called

EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter had two protected virtual methods with an ILanguageSelector parameter: (GetCatalogContentRecursive and FindNextContentInSegmentPair). These methods are no longer called, and the method with the same name with a CultureInfo parameter should be used instead. 

Removal of WorkflowConfiguration

The Mediachase.Commerce.WorkflowConfiguration has been removed, as well as WorkflowDefinition and WorkflowCollection. To get the workflow definition and the class name, use the ExecutionManager class.

var activityFlowModel = GetInstance<ExecutionManager>().GetActivityFlowModel(workflowName);
var sactivityFlowType = workflowDefinition.ActivityFlowType;

WorkflowManager obsoleted

The Mediachase.Commerce.Engine.WorkflowManager has been obsoleted, and is not used. Use ExecutionManager instead to run a workflow.


API Changes

REMOVED

Namespace EPiServer.Commerce.Catalog.Provider

  • CatalogContentDraft class
  • CatalogContentDraftStore class

These classes were moved to EPiServer.Commerce.Internal.Migration.dll.

Namespace EPiServer.Business.Commerce.ScheduleJobs

  • SerializeDataIndexJob class

Namespace EPiServer.Commerce.Catalog.Provider

  • CatalogContentGuidProvider class
  • CatalogContentProvider class:
    - CatalogContentProvider(ContentFactory, ServiceAccessor<IContentTypeRepository>, TemplateResolver, UrlSegmentHandler, ILanguageBranchRepository, IFolderIDGenerator, LanguageSelectorFactory, CatalogContentDraftStore, IContentLoader, CatalogContentLoader, CatalogContentGuidProvider, UrlResolver, ReferenceConverter, MetaClassContentFactory, ILinksRepository, IContentCopyHandler, IPriceService, IWarehouseInventoryService).
    - CatalogContentProvider( ContentFactory, ServiceAccessor<IContentTypeRepository>, TemplateResolver, UrlSegmentHandler, ILanguageBranchRepository, IFolderIDGenerator, LanguageSelectorFactory, CatalogContentDraftStore, IContentLoader, CatalogContentLoader, CatalogContentGuidProvider, UrlResolver, ReferenceConverter, MetaClassContentFactory, ILinksRepository, IContentCopyHandler, IPriceService, IWarehouseInventoryService, IValidationService).
    - CatalogContentProvider( ContentFactory, ServiceAccessor<IContentTypeRepository>, TemplateResolver, UrlSegmentHandler, ILanguageBranchRepository, IFolderIDGenerator, LanguageSelectorFactory, CatalogContentDraftStore, IContentLoader, CatalogContentLoader, CatalogGuidMapping, UrlResolver, ReferenceConverter, MetaClassContentFactory, ILinksRepository, IContentCopyHandler, IPriceService, IWarehouseInventoryService, IValidationService).
    - CatalogContentProvider( ContentFactory, ServiceAccessor<IContentTypeRepository>, TemplateResolver, UrlSegmentHandler, ILanguageBranchRepository, IFolderIDGenerator, LanguageSelectorFactory, CatalogContentDraftStore, IContentLoader, CatalogContentLoader, CatalogGuidMapping, ReferenceConverter, ILinksRepository, IContentCopyHandler, IPriceService, IWarehouseInventoryService, IValidationService, ICatalogSystem).
    - ListMatchingDrafts(ContentReference,string).

Namespace EPiServer.Commerce.Catalog.Provider.Construction

  • RootBuilder class:
    - RootBuilder(LocalizationService, MetaClassContentFactory, CatalogContentGuidProvider).
  • CatalogBuilder class:
    - CatalogBuilder(ICatalogSystem, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogContentGuidProvider).
  • NodeBuilder class:
    - NodeBuilder(ICatalogSystem, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogContentGuidProvider).
  • EntryBuilder class:
    - EntryBuilder(ICatalogSystem, IPriceService, IWarehouseInventoryService, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogContentGuidProvider).

Namespace Mediachase.Commerce

  • WorkflowDefinition class
  • WorkflowCollection class
  • WorkflowConfiguration class

Namespace Mediachase.Commerce.Engine

  • WorkflowManager class:
    - static System.Void ExecuteWorkflow (String, Dictionary<String, object>, Guid)
  • WorkflowResults class:
    - static WorkflowResults CreateCompletedWorkflowResults(WorkflowCompletedEventArgs)
    - static WorkflowResults CreateTerminatedWorkflowResults(WorkflowTerminatedEventArgs)
    - static WorkflowResults CreateAbortedWorkflowResults(WorkflowEventArgs)
    -static WorkflowResults CreateRunningWorkflowResults(WorkflowEventArgs)
    -Guid get_InstanceId()
  • SynchronizationContextSchedulerService class

Namespace Mediachase.Commerce.Catalog.ImportExport

  • CatalogImportExport class, remove constructor:
    - CatalogImportExportpublic System.Void .ctor (ICatalogSystem, IPriceService , IWarehouseRepository, IWarehouseInventoryService, CatalogGuidMapping, .ReferenceConverter, CatalogItemAssetImportExport)
    - CatalogImportExport (ICatalogSystem, IPriceService, IWarehouseRepository, IInventoryService, CatalogGuidMapping,ReferenceConverter, CatalogItemAssetImportExport).
    - CatalogImportExport (ICatalogSystem, IPriceService, IWarehouseRepository, IInventoryService, CatalogGuidMapping, ReferenceConverter, CatalogItemAssetImportExport, UniqueSeoGenerator).

Namespace Mediachase.Commerce.Extensions

  • LogExtensions class:
    - DebugBeginMethod(log4net.ILog, String, System.Object[])

Namespace Mediachase.Commerce.Core.Log.Appender

  • AppDatabaseAppender class

Namespace Mediachase.Data.Provider

  • TransactionScope class:
    - static System.Void DeEnlist (System.Data.IDbCommand)
    - static System.Void Enlist (System.Data.IDbCommand, System.String, Mediachase.Data.Provider.TransactionScope/ConnectionDelegate)
    - static System.Data.IsolationLevel get_IsolationLevel ()
    - static System.Void set_IsolationLevel (System.Data.IsolationLevel)
    - System.Void .ctor (System.Data.IsolationLevel)
    - System.Collections.Hashtable get_Transactions ()

Namespace Mediachase.Commerce.Engine.Sites

  • SiteEntity class
  • SiteProvider class
  • SiteProviderCollection class
  • SiteProviderSection class
  • SiteService class

 CHANGED

Namespace EPiServer.Commerce.Catalog.Provider.Construction

  • CatalogBuilder class:
    - bool HandleType(CatalogContentType catalogContentType) is now possible to override
    - IList<CatalogContentBase> Create(IList<ContentReference>, is now possible to override
  • NodeBuilder class:
    - IList<CatalogContentBase> Create(IList<ContentReference>, string) is now possible to override
    - bool HandleType(CatalogContentType catalogContentType) is now possible to override
  • EntryBuilder class:
    - IList<CatalogContentBase> Create(IList<ContentReference>, string) is now possible to override
    - bool HandleType(CatalogContentType catalogContentType) is now possible to override

Namespace Mediachase.Commerce.Workflow.Admin

  • POCalculateTotalsVNextWorkflow class
  • POCalculateTotalsWorkflow class
  • POCompleteShipmentWorkflow class
  • POSplitShipmentsWorkflow class
  • POSaveChangesWorkflow class

Namespace Mediachase.Commerce.Workflow

  • CartCheckoutWorkflow class
  • CartPrepareVNextWorkflow class
  • CartPrepareWorkflow class
  • CartValidateVNextWorkflow class
  • CartValidateWorkflow class
  • CheckAndReserveInstorePickupWorkflow class
  • PurchaseOrderRecalculateVNextWorkflow class
  • PurchaseOrderRecalculateWorkflow class
  • ReturnFormCompleteWorkflow class
  • ReturnFormRecalculateWorkflow class

Namespace Mediachase.Commerce.Workflow.Activities

  • OrderGroupActivityBase class
  • CheckInventoryActivity class
  • CalculateDiscountsActivity class
  • CalculateDiscountsVNextActivity class
  • CalculateTaxActivity class
  • CalculateTotalsActivity class
  • CapturePaymentActivity class
  • ProcessShipmentsActivity class
  • RemoveDiscountsActivity class
  • RemoveDiscountsVNextActivity class
  • ValidateLineItemsActivity class

Namespace Mediachase.Commerce.Workflow.Activities.PurchaseOrderActivities

  • HandoffActivityBase class
  • PurchaseOrderBaseActivity class
  • AdjustInstoreInventoryActivity class
  • CalculatePurchaseOrderStatusActivity class
  • CheckInstoreInventoryActivity class

Namespace Mediachase.Commerce.Workflow.Activities.Cart

  • CartActivityBase class
  • ProcessHandlingActivity class
  • AdjustInventoryActivity class
  • GetFulfillmentWarehouseActivity class
  • ProcessPaymentActivity class
  • RecordPromotionUsageActivity class
  • ShipmentSplitActivity class

Namespace Mediachase.Commerce.Workflow.Activities.OrderGroupActivities

  • UpdateTotalsVNextActivity class

Namespace Mediachase.Commerce.Workflow.Activities.ReturnForm

  • ReturnFormBaseActivity class
  • CalculateExchangeOrderStatusActivity class
  • CalculateReturnFormStatusActivity class
  • CalculateReturnFormTaxActivity class
  • CalculateReturnFormTotalsActivity class

Namespace Mediachase.Commerce.Workflow.Activities.ReturnFormActivities

  • CreateExchangePaymentActivity class

MARKED AS OBSOLETE

Namespace EPiServer.Commerce.Catalog.Provider

  • CatalogContentCommitterHandler class:
    - Constructor CatalogContentCommitterHandler(IEnumerable<ICatalogContentCommitter>)
    - ContentReference Save(CatalogContentBase)
    - Delete(CatalogContentBase)

Namespace Mediachase.Commerce.Storage

  • MetaObjectAccessor class:
    - Constructor MetaObjectAccessor(byte[], int, int)

Namespace EPiServer.Commerce.Catalog.Provider.Construction

  • CatalogPropertyLoader:
    - CatalogPropertyLoader(ICatalogSystem, ReferenceConverter, MetaDataPropertyMapper, LocalizationService)
    - CatalogPropertyLoader(MetaDataPropertyMapper, LocalizationService, MetaDataPropertyConfiguration)
  • CatalogBuilder class:
    - CatalogBuilder(ICatalogSystem, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter,CatalogGuidMapping)
  • NodeBuilder class:
    - NodeBuilder(ICatalogSystem, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogGuidMapping)
    - SetChangeTrackingProperties
  • EntryBuilder class:
    - EntryBuilder(ICatalogSystem, IPriceService, IWarehouseInventoryService, MetaClassContentFactory, ICatalogPropertyLoader, ReferenceConverter, CatalogGuidMapping)
    - SetChangeTrackingProperties

Namespace EPiServer.Commerce.Catalog.Provider.Persistence

  • ICatalogContentCommitter interface:
    - ForType property
    - Delete(CatalogContentBase content).
  • EntryContentBaseCommitter class:
    - ForType property
    - Delete(CatalogContentBase content).
  • NodeContentCommitter class:
    - ForType property
    - Delete(CatalogContentBase content).
  • CatalogContentCommitter class:
    - ForType property
    - Delete(CatalogContentBase content)

Namespace EPiServer.Commerce.Catalog.Provider

  • CatalogGuidMapping class

Comments