Page MenuHomePhabricator
Paste P22018

UML activity diagram: banner service, part 2
ActivePublic

Authored by AndyRussG on Mar 8 2022, 2:50 AM.
Tags
None
Referenced Files
F34983538: UML activity diagram: banner service, part 2
Mar 8 2022, 2:50 AM
Subscribers
None
@startuml
scale 1.2
title Banner service (part 2)
(C)
partition #lightgray "Select a banner for the selected campaign" {
if (
Does the selected campaign have only one bucket?
) then (yes)
else (no)
if (
Was a bucket previously selected for this campaign, for this client?
) then (no)
if (
Is this a Fundraising campaign, and has the user
previously seen a large Fundraising banner?
) then (no)
:Randomly choose bucket A or B.;
else (yes)
:Randomly choose bucket C or D.;
endif
else (yes)
endif
endif
:Set bucket;
if (
Does the bucket have only one banner?
) then (yes)
else (no)
if (
Does the bucket have only one banner for this device
and logged-in status?
) then (yes)
else (no)
if (
Is the banner sequence feature used for this campaign?
) then (yes)
:Select banner for next step in banner sequence.;
else (no)
:Roll the dice to choose a banner from among those available for
this bucket, device and logged-in status.;
endif
endif
endif
:Banner selected;
}
if (
Was the entire process deterministic?
) then (yes)
:Store banner name in in-memory cache of deterministic banner selections.;
else (no)
endif
(A)
detach
(A)
:Retrieve HTML content for this banner, for this language and campaign
(from in-memory cache or Varnish.);
:Return HTML elements with banner content and data for JavaScript post-processing.;
stop
(B)
:Return HTML elements with no banner and data for JavaScript post-processing.;
stop
@enduml