[Plone-IT] Workflow problematico, qualche consiglio?

Riccardo Lemmi riccardo a reflab.it
Mar 23 Dic 2008 13:14:16 UTC


On Tuesday 23 December 2008, giorgio wrote:
>...
> Scusa non ho capito. io ho semplicemente eseguito questo:
> It is complicate but I show you the steps:
>
> - add a 'reviewer' variables with Default expression:
> python:state_change.kwargs.get('reviewer', '')
>
> - modify 'submit' transition with: Display in actions box: Name: Submit to
> URL: %(content_url)s/choose_reviewer Category: object_tabs
>
> Now you have an action on the object (important: don't use 'Change state'
> in 'state' action. Ideal it is to have transitions as actions)
>
> - Create the 'choose_reviewer' (pt):
>
> <form method="post" action="set_reviewer" tal:attributes="action
> string:${here/absolute_url}/set_reviewer"> <tal:block repeat="member
> python:container.portal_membership.searchForMembers(roles=['Reviewer'])">
> <input type="radio" name="reviewer" value="" tal:attributes="value
> python:member.getUserName()"> <tal:block
> replace="python:member.getUserName()">Member name</tal:block> <br/>
> </tal:block> <input type="hidden" name="workflow_action" value="pending">
> <input type="submit" value="choose"> </form>
>
> - add the script 'set_reviewer' with parameters 'workflow_action',
> 'reviewer' and it must contain:
>
> context.portal_workflow.doActionFor( context, workflow_action, comment='',
> reviewer=reviewer)
>
> - modifiy 'publish' transition with: Guard Expression:
> python:user.getUserName()==state_change.status.get('reviewer','')
>
> sostituendo object_tabs con workflow mi genera errore "la pagina non
> esiste". grazie ciao

Questo errore  diverso dall'altro e in realt la 'Category' non sarebbe 
importante (in quanto serve solo per indicare dove renderizzare la url), in 
questo caso l'errore sembra dovuto al fatto che non trova il template 
choose_reviewer quindi potrebbe essere che la url  generata male o che il 
template non  'acquisibile'.
-- 
Riccardo Lemmi                           Email:   riccardo a reflab.it
Reflab S.r.l. - Plone Design, Development and Consulting
Phone: +39 349 4620820                         http://www.reflab.it
-------------- parte successiva --------------
Un allegato non testuale  stato rimosso....
Nome:        signature.asc
Tipo:        application/pgp-signature
Dimensione:  189 bytes
Descrizione: This is a digitally signed message part.
URL:         <http://lists.plone.org/pipermail/plone-plone-it/attachments/20081223/038130ff/attachment.asc>


Maggiori informazioni sulla lista Plone-IT