Tres Seaver schrieb:

Yep -- this is how the "typical" site uses those dates.  However, some
folks want actual workflow transitions to happen ASAP after each date
passes.  In that case, you need to write a periodic task which searches
for objects which are in the "between" state (e.g., their expiration
date has passed but they are still "active"), and cause the workflow
tool to "tickle" the transition machinery.  E.g., as a Python Script::

  # untested
  for brain in context.portal_catalog.searchResults(
                        expiration_date={'query': ZopeTime(),
                                         'operator': 'max'}):
      obj = brain.getObject()
      wf_tool.doActionFor(ob, 'expire')

Yep. And just reinforcing the obvious:
Trigger the script Tres mentioned on a regular basis
yourself, either using a cron job or Zope's ClockServer
from Chris (included in Zope 2.10 now?)


Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to