Hi Gary, On 14/11/11 14:08, Gary Browne wrote: > I want to trigger a programmatic process once an item has been submitted into > DSpace and the handle is created - where is the best hook for that? > > I looked into the configurable submission non-interactive step, but I think > that would run before the handle has been created and the item has been > confirmed successfully submitted.
Do you want to make changes to the item? If you don't want to make any changes (for example if you want to send an e-mail to an additional recipient) then you can use a custom event handler, attached to the Item+Install event. The problem with this approach is that you can't make changes to items inside the event handler code. So if you want to make changes to the item (for example, attaching a coverpage to all PDF bitstreams in the item), the best way forward seems to be 1. write a curation task that makes the required changes to the item 2. set up a scheduled job that processes a given curation task queue very often (eg every 2 minutes) 3. set up an event handler that queues the curation task for the item, using the queue from step 2. There is code (neither pretty not terribly well-documented I'm afraid) that follows the second approach here: https://github.com/lconz-irr/Curation-Tasks. https://github.com/lconz-irr/Curation-Tasks/blob/master/src/main/java/nz/ac/lconz/irr/curate/CurateOnInstallation.java is the event consumer to queue the addcover task in the queue named continuously -- just use the same name as configured in curate.cfg for your task. You'd set this up in dspace.cfg as # consumer to queue an item for curation (addcover task, queue continuously) event.consumer.author_notify_archive.class = nz.ac.lconz.irr.curate.CurateOnInstallation event.consumer.author_notify_archive.filters = Item+Install You'll then need a crontab line (or whatever the Windows equivalent is) similar to this: */2 * * * * /usr/local/dspace/bin/dspace curate -q continuously (If you wish to follow the first approach, ie no modifications of the item needed, just set up your event consumer the same way I've set up the CurateOnInstallation consumer -- but you won't need the curation task or the cronjob.) cheers, Andrea -- Dr Andrea Schweer IRR Technical Specialist, ITS Information Systems The University of Waikato, Hamilton, New Zealand ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech