Andrea

>
> thanks for clarifying, and sorry that I haven't responded further in our 
> other conversation, I'm pretty swamped at the moment. When I've wanted 
> curation tasks of the type you described, I've always just written them so 
> they should be invoked site-wide (handle prefix/0) and have made them 
> distributive / only act on DSOs of type Site. 
>

Hmmmm...  I'm not sure what you mean by this -- do you mean to have the 
task itself filter the items for selection? 



> If you want to find the items yourself via SQL queries and _then_ run a 
> curation task on each, you can do that but it kindof defeats the purpose of 
> the curation system! 
>

Which is what I wound up doing for simplicity.  I have a standalone java 
program that select the items I want to work on, and I use ProcessBuilder 
to invoke dspace/bin curate  with the --id parameter.  Why do you say this 
defeats the purpose of the curation system (that's why there's an id 
option, right?)  I'm not arguing with you, I just want to make sure there's 
not something I'm misunderstanding.

Thanks again for taking the time!  Clearly, there's more than one way to do 
it!!
Bill

 

>
> cheers,
> Andrea
>
> On 29/04/16 00:54, Bill T wrote:
>
> 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].
>> 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.
>>
>>
>> -- 
>> 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] <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.

Reply via email to