Skip to content

Instantly share code, notes, and snippets.

@rosy1280
Last active August 29, 2015 14:10
Show Gist options
  • Save rosy1280/86752f5017de78b37828 to your computer and use it in GitHub Desktop.
Save rosy1280/86752f5017de78b37828 to your computer and use it in GitHub Desktop.
set group of druids to a particular status via console
druids = ["druid:bt238kw3938", "druid:bw690ww9101", "druid:cc502yd9847", "druid:ch100bz7050"]
druids.each do |druid|
begin
@object=Dor::Item.find(druid)
Dor::WorkflowService.update_workflow_status 'dor', @object.pid, 'accessionWF', 'provenance-metadata', 'waiting'
end
end
@wmene
Copy link

wmene commented Dec 3, 2014

If you're only using the pid from the object, you don't need to fetch them. Just use the druids you have in the array, and pass them to the update_workflow_status method

@rosy1280
Copy link
Author

rosy1280 commented Dec 5, 2014

also for my own personal edification i like to use the Dor::Item.find to ensure that the druid I'm looking for actually exists because sometimes i'm doing weird things and they in fact don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment