[Zope] Workflow question

Dieter Maurer dieter at handshake.de
Fri Aug 19 13:35:08 EDT 2005


David Pratt wrote at 2005-8-18 20:57 -0300:
> ...
>All for exception of one thing - I want to 
>delete the object as part of the workflow since it is no longer needed. 
> ...
>I use manage_delObjects like so:
>
>	# Delete original object from the upload folder
>	upload_dir.manage_delObjects([id,])
>
>method it raises following traceback:
>
>Traceback (innermost last):
>
>     * Module ZPublisher.Publish, line 113, in publish
>     * Module ZPublisher.mapply, line 88, in mapply
>     * Module ZPublisher.Publish, line 40, in call_object
>     * Module webdav.NullResource, line 138, in PUT
>     * Module Products.CMFCore.PortalFolder, line 393, in PUT_factory
>     * Module OFS.ObjectManager, line 261, in _getOb
>
>AttributeError: A1032.JPG
>
>I guess my question is how can you delete an object that really is not 
>there yet, correct

Correct.

> ...
>Because I already have already obtained what I need from the FTP'd 
>file, is there a way to give the FTP process something after the PIL 
>process to have it think it has completed its job and send a 226 
>Transfer complete. This way I think workflow should be happy, FTP will 
>be happy because it gets a successful transfer,  and I will be happy 
>because there is no file in the upload directory to worry about 
>deleting.  Even it is a very different kind of situation, perhaps it 
>can still work.

I would approach this task by means of a specialized folder
(say some "UploadFolder"). In its "__bobo_traverse__" method,
it would not return a "webdav.NullResource" but instead another
auxiliary object. Its "PUT" method can do whatever you want it to do,
e.g. not creating an object but telling FTP/WebDAV about a successful
operation.

-- 
Dieter


More information about the Zope mailing list