@startuml
participant "Event\nService" as event
participant IRIS
database "Transfer\nArea" as transfer
participant "Metadata\nAccess\nService" as MAS
participant "Detector Data\nCopy Service" as DDCS
participant "Summit Data\nStorage Service" as SDSS
database "Summit\nPermanent\nStore" as store
database "Data\nInformation\nDatabase" as DIB
participant VIZ
IRIS -> IRIS: exposure taken
IRIS -> transfer : write data w/\nminimal header
IRIS -> event : publish dataWriteEnd\nobserve event
event -> DDCS : receive observe event
DDCS -> transfer: detect new file
DDCS -> SDSS : create DIB entry
SDSS -> DIB : create entry with path and URI
SDSS -> DDCS : return path and URI
DDCS -> store : copy file from transfer\narea to summit storage path
DDCS -> MAS : query for FITS header
MAS -> DDCS : return FITS header
DDCS -> store: update file with full header
DDCS -> event: publish observe event
DDCS -> SDSS: update DIB entry
SDSS -> MAS: query for metadata
MAS -> SDSS: return metadata
SDSS -> DIB: update entry with metadata
DDCS -> VIZ: publish image
@enduml