[Grok-dev] Naming a utility in hurry.workflow

Sebastian Ware sebastian at urbantalk.se
Wed Jun 27 16:16:01 EDT 2007


I would like to have an arbitrary number of workflows using  
hurry.workflow. Is there any reason why this shouldn't work? Is this  
the right way to set it up?

class Workflow(grok.GlobalUtility, workflow.Workflow):
     grok.name('my_named_workflow')
     grok.provides(IWorkflow)

...and how do I call it? (the example works without the name)

     @grok.action('Publish')
     def publish(self, **data):
         self.applyData(self.context, **data)
         IWorkflowInfo(self.context).fireTransitionToward 
(interfaces.PUBLISHED)
         self.redirect(self.url(self.context))


Mvh Sebastian



More information about the Grok-dev mailing list