|
From: Peter E. <P.E...@er...> - 2002-02-26 14:18:49
|
I still can't puzzle out how to automate continuation from a DTML application.
First, attempting to follow Daniele's instruction, I tried
<dtml-call "_['openflow_id'].completeWorkitem(instance_id, workitem_id)">
directly in the application, but this causes the following Zope error.
(if the application has manual start, this happens when I press 'Start
application' from the Worklist)
Error Type: AttributeError
Error Value: completeWorkitem
Traceback (innermost last):
File D:\Zope\PWETRI~1\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
File D:\Zope\PWETRI~1\lib\python\ZPublisher\Publish.py, line 114, in publish
File D:\Zope\PWETRI~1\lib\python\Zope\__init__.py, line 158, in
zpublisher_exception_hook
(Object: mywf)
File D:\Zope\PWETRI~1\lib\python\ZPublisher\Publish.py, line 98, in publish
File D:\Zope\PWETRI~1\lib\python\ZPublisher\mapply.py, line 88, in mapply
(Object: trivdoc)
File D:\Zope\PWETRI~1\lib\python\ZPublisher\Publish.py, line 39, in
call_object
(Object: trivdoc)
File D:\Zope\PWETRI~1\lib\python\OFS\DTMLDocument.py, line 127, in __call__
(Object: trivdoc)
File D:\Zope\PWETRI~1\lib\python\DocumentTemplate\DT_String.py, line 473, in
__call__
(Object: trivdoc)
File D:\Zope\PWETRI~1\lib\python\DocumentTemplate\DT_Util.py, line 159, in
eval
(Object: _['openflow_id'].completeWorkitem(instance_id, workitem_id))
(Info: instance_id)
File <string>, line 2, in f
File D:\Zope\PWETRI~1\lib\python\AccessControl\DTML.py, line 29, in
guarded_getattr
(Object: trivdoc)
File D:\Zope\PWETRI~1\lib\python\AccessControl\ZopeGuards.py, line 47, in
guarded_getattr
AttributeError: (see above)
I then thought this is the wrong time to call completeWorkitem, as it happens
when rendering the page for the user. The user should select something or
pressing a button to do it, i.e. making a decision to complete the Workitem.
So I tried creating another document (or a Script may be better), and made the
first document access that either by <a href=(etc)> or <form (etc)>. But I
couldn't see how to pass in the OpenFlow parameters to that other document. Is
this anything like the right idea?
Help please!
Peter
|