Share via


CatalogOperationsStatus Enumeration

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Specifies the status of a catalog import, export, or rebuild operation.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Enumeration CatalogOperationsStatus
'Usage
Dim instance As CatalogOperationsStatus
public enum CatalogOperationsStatus
public enum class CatalogOperationsStatus
public enum CatalogOperationsStatus

Members

Member name Description
InProgress An import, export, or rebuild operation is in progress
Failed The import, export, or rebuild operation failed.
Completed The import, export, or rebuild operation completed successfully.
CompletedWithErrors The import operation completed with errors.
NotInProgress No import, export, or rebuild operation is in progress.
InvalidOperationId The operation ID is invalid.

Remarks

The operation may be a catalog import, export, or rebuild operation. This enumeration is checked when you get the status of the current operation by a Status check.

Examples

/// <summary>
/// Rebuilds a virtual catalog
/// </summary>
internal void RebuildCatalog(string catalogName)
{
  VirtualCatalog virtualCatalog = (VirtualCatalog)this.catalogContext.GetCatalog(catalogName);
  RebuildProgress rebuildProgress = virtualCatalog.Rebuild();
  while (rebuildProgress.Status == CatalogOperationsStatus.InProgress)
  {
    System.Threading.Thread.Sleep(3000);
    // Call the refresh method to refresh the current status
    rebuildProgress.Refresh();
  }
  Console.WriteLine(rebuildProgress.EndDate);
  // If the rebuild operation failed
  if (rebuildProgress.Status == CatalogOperationsStatus.Failed)
  {
    // Use the Errors property to get the errors that occurred during rebuild
    foreach (CatalogError error in rebuildProgress.Errors)
    {
      Console.WriteLine(error.Message);
    }
  }
}

See Also

Reference

Microsoft.CommerceServer.Catalog Namespace