[Zope-CMF] Moving content on a transition question

brent A shelkey bshelkey@lycos.com
Tue, 29 Oct 2002 14:24:10 -0400


Hmmn. I'm not sure if CMFStaging or the moving content on transtions script is more appropriate for what I want to do.

My basic dreamy workflow scenario involves a workflow going through draft, review, and publish states.  Once in publish state, I'd like to be able to edit the document, and send it back through the workflow again without affecting the published copy until it is published again.

I thought Alan's recipe in ZopeLabs http://www.zopelabs.com/cookbook/1029298314 ) might be related to solving the problem.  On my initial try with Zope 2.6 and CMF 1.3 I get this error:

--------------------------------------------
Time 2002/10/29 13:12:11.785 US/Eastern 
User Name (User Id) admin (admin) 
Request URL http://localhost:8080/test/d/content_status_modify 
Exception Type TypeError 
Exception Value moveonPublish() takes no arguments (1 given) 

Traceback (innermost last): 

Module ZPublisher.Publish, line 98, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 39, in call_object 
Module Shared.DC.Scripts.Bindings, line 252, in __call__ 
Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec 
Module Products.PythonScripts.PythonScript, line 315, in _exec 
Module Script (Python), line 4, in content_status_modify
<PythonScript at /test/content_status_modify used for /test/d>
Line 4 
Module Products.CMFCore.WorkflowTool, line 309, in doActionFor 
Module Products.CMFCore.WorkflowTool, line 624, in _invokeWithNotification 
Module Products.DCWorkflow.DCWorkflow, line 272, in doActionFor 
Module Products.DCWorkflow.DCWorkflow, line 437, in _changeStateOf 
Module Products.DCWorkflow.DCWorkflow, line 542, in _executeTransition 
Module Shared.DC.Scripts.Bindings, line 252, in __call__ 
Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec 
Module Products.PythonScripts.PythonScript, line 315, in _exec 
TypeError: moveonPublish() takes no arguments (1 given) 

-----------------------------------------------------


This line was in bold:
<PythonScript at /test/content_status_modify used for /test/d>
Line 4 .  And I seem to recall something in some of the other posts about this.  

The code for the content_status_modify script is:

----------------------------------------
context.portal_workflow.doActionFor(
    context,
    workflow_action,
    comment=comment)

if workflow_action == 'reject':
    redirect_url = context.portal_url() + '/search?review_state=pending'
else:
    redirect_url = '%s/view?%s' % ( context.absolute_url()
                                  , 'portal_status_message=Status+changed.'
                                  )

context.REQUEST[ 'RESPONSE' ].redirect( redirect_url )
-----------------------------------------------

Any ideas on what is going wrong? 

Thanks,
Brent




__________________________________________________________
Outgrown your current e-mail service? Get 25MB Storage, POP3 Access,
Advanced Spam protection with LYCOS MAIL PLUS.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus