• Remember Mailing List

Re: Having Problems customizing the workflow

from Rob Miller on Dec 31, 2007 02:16 PM
Mark Phillips wrote:
> I am running:
> Plone 2.5.2,
> CMF-1.6.4,
> Zope (Zope 2.9.7-final, python 2.4.4, linux2),
> Five 1.4.2,
> Python 2.4.4 (#2, Aug 16 2007, 02:03:40) [GCC 4.1.3 20070812
> (prerelease) (Debian 4.1.2-15)],
> PIL 1.1.6
> membrane 1.0
> remember 1.0
> 
> I created an new product that adds some fields to the standard remember
> join form. I used the included member_approval_workflow, and everything
> worked - new members got the correct emails, the manager was notified of
> pending member requests, etc.
> 
> Then, I tried to modify the member_approval_workflow by copying the
> member_approval_workflow from remember to my product (workflows.xml and
> the accompanying workflows directory). I went through the workflows.xml
> and workflows directory to change the names from
> member_approval_workflow to ahs_member_workflow. I then re-installed
> (portal-types-> update and import) my product, the new workflow appeared
> in portal-workflows. The new workflow is associated with the correct
> products in portal-workflows, and the default member is my new member
> type. The states, transitions, etc. all appear in the portal-workflows.
> 
> However, now the workflows are broken. Now all I get is the
> member_auto_workflow. But, no email is sent with the password. I tried
> to back out of this situation by removing the new workflows from my
> product, and reinstalling everything, but now the
> member_approval_workflow does not work, even though it is associated
> with my product type. All the states etc. are still in the
> portal-workflows, but it is not being followed.
> 
> My questions:
> 
> 1. Short of deleting the site and starting over, how do I get it back to
> working the way it was before I tried to change the workflows? (This is
> a development site, so I can delete it and start over).

unfortunately, i don't have any ideas for you here.  the workflow definition 
stuff is a bit finicky, and there are any number of small mistakes that could 
be in the XML or elsewhere that are interfering with your rig.

> 2. What is the "correct" way to make changes to the workflows? In my
> product, or should I do it through portal-workflows in the ZMI?

both, sort of.  i recommend the following process:

- start by using the ZMI to get everything working... copy/paste the workflow 
that most matches what you want, then use the ZMI to edit your copy 
appropriately.  use the ZMI to associate all of the types as desired.

- once this is done, use the export tab of the portal_setup tool to export the 
workflow tool step.  this will provide you with the XML that represents all of 
the workflows and type associations for your entire product, as a tarball on 
your local machine.

- open up the generated XML configuration, and remove all of the stuff you 
don't care about.  you'll want to make sure you retain any custom workflow 
associations that your product needs, in the workflows.xml file, as well as 
your custom workflow definitions in the workflows directory.

once you've removed all of the extra stuff from your exported workflow config, 
you should be able to drop the remainder into your product's profile to 
reproduce your customizations elsewhere.

good luck!

-r
Return to date view: threaded or flat