Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(26)  |  Call(18)  |  Derive(0)  |  Import(8)

src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/WorkflowTool.py   Products.CMFCore(Download)
from Products.CMFCore.utils import UniqueObject
from Products.CMFCore.WorkflowCore import ActionRaisedExceptionEvent
from Products.CMFCore.WorkflowCore import ActionSucceededEvent
from Products.CMFCore.WorkflowCore import ActionWillBeInvokedEvent
from Products.CMFCore.WorkflowCore import ObjectDeleted
        for wf in wfs:
            wf.notifySuccess(ob, action, result)
            notify(ActionSucceededEvent(ob, wf, action, result))
 
    security.declarePrivate('notifyException')
        for w in wfs:
            w.notifySuccess(ob, action, res)
            notify(ActionSucceededEvent(ob, w, action, res))
        if reindex:
            self._reindexWorkflowVariables(ob)

src/i/n/intranett-HEAD/src/intranett.policy/intranett/policy/workflow.py   intranett(Download)
from zope.event import notify
from AccessControl import ModuleSecurityInfo
from Products.CMFCore.WorkflowCore import ActionSucceededEvent
 
 
def notifyActionSucceeded(state_change):
    """Called from workflow after scripts."""
 
    notify(ActionSucceededEvent(state_change.object,

src/e/u/Euphorie-6.3.1/src/euphorie/content/tests/test_functional_surveygroup.py   Euphorie(Download)
from zope.event import notify
from zope import component
from Products.CMFCore.WorkflowCore import ActionSucceededEvent
from euphorie.deployment.tests.functional import EuphorieTestCase
 
    def testUnknownWorkflowAction(self):
        self.loginAsPortalOwner()
        surveygroup = self.createSurveyGroup()
        survey = self._create(surveygroup, "euphorie.survey", "survey")
        notify(ActionSucceededEvent(survey, None, "bogus", None))
    def testPublishAction(self):
        self.loginAsPortalOwner()
        surveygroup = self.createSurveyGroup()
        survey = self._create(surveygroup, "euphorie.survey", "survey")
        notify(ActionSucceededEvent(survey, None, "publish", None))
    def testUpdateAction(self):
        self.loginAsPortalOwner()
        surveygroup = self.createSurveyGroup()
        survey = self._create(surveygroup, "euphorie.survey", "survey")
        notify(ActionSucceededEvent(survey, None, "update", None))
    def testUnpublishAction(self):
        self.loginAsPortalOwner()
        surveygroup = self.createSurveyGroup()
        survey = self._create(surveygroup, "euphorie.survey", "survey")
        notify(ActionSucceededEvent(survey, None, "publish", None))

src/e/u/Euphorie-6.3.1/src/euphorie/content/tests/test_versioning.py   Euphorie(Download)
    def publish(self, survey):
        # XXX: this should use the event system to give a more accurate test,
        # but for some reason the history is lost if we do that.
        from Products.CMFCore.WorkflowCore import ActionSucceededEvent
        from zope.event import notify
        notify(ActionSucceededEvent(survey, None, "publish", None))
    def XtestBrowseOldVersion(self):
        from Products.CMFCore.WorkflowCore import ActionSucceededEvent
        from euphorie.content.survey import handleSurveyPublish
        self.loginAsPortalOwner()
        survey = self.createSurvey()
        handleSurveyPublish(survey,
                ActionSucceededEvent(survey, None, "publish", None))
        survey["1"].title = u"Module two"
        handleSurveyPublish(survey,
                ActionSucceededEvent(survey, None, "update", None))
        self.assertEqual(
                self.portal.client["nl"]["sector"]["test-survey"]["1"].title,

src/p/l/plone.app.contentrules-3.0.7/plone/app/contentrules/tests/test_condition_wftransition.py   plone.app.contentrules(Download)
 
from Products.CMFCore.interfaces import IActionSucceededEvent
from Products.CMFCore.WorkflowCore import ActionSucceededEvent
 
 
 
        ex = getMultiAdapter((self.portal, e,
                              ActionSucceededEvent(self.folder, 'dummy_workflow', 'publish', None)),
                             IExecutable)
        self.assertEqual(True, ex())
 
        ex = getMultiAdapter((self.portal, e,
                              ActionSucceededEvent(self.folder, 'dummy_workflow', 'retract', None)),
 
        ex = getMultiAdapter((self.portal, e,
                              ActionSucceededEvent(self.folder, 'dummy_workflow', 'hide', None)),
                             IExecutable)
        self.assertEqual(True, ex())

src/p/l/plone.app.kss-1.8.0/plone/app/kss/tests/test_part_reloading.py   plone.app.kss(Download)
from plone.portlets.interfaces import IPortletManager, IPortletAssignmentMapping
from zope.component import getUtility, getMultiAdapter
from Products.CMFCore.WorkflowCore import ActionSucceededEvent
 
PloneTestCase.setupPloneSite()
        portal.portal_workflow.doActionFor(self.portal['test-page'], 'submit')
        self.create_portlet(u'review', ReviewAssignment())
        event = ActionSucceededEvent(self.folder, None, None, None)
        event.old_state, event.new_state = 'private', 'pending'
        workflowTriggersReviewPortletReload(self.portal, self.view, event)
    def test_portlet_remove(self):
        self.loginAsPortalOwner()
        self.create_portlet(u'review', ReviewAssignment())
 
        event = ActionSucceededEvent(self.folder, None, None, None)

src/o/r/ore.contentmirror-0.7.1/ore/contentmirror/ptests/test_content.py   ore.contentmirror(Download)
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata
from Products.CMFCore.WorkflowCore import ActionSucceededEvent
from Products.CMFCore.interfaces import IWorkflowTool
 
    def test_content_workflow_event_generates_update(self):
        content = self._create_content("wf-test-1")
        event = ActionSucceededEvent(content, None, None, None)
        notify(event)
        ops = operation.get_buffer().ops.values()