Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

hurry.workflow class based work flows.

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


mshaw at nunatak

Jun 22, 2009, 11:28 PM

Post #1 of 2 (439 views)
Permalink
hurry.workflow class based work flows.

Hello,

I have been working with hurry.workflow in a project and had some
questions about making hurry.workflow work with different work flows.

For this project each class can have a different work flow with it's own
set of states and transitions. All of the instances of a given class
share the same work flow.

To create these different work flows I have registered a utility for
each class. The utility has a factory that creates instances of
hurry.workflow.workflow.Workflow initialized with the correct set of
transitions for that type. The utilities are named, to allow more than
one utility to register for the hurry.interfaces.IWorkflow interface.

With many IWorkflow utilities the WorkflowInfo implementation can not
find the utility it needs. So I changed the WorkflowInfo behavior by
having it look for a named utility based on the class name of the
instance. For example the work flow utility for the class 'Cat' is
registered with the name "project.workflow.Cat" which I selected the
pattern "project.workflow.{className}" to try and avoid naming conflicts.

This solution seems to work well for the project I am working on,
however I am quite new to Zope and this is the first time I've made
these kinds of modifications.

Does anyone have any thoughts about how this implementation could be
improved, it doesn't feel like I'm taking the best advantage of the
component model? If I could come up with a set of patches, would the
change to a class based work flow be useful to include in hurry.workflow?

Regards,

Michael

--
********************************************
Michael Shaw
Developer
Nunatak Systems Pty Ltd
15 Princes Street
Sandy Bay Tasmania 7005
Australia
P: 61 3 6223 7875
F: 61 3 6226 1887
e: michael.shaw [at] nunatak
w: www.nunatak.com.au
********************************************

_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


paulalexwilson at gmail

Jun 23, 2009, 4:37 AM

Post #2 of 2 (375 views)
Permalink
Re: hurry.workflow class based work flows. [In reply to]

Hi,

2009/6/23 Michael Shaw <mshaw [at] nunatak>:
> Hello,
>
> Does anyone have any thoughts about how this implementation could be
> improved, it doesn't feel like I'm taking the best advantage of the
> component model? If I could come up with a set of patches, would the
> change to a class based work flow be useful to include in hurry.workflow?

I believe this sort of thing has been discussed on grok-dev:

http://mail.zope.org/pipermail/grok-dev/2009-May/008052.html

Regards,
Paul
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.