Documentation Center

Import and workflow

In certain circumstances, importing content into a Content Manager can trigger workflow on the imported items. This may be desirable behavior, but in the Import and Export service API, the Event System detects whether a new or updated item is the result of an import, and you can create an Event Handler to catch these kinds of events and treat them separately.

Concretely, all imported items to which the following conditions apply will automatically enter the defined Workflow Process as soon as they have been imported:

  • The items are one of the following types of content items:
    • Component
    • Multimedia Component
    • Component Template
    • Page Template
    • Page
    • Bundle
    • Template Building Block
  • These items do not yet exist on the destination Content Manager.
  • These items have a Workflow Process Definition associated with it, that is:
    Item type or item typesAssociated Workflow Process Definition
    Components and Multimedia ComponentsThe (Multimedia) Components you import are based on a Schema that has an associated Workflow Process Definition
    Component Templates and Page TemplatesThe Publication in which the Templates reside has a Workflow Process Definition defined for Component Templates and/or Page Templates
    PagesThe Pages are in a Structure Group that has an associated Workflow Process Definition
    BundlesThe Bundles are based on a Bundle Schema that has an associated Workflow Process Definition.
    Template Building BlocksThe Template Building Blocks are part of a Bundle that is subject to workflow.

If the number of items is large (typically the case for Components and Pages), this can be undesirable. Furthermore, Content Porter cannot perform a truly transactional import if these conditions apply, because it cannot undo the Workflow Process once it has started.

To prevent workflow from being triggered, when you are importing, you can catch the import event in a custom Event Handler and treat these items differently.