[Zope-CMF] Should DefaultWorkflow be in CMFCore?

Shane Hathaway shane@digicool.com
Thu, 29 Mar 2001 13:21:29 -0500


Tres Seaver wrote:
> 
> Lucas Hofman wrote:
> > Would you mind to explain a little about the design of the WorkflowTool.
> > Especially the innards of the methods in workflowCore are black magic to
> > me.
> 
> I'm still coming up to speed on them myself.  Shane would probably have
> answered by now, but he is busy bringing home wife and new baby ("...and
> the crowd goes wild!")  Congratulations to Shane, and welcome to the
> newest Zopatista!

Thanks!  I plan to get some pictures on the Web somewhere so everyone
can see.  She's really cute.  :-)

> > I wonder if DefaultWorklfow, and maybe also workflowTool should reside
> > in CMFDefault. This because they are only relevant for the Default
> > implementation, and need changing for nearly every possible
> > implementation of CMF
> 
> This is an excellent point.  We will look at moving the "non-core" bits
> out to CMFDefault it for 1.1.

Right.  DefaultWorkflow really does belong in CMFDefault.  We just
haven't had the resources to make that happen, and it doesn't need to
happen for the 1.0 release.

> >. I found that it was easiest not to subclass
> > DefaultWorkflow but copy it and change it to include the new roles I
> > created and the transitions I wanted.
> 
> That isn't a bad strategy, actually.  Inheritance couples the two
> pretty strongly;  if you are overriding a significant portion of the
> methods anyway, it doesn't buy you enough convenience to make it worth
> the trouble.
> 
> > But maybe I do not completely understand how the code provide is ment to
> > be used....
> 
> I'll let Shane tackle that one, maybe during one of the 3:00 AM
> feedings.

Actually I think most of the time you'll want to copy and modify rather
than inherit DefaultWorkflow.  So DefaultWorkflow isn't really designed
to be a base class.  Perhaps in time we can discover elements that are
common to most workflows and make a base class.

Shane