-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the happy-heron ("H2") wiki! This is where we put developer-focused documentation.
State machine diagrams for collections and works live in the application repository:
To keep these up to date, run the following command and commit the resulting changes whenever the state machines change:
$ bin/rake state_machines:draw CLASS=Work,Collection
Completing a deposit of a work or a collection in H2 requires SDR integration, which we don't have when doing development locally. (We could add sdr-api in docker-compose.yml, but then we need dor-services-app, workflow-service, fedora, etc. etc., so it would very quickly become heavier than we want.) It's still useful to simulate completion of deposits. Here's how to do that:
# Make sure to have the object ID (the database ID, an integer), e.g.:
id = 123
# Make up a druid too, e.g.:
druid = 'druid:bc123df4567'
# This simulates what's done in the DepositStatusJob when we receive a response from sdr-api
object = Work.find(id) # or Collection.find(id)
object.druid = druid
object.add_purl_to_citation # if it's a Work
object.deposit_complete!
You may wish to check the latest definition of DepositStatusJob#complete_deposit
to confirm this documentation hasn't gotten stale. If it has, please update it.
...