sul-dlss / web-archiving

placeholder for web archiving work
0 stars 0 forks source link

refactor all robots to add workflow_service method #8

Closed drh-stanford closed 8 years ago

drh-stanford commented 8 years ago

Right now, we have to hack the configuration for all the WAS robots to include the following in the config/environments file:

Dor::Config.workflow.client # force Dor::WorkflowService.configure to be called correctly

This is so that we correctly call Dor::WorkflowService.configure. In common-accessioning, they have a base class for all of their robots, which uses the Dor::Config.workflow.client call to access the dor-workflow-service gem (rather than Dor::WorkflowService).

See https://github.com/sul-dlss/common-accessioning/blob/master/robots/accession/base.rb#L7-L9

It's possible that we might be able to put that default method into LyberCore::Robot, but I'm not sure about that. It would need further investigation but some of the relevant code is here: https://github.com/sul-dlss/lyber-core/blob/master/lib/lyber_core/robot.rb#L57. A simple change yielded rspec failures -- see https://travis-ci.org/sul-dlss/lyber-core/jobs/139841213

Connects to #2

drh-stanford commented 8 years ago

Naomi and I discussed the proper solution and we'd like to combine all the WAS repos into a single "was-robot-suite" repo (see #2), and then add the appropriate base classes that common-accessioning and assembly have. See: https://github.com/sul-dlss/common-accessioning/blob/master/robots/accession/base.rb#L7-L9 and https://github.com/sul-dlss/assembly/blob/master/robots/assembly/base.rb, and this PR here: https://github.com/sul-dlss/assembly/pull/37

drh-stanford commented 8 years ago

See https://github.com/sul-dlss/was_robot_suite