> You must call manage_renameObject on the object *container*, passing
the old name and the new name. Something like this:

>   object = result[1]
>   container = object.aq_parent
>   container.manage_renameObject(object.id, object.id.lower())

Thanks Gabriel.

I did exactly as you suggested, but ran into this error :

/////////////////////////////////////////////////
The id "begin" is invalid - it is already in use.
/////////////////////////////////////////////////

"Begin" is the first activity. It could be some reserved word within
OpenFlow or Zope - not really sure. 

In any case, I tried skipping it, but ran into another error message
saying :

///////////////////////////////////////////////////////////////////////
The object RECEIPT_OF_SOURCE_DOCUMENTS does not support this operation.
///////////////////////////////////////////////////////////////////////

My code looks like this :

////////////////////////////////////////////////////////////////////////
/

wf = container.GeneralWorkflow
catalog = wf.Catalog

results = catalog.ZopeFind(wf, obj_metatypes=['Activity'], search_sub=1)


for result in results:
    print result[1].id
    if result[1].id <> 'Begin':
       object = result[1]
       container = object.aq_parent
       container.manage_renameObject(object.id, object.id.lower())

return printed 

////////////////////////////////////////////////////////////////////////
/


Regards,
Danny

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

Reply via email to