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
see code here: https://github.com/sul-dlss/dor-workflow-service/blob/232e065c99cfb024d07e31ce5e2a524fc0eac822/lib/dor/services/workflow_service.rb#L39