@startuml
hide footbox

box "Products & Services" #aliceblue
database wpc as "WPC DB" order 10
participant bvri as "BVRI" order 20
end box

box "Self Service" #seashell
control pbox as "prdpwpcwx0021" order 30
end box

control tidal as "TIDAL" order 50

box "Bazaarvoice" #mintcream
collections bvsf as "External SFTP" order 60
control bv as "Bazaarvoice" order 70
end box

ref over bvsf, bv : previous processing
activate bv #lightblue
hnote over bv #lightblue
~~<&cloud>Bazaarvoice API~~
gets latest info
end note

...__processing time__...

group <&file>ratings.xml
bv -> bvsf : write counts/averages to <&file>
activate bvsf #paleturquoise
note over bvsf #paleturquoise
""<&file>ratings.xml""
end note
hnote over bvsf, bv
while ""<&file>ratings.xml"" data is frozen at calculation,
~~<&cloud>Bazaarvoice API~~ stays current
end note
end
deactivate bv
... __wait for TIDAL schedule__ ...
tidal -->> tidal : schedule
activate tidal #lightgray

group retrieve <&file>ratings.xml

group TIDAL job A
tidal --\ bvsf : start SFTP
activate tidal #paleturquoise
tidal \- bvsf : moved <&file>
deactivate bvsf
end

group TIDAL job B
tidal --> pbox : moved <&file>
deactivate tidal
deactivate tidal
activate pbox #paleturquoise
note over pbox #paleturquoise
""<&file>ratings.xml""
end note
end
end

... __wait for BVRI schedule__ ...
pbox -->> pbox : schedule
activate pbox
group update WPC
pbox --> bvri : start
activate bvri

bvri -> pbox : read <&file>
hnote over wpc, bvri : values from ""<&file>ratings.xml""
wpc <- bvri : update
activate wpc #paleturquoise
bvri -> pbox : archive <&file>
deactivate pbox
deactivate pbox
deactivate bvri
end

hnote over wpc, bv
WPC data is from frozen <&file> calculation, ~~<&cloud>Bazaarvoice API~~ stays current
end note

@enduml
