Victor Safronovich wrote:
Hello Dieter Maurer,

Thursday, October 20, 2005, 1:44:27 AM, you wrote:

DM> Victor Safronovich wrote at 2005-10-17 13:10 +0600:

By the way i think code:
      for w in wfs:
          w.notifySuccess(ob, action, res)
      if reindex:
in  _invokeWithNotification should be turn upside-down to:
      if reindex:
      for w in wfs:
          w.notifySuccess(ob, action, res)
am i right?

DM> Why do you think so?

DM>   I find the original order more natural (in case "notifySuccess"
DM>   would change some workflow variables).
   My  product  used  DCWorkflow  in  a  wrong way. It is override notifySuccess
   method  and  called many scripts in this method, instead of adding before and
   after   scripts  to  transition.  And to my product it is necessary ( i think
   because  of  allowedRolesAndUsers  index  )  that  ob  must be reindexed 
   notifySuccess was called.

Yes that's a legitimate use case. Note that I have opened about this.

   By  the  way  is  it  correct  to skip ObjectMoved, ObjectDeleted errors from
   notifyBefore, notifySuccess, notifyException  methods in
   _invokeWithNotification method?

They're not skipped, they're treated specially. These exceptions are the way for transition code to notify the caller that something happened to the underlying object.


Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   [EMAIL PROTECTED]
Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to