[Zope-CMF] Changing DCWorkflow state from a CMF Product

Andy McKay andy@agmweb.ca
Mon, 21 Oct 2002 17:17:34 -0700


Just change context to self and figure out what workflow_action it is you
want to call. Eg: 'edit'

self.portal_workflow.doActionFor(self, workflow_action, comment=comment)
--
  Andy McKay
  www.agmweb.ca

----- Original Message -----
From: "Michael LaPera" <mlapera@colorbyte.com>
To: <zope-cmf@zope.org>
Sent: Monday, October 21, 2002 2:53 PM
Subject: [Zope-CMF] Changing DCWorkflow state from a CMF Product


> Hello all,
>
> I need some help figuring out how to trigger a DCWorkflow state change
> from within a CMF Product?
>
> Basically I looking for the equivalent of the following Python Script:
>
> ## Script (Python) "content_status_modify"
> ##bind container=container
> ##bind context=context
> ##bind namespace=
> ##bind script=script
> ##bind subpath=traverse_subpath
> ##parameters=workflow_action, comment=''
> ##title=Modify the status of a content object
> ##
> context.portal_workflow.doActionFor(
>       context,
>       workflow_action,
>       comment=comment)
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>