[Zope-CMF] dcworkflow question ?
vlado
vlado@vintech.bg
Mon, 15 Apr 2002 17:58:10 +0300
Hi all,
I'm trying to customize portal workflow in that way: members creates news items in their "My Stuff" Folders and before final publishing objects to be moved in a common folder named "News". Script (before) in workflow transition "publish" works fine but after publishing i'm redirected to previous location of object. What i am doing wrong ?
this is my script (before):
>object=state_change['object']
>portal=state_change.getPortal()
>
>ff='News'
>try:
> cdd=getattr(portal, ff)
>except:
> portal.manage_addPortalFolder(ff)
> cdd=getattr(portal, ff)
>
>yf=str(DateTime().year())
>try:
> cdd=getattr(cdd, yf)
>except:
> cdd.manage_addPortalFolder(yf)
> cdd=getattr(cdd, yf)
>
>cdd_old=object.aq_parent
>
>obid_old=object.getId()
>obid_new=str(DateTime().strftime('%m-%d-'))+str(obid_old)+'.htm'
>
>cdd_old.manage_renameObjects([obid_old], [obid_new])
>
>cdata=cdd_old.manage_cutObjects([obid_new])
>return cdd.manage_pasteObjects(cdata)
Sorry my bad english.
Thanks for your help in advance.
--Vlado