[Zope-CMF] Re: Stuck with DCWorkflow....
Fri, 30 May 2003 17:21:23 +0200
Dmitry S. Makovey wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Hi, I'm stuck with DCWorkflow and looking for enlightenment ;)
> I'm working with plone, but i suppose it shouldn't make much difference.
> I'm trying to create a new state : archive. Scenario is as follows:
> whenever item is get published it should be copied over to an archive.
> Items in archive should have their own state "archive", and published item
> remains published.
> My steps:
> 1. copied over folder_workflow (I know I should've used plone_workflow but
> for the sake of simplicity I'll stay with it for awhile) to dimon_workflow
> 2. in dimon workflow:
> created new state: archive (no possible transition from that state)
> in dimon_workflow created script:
> o=getattr(state_change, 'object')
> ac=archive.manage_pasteObjects( obj_parent.manage_copyObjects(o.getId())
> for o in ac:
> wf_tool.doActionFor( a, workflow_action)
> created new transition copy_to_archive (Destination: archive, initiated
> workflow method)
> modified "publish" transition to run archiveOnPublish after transition
> modified "published" state to allow copy_to_archive transition
> changed private state to allow transition to archive state (copy_t
> Associated dimon_workflow with Course type
> Now whenever I'm trying to "publish" Course I get:
> <Error message>
> Error Type
> Error Value
> No workflow provides the "copy_to_archive" action.
> </Error message>
When a content is pasted the status of copied object is 'visible'.
You shouldst add a transition from 'visible' to 'archive', and the 'Trigger
type' should be 'Initiated by user action'.