Last active
August 29, 2015 14:10
-
-
Save rosy1280/86752f5017de78b37828 to your computer and use it in GitHub Desktop.
set group of druids to a particular status via console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
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