Hi Mark

I use event subscribers for that since it is so easy to wire into workflow. Here is an example:

zcml
----
    <subscriber
        for="Products.ProjectManager.interfaces.IProject
             Products.DCWorkflow.interfaces.IAfterTransitionEvent"
        handler=".events.afterTransitionProject"
        />

Handler
-------
def afterTransitionProject(self, event):
    """
    Perform actions on workflow transitions
    """
    if event.new_state.id == 'canceled':
      # Do something here
      pass

The downside is that your scripts are not visible through the ZMI.

Hedley

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to