Publish a workflow copy when checking it in
The good thing about that is, when you have rules that send emails when an object is published.
/usr/local/Plone/buildout-cache/eggs/plone.app.iterate-1.2.3-py2.4.egg/plone/app/iterate/event.py
class CheckinEvent( ObjectEvent ):
implements( interfaces.ICheckinEvent )
def __init__(self, wc, baseline, relation, message):
#hack by wysi1 2009/11/28
portal_workflow = wc.portal_workflow
transitions = portal_workflow.getTransitionsFor(wc)
transition_ids = [t['id'] for t in transitions]
if 'publish' in transition_ids and wc.getPhysicalPath()[1] == 'fernuni':
wfcontext = wc.portal_workflow.doActionFor(wc, 'publish')
ObjectEvent.__init__( self, wc )
self.baseline = baseline
self.relation = relation
self.message = message
