[Zope-CMF] wrong review_state DURING state transition
romain at zzict.com
Mon Dec 1 19:26:55 EST 2003
I have a product installer that does various things, including
instantiating, copying, publishing some content items and updating the
Some of the items are published in the installer using the following code:
if o.isPrincipiaFolderish :
This works fine.
The state transition triggers a reindexObject call on the object in
question, but if I try to access the review_state of that object inside
the reindexObject method, with following code snippet:
workflows = self.portal_workflow.getWorkflowsFor(self)
workflow = workflows
state = workflow.getInfoFor(self, 'review_state','')
it returns the old review state, and not 'published' .
Using a more direct approach with:
does not help.
Googling for a solution, I found
But the content type class has following inheritence signature:
class MyType (PortalContent, DefaultDublinCoreImpl ):
__implements__ = ( PortalContent.__implements__,
So it inherits from CMFCatalogAware via
(Changing the inheritence order does not change the behavior... I tried)
So, my questions:
- is this a bug, a feature, or am I trying to access the review state in
the wrong way ?
- is there another method called after a state change more suited for
installing my "state change push -through to something else", than
reindexObject ? I tried "notifyModified", buth that doesn't get called
on every state change, so it seems.
For the record: this is CMF 1.3.2 and plone 1.0.5
More information about the Zope-CMF