Andrea, Thanks, I'm running my task in the usual way now, via dspace/bin curate. However I was hoping to be a little selective in the way I select items against which to run tasks -- for instance only items submitted in the last 24 hours. There are other ways to accomplish this, but the bit in the docs about 'arbitrary code' made me believe I could write a standalone java program to interact directly with the dspace system. If all else fails, I can do the same with java (or pretty much any language) to query the database and make a system call to dspace curate...
By the way, this is all related to the last topic you and I discussed, the problem with the dc.provenance field lacking a submitter information since my upgrade to 5.5 and configurable workflow. I wrote a task to populate that metadata field, and my goal is to run it periodically for recently deposited items... Thanks! Bill On Wednesday, April 27, 2016 at 7:11:47 PM UTC-5, Andrea Schweer wrote: > > Hi Bill, > > I'm afraid you'll have to give us a little more context. When/how are you > wanting to run the curation task? How are you launching it right now? > > ScriptLauncher.java is probably not a good starting point at all. If you > just want to run a curation task from the command line, the "arbitrary user > code" bit in the documentation doesn't apply to your situation. Just > configure the curation task in curate.cfg and run it using > [dspace]/bin/dspace curate, using the -t flag to pass in the name of the > task. > > cheers, > Andrea > > On 28/04/16 06:01, Bill T wrote: > > Referring the version 5.5, the documentation states that curation tasks > can be invoked in 'in arbitrary user code'. Is there a more complete > example than the small code snippet included in the docs? I feel like I'm > close, but when invoking a (homemade) task that updates a metadata field, > an IllegalStateException is thrown with the message 'DSpace kernel cannot > be null'. > Is ScriptLauncher.java a good place to start as a template? > > Thanks for any pointers! > Bill > -- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > > > -- > Dr Andrea Schweer > Lead Software Developer, ITS Information Systems > The University of Waikato, Hamilton, New Zealand > +64-7-837 9120 > > -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
