[Zope-PTK] content states
Steve Alexander
steve@cat-box.net
Thu, 20 Jul 2000 11:50:28 +0100
"Phillip J. Eby" wrote:
>
> I would suggest that we make the convention even simpler. How about just
> having a method called "workflow_states" which returns a list of keywords
> for cataloging, and leave its implementation subject to being overridden by
> the implementor of a class? Its default implementation can be to look at a
> "state_sheets" attribute containing the names of the sheets which contain
> state flags. The keywords can then be rendered as something like:
>
> sheetname.propertyname-value
Right. Interestingly, this scheme allows a developer to implement a more
complex way of doing things if they want to. So I could still implement
the more complex states sheet and other sheets idiom using this... if I
*really* wanted to :-)
Also, you suggestion above means that you can have complex state
information in the propertysheet, so long as you provide an
implementation of workflow_states() that simplifies it for use in a
ZCatalog.
I suppose that if, in search results, you need access to complex
information on the propertysheets, you can just add the appropriate
propertysheets to the meta_data of the catalog. Therefore, you don't
need an additional method that returns an object suitable for use as
catalog meta-data -- just directly use the propertysheets.
> I don't like having a "states" propertysheet, btw. It's too generic of a
> name, IMHO. The sheet(s) should be named according to the actual workflow
> taking place, so for content review it should be something like
> "reviewing_checklist", which is crystal clear as to what it's for. Want to
> change the review process? It should be clear that the first thing that
> developer needs to do is change the reviewing_checklist definition for that
> content type.
I'd like to get some more feedback from other PTK developers here. Any
comments on what to call the "reviewing" sheet for PortalContent
objects?
> By the way, if one uses a ZPatterns approach in building a Portal, one can
> now cleanly build "Reviewing" and "Registration" specialists which get
> their contents by asking the portal catalog for items based on
> reviewing_checklist items and registration_checklist items... Just a
> thought. :)
Funny you should mention that, but the project I need this for has more
complex reviewing needs than the current PTK provides. The design
includes a Reviewing specialist, so I'll be able to try all this out
soon :-)
If I do as above, will it be forwards-compatible with where you want to
take SWARM?
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net