[Zope-CMF] DCWorkflow ... getting the id of an action :-(

Tres Seaver tseaver@zope.com
Sat, 12 Jan 2002 12:43:23 -0500


Gitte Wange wrote:

> Hello,
> 
> I ahve just updated my DCWorkflow installation to 0.4.1 ...
> Before I could get the id of an action when looping over the workflow
> actions availiable to an object .. this isn't working anymore.
> 
> How do I get this id ?
> 
> My code looks like this:
> <dtml-let actions="portal_actions.listFilteredActionsFor(obj)"
>           wf_action="actions['workflow']">
>  <dtml-in wf_actions mapping>
>   <dtml-var id>
>  </dtml-in>
> </dtml-let>
> 
> The id just prints out the id of the object .. not the workflow action
> id ..
> 
> How do I get hold of this id ?

Hmm, I don't know of any revision of either DCWorkflow (or
of CMFDefault.DefaultWorklfow) which added the action ID to
the mapping for the action;  the 'portal_actions' interface
for ActionProvider requires only 'name', 'url', 'permissions',
and 'category'.  The actions tool *does* add 'id' to the
dictionary for actions fetched from the type object, but that
isn't very useful unless *all* actions have the ID.

What do you want to do with the action ID?  Perhaps we can
suggest a workaround?

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com