Personal tools
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

6.4.2.6. Update your workflows to use GenericSetup profiles

Up one level
To install workflows in Plone 3.0, you have to make use of CMF's GenericSetup profiles. Installing workflows in any other way is not supported, unfortunately — there are architectural changes in CMF that cannot support both approaches at the same time.

Installing workflows via GenericSetup will make your product work only on Plone 2.5 and upwards, so make sure you create a special release/branch if you want your product to still work on Plone 2.1/2.0 (which are unsupported releases when Plone 3.0 is released).

Typical error message that indicates that you are trying to install workflows not using GenericSetup:

  ImportError: cannot import name addWorkflowFactory

For existing workflows, the easiest way to make the product install use GenericSetup for workflows is:

  • Install your product (and its workflows) using Plone 2.5.
  • Using the portal_setup tool in the ZMI, export a snapshot of the current site profile:
    • Click the Export tab.
    • Select the parts you want to export the configuration for (in this case, Workflow Tool).
    • Click the Export Selected Steps button.
    • You will now get a tar file named something like setup_tool-20070424225827.tar.
  • Unpack the tar file, and put the resulting files and directories in a directory profiles/default/ in the root of your product.
  • Remove the workflow directories in workflow/ that are not part of your product, and edit workflows.xml so that it only has the information for your workflows. See Poi changeset 41071 for an example.
  • Delete your old '.py'-based workflow definitions in Extensions, but make sure you keep any workflow scripts, since these will be referenced from the profile definitions.
  • Add a configure.zcml file in the root of your product that registers the default profile. See Poi's configure.zcml for an example.
  • Remove the redundant code from Extensions/Install.py and add the boilerplate code to invoke the GS setup, see Poi changeset 41071 for an example.

This process is also the same for any code you want to move to GenericSetup, in the Poi example, we also moved the catalog metadata and various other things to use GenericSetup profiles, and could get rid of most of Install.py in the process.

by Alexander Limi last modified June 27, 2007 - 14:47
Contributors: Martin Aspeli, Geir Bækholt, Sisi Nutt
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by