From jp at nexedi.com Sat Feb 12 09:52:59 2011 From: jp at nexedi.com (jp at nexedi.com) Date: Sat, 12 Feb 2011 09:52:59 +0100 Subject: [Erp5-dev] =?utf-8?q?Fwd=3A_Problem_in_Workflow_=28following_Foru?= =?utf-8?q?m_Module=09Tutorial=29?= In-Reply-To: Message-ID: <20110212085233.0D151BF005D@mail2.tiolive.com>
Hi,

You should not remove the "after". They are there on purpose to make
a difference between UI aspect and logical aspect;

Could you send to me an export (zexp) of your workflow ?

Regards,

JPS.

Each transitions itself have 2 transitions, as in publish and publish_action. I've removed the afters only from those with 'action' in the name, them everything worked fine.

Already checked the whole tutorial and evertyhing's correct.

By the way, here's the whole traceback when I try to unclose a thread:

Traceback (innermost last):
  Module ZPublisher.Publish, line 114, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 325, in _exec
  Module None, line 48, in Base_callDialogMethod
   - <PythonScript at /erp5/Base_callDialogMethod used for /erp5/discussion_thread_modulo/2>
   - Line 48
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 325, in _exec
  Module None, line 56, in Workflow_statusModify
   - <PythonScript at /erp5/Workflow_statusModify used for /erp5/discussion_thread_modulo/2>
   - Line 56
  Module AccessControl.ZopeGuards, line 339, in guarded_apply
  Module AccessControl.ZopeGuards, line 361, in builtin_guarded_apply
  Module Products.CMFCore.WorkflowTool, line 301, in doActionFor
  Module Products.CMFCore.WorkflowTool, line 616, in _invokeWithNotification
  Module Products.DCWorkflow.DCWorkflow, line 287, in doActionFor
  Module Products.DCWorkflow.DCWorkflow, line 472, in _changeStateOf
  Module Products.ERP5Type.patches.DCWorkflow, line 407, in DCWorkflowDefinition_executeTransition
  Module OFS.ObjectManager, line 715, in __getitem__
KeyError: 'unclose'

2011/2/11 <jp at nexedi.com>
Hi,

The "Script After" is required. So if there is an error it must come
from somewhere else. Having the traceback would be useful.

(I suppose one workflow was not attached to a portal type from
what you write)

Regards,

JPS


? ?Just fixed the error removing the "Script (after)" of all the action's
? ?transitions. Maybe somebody should update the tutorials?

? ?Thanks anyway Leo.?

? ?Regards,

? ?2011/2/11 Leonardo Rochael Almeida <leonardo at nexedi.com>

? ? ? ?Can you show us the traceback for this error?

? ? ? ?Regards,

? ? ? ?Leo


? ? ? ?Em Sex, 2011-02-11 ?s 15:01 -0200, d.camata at gmail.com escreveu:
? ? ? ?> Hi everybody.
? ? ? ?>
? ? ? ?>
? ? ? ?> I'm doing the Forum Module tutorial, but at the end of it, when I try
? ? ? ?> to change my Discussion Thread object state, from draft to public,
? ? ? ?for
? ? ? ?> example, I keep having this strange error.
? ? ? ?>
? ? ? ?>
? ? ? ?> Site Error
? ? ? ?> An error was encountered while publishing this resource.
? ? ? ?>
? ? ? ?> Error Type: KeyError
? ? ? ?> Error Value: 'publish'
? ? ? ?>
? ? ? ?> Can anybody help?
? ? ? ?>
? ? ? ?> --
? ? ? ?> Douglas Camata
? ? ? ?> Graduando em Ci?ncia da Computa??o (UENF)
? ? ? ?>
? ? ? ?> Blog: http://blog.douglascamata.net
? ? ? ?> Github: http://github.com/douglasamata
? ? ? ?> Twitter: @douglascamata
? ? ? ?> Skype: douglas_camata
? ? ? ?> -----------------------------------
? ? ? ?> Linux User #509211
? ? ? ?>
? ? ? ?>
? ? ? ?> _______________________________________________
? ? ? ?> Erp5-dev mailing list
? ? ? ?> Erp5-dev at erp5.org
? ? ? ?> https://mail.tiolive.com/mailman/listinfo/erp5-dev


? ? ? ?_______________________________________________
? ? ? ?Erp5-dev mailing list
? ? ? ?Erp5-dev at erp5.org
? ? ? ?https://mail.tiolive.com/mailman/listinfo/erp5-dev




? ?--
? ?Douglas Camata
? ?Graduando em Ci?ncia da Computa??o (UENF)

? ?Blog: http://blog.douglascamata.net
? ?Github: http://github.com/douglasamata
? ?Twitter: @douglascamata
? ? Skype: douglas_camata
? ?-----------------------------------
? ?Linux User #509211



_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
https://mail.tiolive.com/mailman/listinfo/erp5-dev




--
Douglas Camata
Graduando em Ci?ncia da Computa??o (UENF)

Blog: http://blog.douglascamata.net
Github: http://github.com/douglasamata
Twitter: @douglascamata
Skype: douglas_camata
-----------------------------------
Linux User #509211