[Grok-dev] Re: Naming a utility in hurry.workflow
Dominique Lederer
lederer.dominique at gmail.com
Mon Jul 2 04:06:32 EDT 2007
Sebastian Ware wrote:
> 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
hi
some time ago i created a patch for hurry.workflow, which handles named workflow
utilities (but not versions). i sent it to martijn, but i guess that he did not
had time to look at it and make a new release.
cheers, Dominique
More information about the Grok-dev
mailing list