RE: [Zope] Automatically run an external method?
I agree that this is (or event triggers in general are) a useful soft of thing. I think one thing that will eventually come out of ComponentArchitecture/Zope3X efforts will be the service-ization of such infrastrucuture as a standard component of Zope the way that workflow is a standard component of the CMF... Sean -----Original Message----- From: Bruce Eckel [mailto:Bruce@EckelObjects.com] Sent: Saturday, December 15, 2001 4:36 PM To: zope news Cc: zope@zope.org Subject: Re: [Zope] Automatically run an external method? Yes, a file modified through the web interface and saved to the ZODB. For example, something like a DTML Document. The idea is that the document is a configuration/information file, and the external method will take this and process it to generate an output file. Seems like this could be a useful model in general for solving problems. (input-process-output, triggered by a change in input). *********** REPLY SEPARATOR *********** On 12/15/01 at 2:59 PM zope news wrote:
I think I understand your question: do you mean a file saved to zodb through the webinterface? If so, then try to create your own screen and dtml document to upload your file.
Else if you want to circumvent to already provide (by zope.org) classes, then try a hotfix approach.
Regards, Luis.
----- Original Message ----- From: "Bruce Eckel" <Bruce@EckelObjects.com> To: <zope@zope.org> Sent: Saturday, December 15, 2001 2:22 PM Subject: [Zope] Automatically run an external method?
Is it possible to automatically run an external method every time a file is saved? That is, is there some kind of file where I can say "when you're saved, call this method?"t
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar =================== _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Well, I can run the program by hand for the time being but it would be convenient to figure out how to do it automatically. It sounds like I need to make a new product? Haven't learned how to create one of those yet... *********** REPLY SEPARATOR *********** On 12/15/01 at 5:08 PM sean.upton@uniontrib.com wrote:
I agree that this is (or event triggers in general are) a useful soft of thing.
I think one thing that will eventually come out of ComponentArchitecture/Zope3X efforts will be the service-ization of such infrastrucuture as a standard component of Zope the way that workflow is a standard component of the CMF...
Sean
-----Original Message----- From: Bruce Eckel [mailto:Bruce@EckelObjects.com] Sent: Saturday, December 15, 2001 4:36 PM To: zope news Cc: zope@zope.org Subject: Re: [Zope] Automatically run an external method?
Yes, a file modified through the web interface and saved to the ZODB. For example, something like a DTML Document.
The idea is that the document is a configuration/information file, and the external method will take this and process it to generate an output file.
Seems like this could be a useful model in general for solving problems. (input-process-output, triggered by a change in input).
*********** REPLY SEPARATOR ***********
On 12/15/01 at 2:59 PM zope news wrote:
I think I understand your question: do you mean a file saved to zodb through the webinterface? If so, then try to create your own screen and dtml document to upload your file.
Else if you want to circumvent to already provide (by zope.org) classes, then try a hotfix approach.
Regards, Luis.
----- Original Message ----- From: "Bruce Eckel" <Bruce@EckelObjects.com> To: <zope@zope.org> Sent: Saturday, December 15, 2001 2:22 PM Subject: [Zope] Automatically run an external method?
Is it possible to automatically run an external method every time a file is saved? That is, is there some kind of file where I can say "when you're saved, call this method?"t
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
I think what you want to do is to make a new zClass where you subclass the class you are interested in, and then write a new form and a new action where you put additional logic. Zope can generate most of the code for you when you make the new zClass. regards Max M
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Bruce Eckel
Well, I can run the program by hand for the time being but it would be convenient to figure out how to do it automatically.
It sounds like I need to make a new product? Haven't learned how to create one of those yet...
On Sun, 2001-12-16 at 03:48, Bruce Eckel wrote:
Well, I can run the program by hand for the time being but it would be convenient to figure out how to do it automatically.
It sounds like I need to make a new product? Haven't learned how to create one of those yet...
Right. There's no event hooking API in core Zope yet, just a small number of hooks which meet specific requirements (e.g. manage_beforeDelete and manage_afterAdd, which are useful for catalogues). As Sean mentioned, a good framework for doing this would be the workflow tool in the CMF, but you'll find there's a lot to get to grips with. There's a workflow tool which allows you to set states and transitions on objects; it also allows you to hook workflow to particular object methods (by wrapping the method with a proxy class). seb
participants (4)
-
Bruce Eckel -
Max M -
sean.upton@uniontrib.com -
seb bacon